-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38177/30327
|
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages:
@cmsbuild, @malbouis, @tvami, @yuanchao, @francescobrivio can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@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); |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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?
type bugfix,hcal |
@makortel we should backport this to 12_3_X, 12_4_X right? |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-693a01/25173/summary.html Comparison SummarySummary:
|
+alca
|
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) |
urgent
|
+1 |
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 fromAlCaHcalHBHEMuonProducer
(in the profile after 21st event in the test configuration):