-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[12_3_X] Fix ThroughputServiceClient.cc unsigned variables overflow #38287
Conversation
A new Pull Request was created by @pmandrik for CMSSW_12_3_X. It involves the following packages:
@cmsbuild, @missirol, @Martin-Grunewald can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
Will there be a 12_4_X backport? |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9bec22/25363/summary.html Comparison SummarySummary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_12_3_X IBs (tests are also fine) and once validation in the development release cycle CMSSW_12_5_X is complete. 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) |
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 left a couple of suggestions that I think would have made the implementation simpler.
No need to apply them, since the PR in master
has already been merged.
Thanks for the fix.
int64_t first = sourced->FindFirstBinAbove(0.); | ||
int64_t last = sourced->FindLastBinAbove(0.); |
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.
int64_t first = sourced->FindFirstBinAbove(0.); | |
int64_t last = sourced->FindLastBinAbove(0.); | |
auto first = sourced->FindFirstBinAbove(0.); | |
auto last = sourced->FindLastBinAbove(0.); |
booker.setCurrentFolder(folder); | ||
// (re)book and fill .../average_sourced | ||
average = booker.book1D("average_sourced", "Throughput (sourced events)", (int)width, avg_min, avg_max)->getTH1F(); | ||
for (unsigned int i = first; i <= last; ++i) | ||
for (int64_t i = std::max(first, (int64_t)0); i <= last; ++i) |
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.
for (int64_t i = std::max(first, (int64_t)0); i <= last; ++i) | |
if(first >= 0) | |
for (auto i = first; i <= last; ++i) |
@@ -135,7 +135,7 @@ void ThroughputServiceClient::fillSummaryPlots(DQMStore::IBooker &booker, DQMSto | |||
booker.setCurrentFolder(folder); | |||
// (re)book and fill .../average_retired | |||
average = booker.book1D("average_retired", "Throughput (retired events)", (int)width, avg_min, avg_max)->getTH1F(); | |||
for (unsigned int i = first; i <= last; ++i) | |||
for (int64_t i = std::max(first, (int64_t)0); i <= last; ++i) |
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.
for (int64_t i = std::max(first, (int64_t)0); i <= last; ++i) | |
if(first >= 0) | |
for (auto i = first; i <= last; ++i) |
type bugfix |
+1 |
PR description:
TH1F FindFirstBinAbove() can return -1 [0] when hist is empty overflowing unsigned variables uint64_t first and uint64_t last. The next two loops for (unsigned int i = first; i <= last; ++i) became very long and hlt_clientPB DQM client is not able to exit in time when the run is ended. Affect Online DQM operation.
PR validation:
[0] https://root.cern.ch/doc/master/classTH1.html#a63960594f84aea92e5fa2d5129b49007
if this PR is a backport please specify the original PR and why you need to backport that PR:
backport of #38282