Skip to content

FPGATrackSim: possible mem leak fix

Ioannis Maznas requested to merge imaznas/athena:FPGATrackSimFix2 into main

This should mitigate a memory leak issue we're dealing with in the FPGATrackSim workflow.

Related to EFTRACK-546

Valgrind report ==2073247== 585,728 (319,040 direct, 266,688 indirect) bytes in 997 blocks are definitely lost in loss record 56,731 of 56,981 ==2073247== at 0x484AEE1: operator new(unsigned long) (vg_replace_malloc.c:487) ==2073247== by 0x3F2C512D: make_unique, double&, double&, double&, double&, double&, const Trk::PerigeeSurface&, std::optional > > (unique_ptr.h:1070) ==2073247== by 0x3F2C512D: Trk::PerigeeSurface::createUniqueTrackParameters(double, double, double, double, double, std::optional >) const (PerigeeSurface.cxx:106) ==2073247== by 0xA771B111: (anonymous namespace)::propagateRungeKutta(Trk::RungeKuttaPropagator::Cache&, bool, Trk::ParametersBase<5, Trk::Charged> const&, Trk::Surface const&, Trk::PropDirection, Trk::BoundaryCheck const&, Trk::MagneticFieldProperties const&, double*, bool) [clone .isra.0] (RungeKuttaPropagator.cxx:1244) ==2073247== by 0xA771C6CB: Trk::RungeKuttaPropagator::propagate(EventContext const&, Trk::ParametersBase<5, Trk::Charged> const&, Trk::Surface const&, Trk::PropDirection, Trk::BoundaryCheck const&, Trk::MagneticFieldProperties const&, Trk::ParticleHypothesis, bool, Trk::TrackingVolume const*) const (RungeKuttaPropagator.cxx:1442) ==2073247== by 0xA7CA8B21: Trk::Extrapolator::extrapolateToDestinationLayer(EventContext const&, Trk::Cache&, Trk::IPropagator const&, ObjRef, Trk::Surface const&, Trk::Layer const&, Trk::TrackingVolume const&, Trk::Layer const*, Trk::PropDirection, Trk::BoundaryCheck const&, Trk::ParticleHypothesis, Trk::MaterialUpdateMode) const (Extrapolator.cxx:3706) ==2073247== by 0xA7CABB06: Trk::Extrapolator::insideVolumeStaticLayers(EventContext const&, Trk::Cache&, bool, Trk::IPropagator const&, ObjRef, Trk::Layer const*, Trk::TrackingVolume const&, Trk::PropDirection, Trk::BoundaryCheck const&, Trk::ParticleHypothesis, Trk::MaterialUpdateMode) const (Extrapolator.cxx:3404) ==2073247== by 0xA7CAD423: Trk::Extrapolator::extrapolateInsideVolume(EventContext const&, Trk::Cache&, Trk::IPropagator const&, ObjRef, Trk::Surface const&, Trk::Layer const*, Trk::TrackingVolume const&, Trk::PropDirection, Trk::BoundaryCheck const&, Trk::ParticleHypothesis, Trk::MaterialUpdateMode) const (Extrapolator.cxx:2876) ==2073247== by 0xA7CAE651: Trk::Extrapolator::extrapolateImpl(EventContext const&, Trk::Cache&, Trk::IPropagator const&, ObjRef, Trk::Surface const&, Trk::PropDirection, Trk::BoundaryCheck const&, Trk::ParticleHypothesis, Trk::MaterialUpdateMode) const (Extrapolator.cxx:2682) ==2073247== by 0xA7CB137B: Trk::Extrapolator::extrapolateImpl(EventContext const&, Trk::Cache&, ObjRef, Trk::Surface const&, Trk::PropDirection, Trk::BoundaryCheck const&, Trk::ParticleHypothesis, Trk::MaterialUpdateMode, Trk::ExtrapolationCache*) const (Extrapolator.cxx:2814) ==2073247== by 0xA7CB1665: Trk::Extrapolator::extrapolate(EventContext const&, Trk::ParametersBase<5, Trk::Charged> const&, Trk::Surface const&, Trk::PropDirection, Trk::BoundaryCheck const&, Trk::ParticleHypothesis, Trk::MaterialUpdateMode, Trk::ExtrapolationCache*) const (Extrapolator.cxx:1997) ==2073247== by 0xAEBD5E45: FPGATrackSimSGToRawHitsTool::readTruthTracks(std::vector >&, EventContext const&) (FPGATrackSimSGToRawHitsTool.cxx:688) ==2073247== by 0xAEBDDBC2: FPGATrackSimSGToRawHitsTool::readData(FPGATrackSimEventInputHeader*, EventContext const&) (FPGATrackSimSGToRawHitsTool.cxx:124) ==2073247== by 0xA4963D21: FPGATrackSimLogicalHitsProcessAlg::readInputs(bool&) (FPGATrackSimLogicalHitsProcessAlg.cxx:530) ==2073247== by 0xA4967AB8: FPGATrackSimLogicalHitsProcessAlg::execute() (FPGATrackSimLogicalHitsProcessAlg.cxx:139) ==2073247== by 0x2F7F714B: Gaudi::Algorithm::sysExecute(EventContext const&) (Algorithm.cpp:352) ==2073247== by 0xA1CE9532: AlgTask::operator()() const (AlgTask.h:81) ==2073247== by 0xA1CEA072: tbb::detail::d1::enqueue_task::execute(tbb::detail::d1::execution_data&) (task_arena.h:216) ==2073247== by 0x2C90FEA7: tbb::detail::r1::market::process(rml::job&) (in /cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/sw/lcg/releases/tbb/2021.10.0-2a247/x86_64-el9-gcc13-opt/lib64/libtbb.so.12.10) ==2073247== by 0x2C9120ED: tbb::detail::r1::rml::private_worker::thread_routine(void*) (in /cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/sw/lcg/releases/tbb/2021.10.0-2a247/x86_64-el9-gcc13-opt/lib64/libtbb.so.12.10) ==2073247== by 0x4FA7801: start_thread (in /usr/lib64/libc.so.6) ==2073247== by 0x4F47313: clone (in /usr/lib64/libc.so.6)

cc @jahreda @tbold

Edited by Ioannis Maznas

Merge request reports