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

Fixing memory bug in GsfElectronProducer #35984

Merged
merged 1 commit into from Nov 4, 2021

Conversation

swagata87
Copy link
Contributor

PR description:

This PR aims to fix a memory bug found by AddressSanitizer and reported in the github issue #35760. The bug was introduced in the context of transitioning PF Egamma ID from BDT to DNN (#35403).

This PR is purely technical in nature; no change in physics is expected.

PR validation:

From CMSSW_12_2_ASAN_X_2021-11-01-2300, ran runTheMatrix.py -l 11634.7. It crashed with AddressSanitizer: heap-buffer-overflow. Then merged this branch, recompiled and ran the same workflow again. No crash happened.

This PR is not a backport.
Backport not needed.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35984/26414

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2021

A new Pull Request was created by @swagata87 (Swagata Mukherjee) for master.

It involves the following packages:

  • RecoEgamma/EgammaElectronProducers (reconstruction)

@jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@Sam-Harper, @jainshilpi, @rovere, @lgray, @sobhatta, @lecriste, @afiqaize, @wrtabb, @varuns23, @ram1123 this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@smuzaffar
Copy link
Contributor

please test

@smuzaffar
Copy link
Contributor

please test for CMSSW_12_2_ASAN_X

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-0df7e7/20247/summary.html
COMMIT: e1dd9c4
CMSSW: CMSSW_12_2_X_2021-11-03-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35984/20247/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 2901890
  • DQMHistoTests: Total failures: 5
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2901862
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 41 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@slava77
Copy link
Contributor

slava77 commented Nov 4, 2021

+reconstruction

for #35984 e1dd9c4

  • code changes are in line with the PR description and the related notes in [ASAN] heap-buffer-overflow in GsfElectronProducer::produce #35760
  • jenkins tests pass and comparisons with the baseline show no (relevant) differences
  • I ran a local diff with comparisons added in reco comparisons: add DNN ID plots for electrons and photons cms-bot#1659 and now find somewhat reasonable values in the e_bkgTau and e_bkgPhoton, which are affected by this PR (as seen in the plots for wf 11634.0, 2021 ttbar MC; here red is for the baseline)
    all_baselineVSjenkins35984-0df7e7-20247_TTbar14TeV2021wf11634p0c_recoGsfElectrons_gedGsfElectrons__RECO_obj_mvaOutput_dnn_e_bkgPhoton
    all_baselineVSjenkins35984-0df7e7-20247_TTbar14TeV2021wf11634p0c_recoGsfElectrons_gedGsfElectrons__RECO_obj_mvaOutput_dnn_e_bkgTau
    The change for bkgTau is a bit more obvious (zero -> some filled values), while bkgPhoton has more random change. Most likely even the tau case baseline having zero is accidental: in both cases the baseline was reading outside of the vector range in RecoEgamma/EgammaElectronProducers/plugins/GsfElectronProducer.cc

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2021

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 will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

perrotta commented Nov 4, 2021

+1

  • bug fix

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-0df7e7/20248/summary.html
COMMIT: e1dd9c4
CMSSW: CMSSW_12_2_ASAN_X_2021-11-03-2300/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35984/20248/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • Reco comparison had 71 failed jobs
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 2901890
  • DQMHistoTests: Total failures: 960509
  • DQMHistoTests: Total nulls: 82
  • DQMHistoTests: Total successes: 1941277
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.209 KiB( 41 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): 0.117 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 136.793 ): -0.031 KiB JetMET/SUSYDQM
  • DQMHistoSizes: changed ( 136.874 ): -0.012 KiB JetMET/SUSYDQM
  • DQMHistoSizes: changed ( 250202.181 ): -0.533 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 25202.0 ): 0.246 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 177 log files, 37 edm output root files, 42 DQM output files

cmsbuild added a commit that referenced this pull request Nov 12, 2021
fix memory bug in DNN-based ID (packport of #35984)
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

5 participants