-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak in LCIO to EDM4hep conversion #96
Comments
any chance you can run valgrind on top of that? |
Still have to try that. Haven't had the time yet. |
==1325==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. Could it be that something just accumulates things and then cleans up at the very end? |
Is the LCIO table of contents (?) just growing until the file is closed and it can be written? Edit: Wait, there is no LCIO output file? |
Correct. In principle, not even the EDM4hep output is necessary to have the issue. Simply attaching the converter to a wrapped processor is enough. Adding an LCIO output seems to not change anything at all, apart from a slightly higher memory baseline. |
There seems to be one likely culprit for that:
However, I cannot find where it is even populated. |
I think that m_dataHandlesMap is populated in k4LCIOReader? But it shouldn't grow once all the collection names are in there. |
Could you try the massif tool? https://valgrind.org/info/tools.html#massif |
Either, I cannot run |
Maybe related to key4hep/k4FWCore#82 ? |
With the inclusion of the new converter (#114) this issue isn't relevant anymore |
Disclaimer: This is again one of those things where I am not sure whether the real issue is actually here. It is possible that the actual problem is in
k4FWCore
or ink4LCIOReader
, which are obviously also involved here.When using an
LCIO2EDM4hepTool
attached to aMarlinProcessorWrapper
there is a quite significant memory leak (apart from the one fixed in #95). I have attached a plot here, which is produced with the minimal reproducer further below:The two curves, represent a run with and without actually storing the converted EDM4hep collections to file. Ignoring the kink from 10 to 1000 events in the "with output" case, the memory leak is somewhere in the area of slightly below 100 kb / event, for this reproducer.
The reproducer is a sort of ad-hoc "standalone" LCIO to EDM4hep converter. The input file is an ILD DST file in this case:
The text was updated successfully, but these errors were encountered: