Skip to content
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

Fixed memory leak in MultipleScatteringX0Data #18985

Merged

Conversation

Dr15Jones
Copy link
Contributor

The TH2F was being leaked. Since the TH2F is not owned by the TFile
there is no reason to keep the TFile around.

The TH2F was being leaked. Since the TH2F is not owned by the TFile
there is no reason to keep the TFile around.
@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

RecoTracker/TkMSParametrization

@perrotta, @cmsbuild, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@ghellwig, @makortel, @felicepantaleo, @GiacomoSguazzoni, @rovere, @VinInn, @mschrode, @gpetruc, @ebrondol, @dgulhan this is something you requested to watch as well.
@davidlange6 you are the release manager for this.

cms-bot commands are listed here

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 28, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/20155/console Started: 2017/05/28 16:03

@Dr15Jones
Copy link
Contributor Author

This was found via valgrind

==2359== 1,229,784 (3,096 direct, 1,226,688 indirect) bytes in 3 blocks are definitely lost in loss record 87,917 of 87,995
==2359==    at 0x40281C6: operator new(unsigned long) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/external/valgrind/3.12.0-oenich/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2359==    by 0x5841C08: TStorage::ObjectAlloc(unsigned long) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.08.07/lib/libCore.so)
==2359==    by 0xC71C8F9: ROOT::new_TH2F(void*) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.08.07/lib/libHist.so)
==2359==    by 0x58BA6E0: TClass::New(TClass::ENewType, bool) const (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.08.07/lib/libCore.so)
==2359==    by 0x547584C: TKey::ReadObj() (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.08.07/lib/libRIO.so)
==2359==    by 0x31C37F5E: MultipleScatteringX0Data::MultipleScatteringX0Data() (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc530/libRecoTrackerTkMSParametrization.so)
==2359==    by 0x31C3B191: MSLayersKeeperX0AtEta::init(edm::EventSetup const&) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc530/libRecoTrackerTkMSParametrization.so)
==2359==    by 0x31C3F8F0: MSLayersKeeperX0Averaged::init(edm::EventSetup const&) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc530/libRecoTrackerTkMSParametrization.so)
==2359==    by 0x31C3F364: MultipleScatteringParametrisation::initKeepers(edm::EventSetup const&) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc530/libRecoTrackerTkMSParametrization.so)
==2359==    by 0x31C3F3AE: MultipleScatteringParametrisation::init(DetLayer const*, edm::EventSetup const&, MultipleScatteringParametrisation::X0Source) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc5
30/libRecoTrackerTkMSParametrization.so)
==2359==    by 0x31BF6A2B: InnerDeltaPhi::InnerDeltaPhi(DetLayer const&, DetLayer const&, TrackingRegion const&, edm::EventSetup const&, bool, float) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc530/
libRecoTrackerTkHitPairs.so)
==2359==    by 0x31C0659C: HitPairGeneratorFromLayerPair::doublets(TrackingRegion const&, DetLayer const&, DetLayer const&, RecHitsSortedInPhi const&, RecHitsSortedInPhi const&, edm::EventSetup const&, unsigned int, HitDoublets&) (in /
cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc530/libRecoTrackerTkHitPairs.so)
==2359==    by 0x31C08651: HitPairGeneratorFromLayerPair::doublets(TrackingRegion const&, edm::Event const&, edm::EventSetup const&, SeedingLayerSetsHits::SeedingLayer const&, SeedingLayerSetsHits::SeedingLayer const&, LayerHitMapCache
&) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc530/libRecoTrackerTkHitPairs.so)
==2359==    by 0x64BE79B2: (anonymous namespace)::Impl<(anonymous namespace)::DoNothing, (anonymous namespace)::ImplIntermediateHitDoublets>::produce(SeedingLayerSetsHits const&, edm::OwnVector<TrackingRegion, edm::ClonePolicy<Tracking
Region> > const&, bool, edm::Event&, edm::EventSetup const&) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc530/pluginRecoTrackerTkHitPairsPlugins.so)
==2359==    by 0x64BE738B: HitPairEDProducer::produce(edm::Event&, edm::EventSetup const&) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_9_2_0/lib/slc6_amd64_gcc530/pluginRecoTrackerTkHitPairsPlugins.so)
==2359==    by 0x4C52A32: edm::stream::EDProducerAdaptorBase::doEvent(edm::EventPrincipal const&, edm::EventSetup const&, edm::ActivityRegistry*, edm::ModuleCallingContext const*) (in /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSS
W_9_2_0/lib/slc6_amd64_gcc530/libFWCoreFramework.so)

@slava77
Copy link
Contributor

slava77 commented May 28, 2017 via email

@Dr15Jones
Copy link
Contributor Author

I think it is even more confusing. I believe one of these is created per thread becuase it is made by something using a thread_local.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-18985/20155/summary.html

Comparison Summary:

  • You potentially added 21 lines to the logs
  • Reco comparison results: 1760 differences found in the comparisons
  • DQMHistoTests: Total files compared: 24
  • DQMHistoTests: Total histograms compared: 1833578
  • DQMHistoTests: Total failures: 41824
  • DQMHistoTests: Total nulls: 35
  • DQMHistoTests: Total successes: 1791539
  • DQMHistoTests: Total skipped: 180
  • DQMHistoTests: Total Missing objects: 0
  • Checked 98 log files, 14 edm output root files, 24 DQM output files

@slava77
Copy link
Contributor

slava77 commented May 31, 2017

@cmsbuild please test

to get cleaner comparisons

@cmsbuild
Copy link
Contributor

cmsbuild commented May 31, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/20263/console Started: 2017/05/31 20:31

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-18985/20263/summary.html

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /build/cmsbld/jenkins-workarea/workspace/compare-root-files-short-matrix/results/JR-comparison/PR-18985/20434.0_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D10_GenSimHLBeamSpotFull14+DigiFullTrigger_2023D10+RecoFullGlobal_2023D10+HARVESTFullGlobal_2023D10
  • /build/cmsbld/jenkins-workarea/workspace/compare-root-files-short-matrix/results/JR-comparison/PR-18985/23234.0_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D18_GenSimHLBeamSpotFull14+DigiFull_2023D18+RecoFullGlobal_2023D18+HARVESTFullGlobal_2023D18
  • /build/cmsbld/jenkins-workarea/workspace/compare-root-files-short-matrix/results/JR-comparison/PR-18985/27434.0_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D17_GenSimHLBeamSpotFull14+DigiFull_2023D17+RecoFullGlobal_2023D17+HARVESTFullGlobal_2023D17

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1656 differences found in the comparisons
  • DQMHistoTests: Total files compared: 23
  • DQMHistoTests: Total histograms compared: 1786106
  • DQMHistoTests: Total failures: 41881
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1744052
  • DQMHistoTests: Total skipped: 173
  • DQMHistoTests: Total Missing objects: 0
  • Checked 94 log files, 14 edm output root files, 23 DQM output files

@slava77
Copy link
Contributor

slava77 commented Jun 1, 2017

+1

for #18985 55b3586

  • technical; as described.
  • jenkins tests pass

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 1, 2017

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit e958772 into cms-sw:master Jun 1, 2017
@Dr15Jones Dr15Jones deleted the fixMemoryLeakMultipleScatteringX0Data branch June 15, 2017 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants