Burp Suite User Forum

Create new post

Crash when out of memory instead of error

Manon | Last updated: Feb 02, 2016 10:04AM UTC

When Burp runs out of memory, for example when restoring a large state, it just crashes, and the only way to close it is to kill the process. It should be doable to prevent this situation, and give an error like "insufficient memory for this operation, please restart burp with more memory" or something similar, and to cancel the restore (or the other current operation which is close to causing a memory overflow), instead of just letting the program crash completely. Stacktrace in terminal when Burp runs out of memory when restoring a state: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2219) at java.util.ArrayList.grow(ArrayList.java:242) at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:216) at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:208) at java.util.ArrayList.add(ArrayList.java:457) at burp.a6.b(Unknown Source) at burp.ijb.a(Unknown Source) at burp.frd.b(Unknown Source) at burp.frd.a(Unknown Source) at burp.nze.b(Unknown Source) at burp.kpe.a(Unknown Source) at burp.kpe.a(Unknown Source) at burp.klh.a(Unknown Source) at burp.jcb.b(Unknown Source) at burp.kpe.a(Unknown Source) ...etc

PortSwigger Agent | Last updated: Feb 02, 2016 12:05PM UTC

Burp does catch OutOfMemoryError events and makes a best-efforts attempt to alert the user. In some situations, there is insufficient memory to do anything meaningful. Virtually any operation like showing an alert involves creating a bunch of objects, and if the heap is completely exhausted then any attempt to create an object might fail. In this situation, the process effectively becomes deadlocked, since it's impossible to do anything and the CPU runs at near 100% trying to perform garbage collection on the heap.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.