Skip to content

GUI: Memory leak in edit or load configuration [time box 2d] #5136

@aaron-long

Description

@aaron-long

Issue

Following on from #4239 it seems like there are still some issues with memory leaks when using configurations.

I've identified and investigated replicating two methods of causing the client to hang due to reaching the heap limit of 512mb. Tested on release 6.0.0 with VisualVM 1.4 on NDXSCIDEMO.

Acceptance Criteria

  • Editing the configuration does not cause memory to leak
  • Reloading the configuration does not cause memory to leak

Edit existing configuration:

  1. Open fresh instance of IBEX GUI
  2. Point VisualVM at the client. The heap size and usage ~225mb.
  3. On some configuration duplicate a block and then save
  4. Repeat this process (I found 30 edits was enough)

You should see that the client aggressively holds memory and as the heap size limit is reached the garbage collector takes 20-25% CPU. See image:

memory_leak_using_edit_config_fresh_client

Reload configuration

  1. Open a fresh client
  2. Point VisualVM at the client. The heap size and usage ~225mb.
  3. Load some configuration
  4. Repeat this process

You should see that the client gradually holds memory and I fully expect for the client to hang as you approach the heap limit. This leak is a lot slower compared to the edit configuration. See image:

memory_leak_using_load_config_fresh_client

Notes

  • The investigation was against a fresh client to observe the time taken to cause a client hang. The amount of edits required to hang the client in a more natural setting (i.e., switiching perspectives, holding multiple plots and opening OPI's) result in a faster client hang. This is due to these objects holding a larger memory footprint before introducing the memory leak.
  • I believe I have seen this issue on instruments 3 times now

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions