cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.08k stars 4.31k forks source link

MuonErrorMatrix uninitialized member data #35656

Open dan131riley opened 3 years ago

dan131riley commented 3 years ago

RecoMuon/TrackingTools/MuonErrorMatrix apparently assumes that its member data are initialized to zero, which in some cases can cause a crash in MuonErrorMatrix::close() when a job terminates early (stack trace below, can be reproduced by a DIGI:pdigi_valid,L1,DIGI2RAW,HLT step job with an empty pileup file list.

MuonErrorMatrix should explicitly initialize its member data, most simply via initializers like

  TProfile3D* theData[15] = { nullptr };

Mattermost discussion: https://mattermost.web.cern.ch/cms-o-and-c/pl/uyyq3qaprjn3jm6yjxfpehm81y

Example stack trace:

#4  <signal handler called>
#5  0x00002ba238a85cf0 in MuonErrorMatrix::close() () from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_1/lib/slc7_amd64_gcc700/libRecoMuonTrackingTools.so
#6  0x00002ba238a85d7d in MuonErrorMatrix::~MuonErrorMatrix() () from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_1/lib/slc7_amd64_gcc700/libRecoMuonTrackingTools.so
#7  0x00002ba25bad1c36 in TSGFromPropagation::~TSGFromPropagation() () from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_1/lib/slc7_amd64_gcc700/pluginRecoMuonTrackerSeedGeneratorPlugins.so
#8  0x00002ba25bad1d69 in TSGFromPropagation::~TSGFromPropagation() () from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_1/lib/slc7_amd64_gcc700/pluginRecoMuonTrackerSeedGeneratorPlugins.so
#9  0x00002ba25baba04a in CompositeTSG::~CompositeTSG() () from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_1/lib/slc7_amd64_gcc700/pluginRecoMuonTrackerSeedGeneratorPlugins.so
#10 0x00002ba25bab76d0 in DualByL2TSG::~DualByL2TSG() () from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_1/lib/slc7_amd64_gcc700/pluginRecoMuonTrackerSeedGeneratorPlugins.so
#11 0x00002ba25badd342 in TSGFromL2Muon::~TSGFromL2Muon() () from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_1/lib/slc7_amd64_gcc700/pluginRecoMuonTrackerSeedGeneratorPlugins.so
#12 0x00002ba25badd3ce in TSGFromL2Muon::~TSGFromL2Muon() () from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_6_1/lib/slc7_amd64_gcc700/pluginRecoMuonTrackerSeedGeneratorPlugins.so
cmsbuild commented 3 years ago

A new Issue was created by @dan131riley Dan Riley.

@Dr15Jones, @perrotta, @dpiparo, @makortel, @smuzaffar, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

makortel commented 3 years ago

assign reconstruction

cmsbuild commented 3 years ago

New categories assigned: reconstruction

@slava77,@jpata you have been requested to review this Pull request/Issue and eventually sign? Thanks

jpata commented 2 years ago

type muon