cms-sw / cmssw

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

Valgrind errors in Reco ("Conditional jump or move depends on uninitialised value") #42253

Open VinInn opened 1 year ago

VinInn commented 1 year ago

as a side effect of https://github.com/cms-sw/cmssw/issues/40437#issuecomment-1633743889 I found these kind of other errors running Valgrind on reco CMSSW_12_4_14_patch1 100 events from file /store/data/Run2022D/JetMET/RAW/v1/000/357/899/00000/553156f5-b08e-4fcf-9318-a72b73572c76.root

log file in lxplus803: /tmp/innocent/tauCrash/val.log and in /afs/cern.ch/user/i/innocent/public/val.log.xz

[innocent@lxplus803 tauCrash]$ grep -A1 "uninitialised" val.log -c
694
[innocent@lxplus803 tauCrash]$ grep -A1 "uninitialised" val.log  | grep CMSSW -c
110
[innocent@lxplus803 tauCrash]$ grep -A1 "Conditional jump or move depends on uninitialised value" val.log -c
445
[innocent@lxplus803 tauCrash]$ grep -A1 "Conditional jump or move depends on uninitialised value" val.log | grep CMSSW -c
110
[innocent@lxplus803 tauCrash]$ grep -A1 "Conditional jump or move depends on uninitialised value" val.log | grep CMSSW  | grep -v mkfit -c
6

so most of them in mkfit (including some in atan2!) that may been already addressed

[innocent@lxplus803 tauCrash]$ grep -A1 "Conditional jump or move depends on uninitialised value" val.log | grep CMSSW | grep -v mkfit
==1366973==    at 0x80B1974B: cscdqm::StripClusterFinder::RefindMax() (in /cvmfs/cms.cern.ch/el8_amd64_gcc10/cms/cmssw/CMSSW_12_4_14/lib/el8_amd64_gcc10/pluginDQMCSCMonitorModulePlugins.so)
==1366973==    at 0x4E345C4B: ComparatorCodeLUT::run(CSCCLCTDigi&, unsigned int) const (in /cvmfs/cms.cern.ch/el8_amd64_gcc10/cms/cmssw/CMSSW_12_4_14/lib/el8_amd64_gcc10/libL1TriggerCSCTriggerPrimitives.so)
==1366973==    at 0x4E34610B: ComparatorCodeLUT::run(CSCCLCTDigi&, unsigned int) const (in /cvmfs/cms.cern.ch/el8_amd64_gcc10/cms/cmssw/CMSSW_12_4_14/lib/el8_amd64_gcc10/libL1TriggerCSCTriggerPrimitives.so)
==1366973==    at 0x4E3441BE: CSCUpgradeCathodeLCTProcessor::markPreTriggerZone(bool*) const (in /cvmfs/cms.cern.ch/el8_amd64_gcc10/cms/cmssw/CMSSW_12_4_14/lib/el8_amd64_gcc10/libL1TriggerCSCTriggerPrimitives.so)
==1366973==    at 0x421C38B9: l1t::CorrThreeBodyCondition::evaluateCondition(int) const (in /cvmfs/cms.cern.ch/el8_amd64_gcc10/cms/cmssw/CMSSW_12_4_14/lib/el8_amd64_gcc10/libL1TriggerL1TGlobal.so)
==1366973==    at 0x421C38D6: l1t::CorrThreeBodyCondition::evaluateCondition(int) const (in /cvmfs/cms.cern.ch/el8_amd64_gcc10/cms/cmssw/CMSSW_12_4_14/lib/el8_amd64_gcc10/libL1TriggerL1TGlobal.so)
cmsbuild commented 1 year ago

A new Issue was created by @VinInn Vincenzo Innocente.

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

cms-bot commands are listed here

Dr15Jones commented 1 year ago

assign reconstruction

cmsbuild commented 1 year ago

New categories assigned: reconstruction

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

dan131riley commented 1 year ago

so most of them in mkfit (including some in atan2!) that may been already addressed

Hopefully yes, already addressed. MkFit should be valgrind clean as of #40105 in 12_6_0.

VinInn commented 1 year ago

Just to remind that the other occurrences have not been addresses. for instance I'm sure that in https://cmssdt.cern.ch/dxr/CMSSW/source/DQM/CSCMonitorModule/plugins/CSCDQM_StripClusterFinder.cc?from=RefindMax&case=true#257 the protection against iS == 0 should be moved in the outer loop for (int iS = std::max(1,iLS); iS <= iRS; iS++)

VinInn commented 1 year ago

here https://cmssdt.cern.ch/dxr/CMSSW/source/L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeCathodeLCTProcessor.cc?from=markPreTriggerZone#319

I' not sure that all values of the ispretrig_ array are initialized

makortel commented 1 year ago

assign l1,dqm

cmsbuild commented 1 year ago

New categories assigned: dqm,l1

@tjavaid,@epalencia,@micsucmed,@nothingface0,@rvenditti,@emanueleusai,@syuvivida,@aloeliger,@pmandrik you have been requested to review this Pull request/Issue and eventually sign? Thanks