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
initialise pointers in subclasses of FastTimerService
#40325
initialise pointers in subclasses of FastTimerService
#40325
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40325/33407
|
A new Pull Request was created by @missirol (Marino Missiroli) for master. It involves the following packages:
@cmsbuild, @missirol, @Martin-Grunewald can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-729461/29646/summary.html Comparison SummarySummary:
|
+hlt |
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, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
I encountered a seg-fault from
FastTimerService
when usingenableDQMTransitions = True
(this parameter is set toFalse
by default).A reproducer is below [*]. I think it comes down to initialising the pointers used as members of the subclasses of the service (in particular, those of
PlotsPerElement
).Without initialising them, one can get a crash for example in
cmssw/HLTrigger/Timer/plugins/FastTimerService.cc
Line 477 in 52c0dac
when this is called from
cmssw/HLTrigger/Timer/plugins/FastTimerService.cc
Line 766 in 52c0dac
because
run_
does not book "byLS" histogramscmssw/HLTrigger/Timer/plugins/FastTimerService.cc
Line 719 in 52c0dac
but an (uninitialised) non-zero pointer can pass
cmssw/HLTrigger/Timer/plugins/FastTimerService.cc
Line 476 in 52c0dac
leading to a seg fault one line below.
Initially, I noticed that, if
enableDQM=False
(or ifenableDQM=True
, but theDQMStore
service is not available) andenableDQMTransitions=True
,plots_.book
is not called, butplots_.fill_lumi
andplots_.fill_run
are still attempted, e.g.cmssw/HLTrigger/Timer/plugins/FastTimerService.cc
Line 1071 in 52c0dac
If the pointers are initialised to zero, there will not be a seg fault in any case, but I tried to improve the logic of the
if
clause precedingfill_lumi/run
just for clarity (I initially thought this check was the problem, but this alone does not solve the seg-faults, because of the uninitialised pointers).Merely technical. No changes expected.
[*]
PR validation:
Tests with the reproducer.
If this PR is a backport, please specify the original PR and why you need to backport that PR. If this PR will be backported, please specify to which release cycle the backport is meant for:
N/A (small bugfix, maybe worth backports)