Skip to content

Debugging memory leaks in the IBEX GUI

Tom Willemsen edited this page Feb 21, 2017 · 16 revisions

Debugging memory leaks in the IBEX GUI

Symptoms

  • Java memory leaks cause high CPU usage rather than the more intuitive high memory usage. The IBEX GUI is limited to a heap size of 500MB by default. When the heap gets close to it's maximum size, the garbage collector goes crazy trying to recover memory wherever it can, and therefore uses a lot of CPU.

  • Because of the high CPU usage, the GUI will feel slow and sluggish.

  • When there is no more memory available, java will crash with an OutOfMemoryException. Note that this exception might not occur on the GUI thread, and therefore various components running in separate threads might fail before the GUI crashes.

Tools

  • Java visual VM (C:\Program Files\Java\jdk1.8.0_73\bin\jvisualvm.exe for example)

  • Eclipse debugger

  • A way to reproduce the issue

Process

  • In the java visual VM, on the left, you should see an Eclipse (pid xxxx) process. This is either your Eclipse IDE or IBEX. If you're unsure which is which, look under "Threads" for anything to do with ActiveMQ: This will be IBEX.

  • Reproduce your issue, looking at the heap usage in the java visual vm.

For reference, here is a "healthy" screenshot:

Clone this wiki locally