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

Fix memory leak in AlCaHcalHBHEMuonProducer #38177

Merged
merged 1 commit into from
Jun 2, 2022

Conversation

makortel
Copy link
Contributor

@makortel makortel commented Jun 1, 2022

PR description:

This PR provides a minimal fix to a memory leak identified in https://cms-talk.web.cern.ch/t/high-memory-usage-in-promptreco-jobs-for-run-352516/11040/9 (I convinced myself that the objects should be small enough for stack).

PR validation:

Checked in 12_3_4_patch2 that the copy constructor of HcalCondObjectContainer<HcalRespCorr> disappeared from AlCaHcalHBHEMuonProducer (in the profile after 21st event in the test configuration):

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 1, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38177/30327

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 1, 2022

A new Pull Request was created by @makortel (Matti Kortelainen) for master.

It involves the following packages:

  • Calibration/HcalAlCaRecoProducers (alca)

@cmsbuild, @malbouis, @tvami, @yuanchao, @francescobrivio can you please review it and eventually sign? Thanks.
@bsunanda, @mmusich, @tocheng 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

@makortel
Copy link
Contributor Author

makortel commented Jun 1, 2022

@cmsbuild, please test

@@ -281,7 +281,8 @@ void AlCaHcalHBHEMuonProducer::produce(edm::Event& iEvent, const edm::EventSetup
const EcalSeverityLevelAlgo* sevlv = &iSetup.getData(tok_sevlv_);
const CaloTopology* caloTopology = &iSetup.getData(tok_topo_);
const HcalDbService* conditions = &iSetup.getData(tok_dbservice_);
HcalRespCorrs* respCorrs = new HcalRespCorrs(*resp);
HcalRespCorrs respCorrsObj(*resp);
HcalRespCorrs* respCorrs = &respCorrsObj;
respCorrs->setTopo(theHBHETopology);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm puzzled by this pattern of copying an EventSetup product (resp) and then setting a member variable of the copy from another EventSetup product (theHBHETopology). Wouldn't it be better to have the HcalRespCorrs in EventSetup initialized with the topology object (or something similar)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsunanda can you please comment?

@tvami
Copy link
Contributor

tvami commented Jun 1, 2022

type bugfix,hcal

@tvami
Copy link
Contributor

tvami commented Jun 1, 2022

@makortel we should backport this to 12_3_X, 12_4_X right?

@makortel
Copy link
Contributor Author

makortel commented Jun 1, 2022

@makortel we should backport this to 12_3_X, 12_4_X right?

Absolutely, done in #38190 and #38191

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 1, 2022

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-693a01/25173/summary.html
COMMIT: 154ad5e
CMSSW: CMSSW_12_5_X_2022-06-01-1600/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/38177/25173/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: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3649923
  • DQMHistoTests: Total failures: 8
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3649893
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@tvami
Copy link
Contributor

tvami commented Jun 2, 2022

+alca

  • technical fix
  • tests pass

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 2, 2022

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)

@tvami
Copy link
Contributor

tvami commented Jun 2, 2022

urgent

  • bugfix for datataking

@cmsbuild cmsbuild added the urgent label Jun 2, 2022
@qliphy
Copy link
Contributor

qliphy commented Jun 2, 2022

+1

@cmsbuild cmsbuild merged commit 6b83a0f into cms-sw:master Jun 2, 2022
@makortel makortel deleted the fixAlCaHcalHBHEMuonProducer branch June 2, 2022 13:34
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