Project

General

Profile

Bug #21640

Memory leak in ContainerFragmentLoader

Added by Eric Flumerfelt 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
Known Issues
Target version:
Start date:
01/08/2019
Due date:
% Done:

50%

Estimated time:
Experiment:
-
Co-Assignees:
Duration:

Description

ContainerFragmentLoader was calling ContainerFragment::create_index_, then putting the generated index into the Fragment. However, it never deleted the array allocated by create_index_, causing BoardReaders that use ContainerFragment to leak memory at a rate proportional to the number of Fragments in the Containers.

This bug was discovered during testing of the circular_buffer_mode_example with component03's usecs_between_sends set to 1000.

Fix is on artdaq-core/bugfix/ContainerFragmentLoader_MemoryLeak


Related issues

Related to artdaq - Bug #21267: Problems seen with large, and non-unique, request windowsReviewed2019-01-08

Related to artdaq - Feature #21717: It would be nice for ContainerFragmentLoader/Fragment/QuickVec to use fewer memcpy's when adding lots of fragments to a ContainerClosed2019-01-18

Related to artdaq - Support #21738: BoardReader memory usage increases with using circular_buffer_mode_example and nADCcounts of 200New2019-02-12

History

#1 Updated by Eric Flumerfelt 2 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#2 Updated by Kurt Biery 2 months ago

  • Related to Bug #21267: Problems seen with large, and non-unique, request windows added

#3 Updated by Kurt Biery 2 months ago

  • Related to Feature #21717: It would be nice for ContainerFragmentLoader/Fragment/QuickVec to use fewer memcpy's when adding lots of fragments to a Container added

#4 Updated by Kurt Biery about 2 months ago

In tests at protoDUNE, I saw the memory usage of the Trigger BoardReader increase to 3% of memory after 5 minutes and 5.5% after 10 minutes (with 1200 fragments per Container) without this code change. With this code change, it was 0.5% after 5 minutes, 0.7% after 10 min, and 1.2% after 20 min.

On mu2edaq01 with the circular_buffer_mode_example (and nADCcounts set to 200), the memory increased to 20% after 5 minutes into a run without this code change. (and 30% after 8 minutes) With this code change, the BoardReader memory usage for component03 was 4.4% after 5 minutes and 6.4% after 8 minutes.

This fix clearly helps, so I will merge the associated branch to develop, but it seems like there still is some sort of memory issue. I will file a separate Redmine Issue for that.

#5 Updated by Kurt Biery about 2 months ago

  • Related to Support #21738: BoardReader memory usage increases with using circular_buffer_mode_example and nADCcounts of 200 added

#6 Updated by Eric Flumerfelt about 2 months ago

  • Status changed from Resolved to Reviewed

#7 Updated by Eric Flumerfelt about 2 months ago

  • Target version set to artdaq_core v3_04_09
  • Status changed from Reviewed to Closed


Also available in: Atom PDF