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

initialise pointers in subclasses of FastTimerService #40325

Merged

Conversation

missirol
Copy link
Contributor

@missirol missirol commented Dec 15, 2022

PR description:

I encountered a seg-fault from FastTimerService when using enableDQMTransitions = True (this parameter is set to False 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

time_thread_byls_->Fill(lumisection, ms(data.time_thread));

when this is called from

because run_ does not book "byLS" histograms
run_.book(booker, "run", "Run transtions", event_ranges, lumisections, false);

but an (uninitialised) non-zero pointer can pass
if (time_thread_byls_)

leading to a seg fault one line below.

Initially, I noticed that, if enableDQM=False (or if enableDQM=True, but the DQMStore service is not available) and enableDQMTransitions=True, plots_.book is not called, but plots_.fill_lumi and plots_.fill_run are still attempted, e.g.

plots_->fill_lumi(lumi_transition_[index], gc.luminosityBlockID().luminosityBlock());

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 preceding fill_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.

[*]

import FWCore.ParameterSet.Config as cms

# Process
process = cms.Process('DQM')

process.options.numberOfThreads = 4
process.options.numberOfStreams = 0
process.options.numberOfConcurrentLuminosityBlocks = 2

process.maxEvents.input = 200

# Source (EDM input)
process.source = cms.Source('PoolSource',
  fileNames = cms.untracked.vstring('/store/data/Run2022B/HLTPhysics/RAW/v1/000/355/456/00000/69b26b27-4bd1-4524-bc18-45f7b9b5e076.root')
)

process.load('DQMServices.Core.DQMStore_cfi')

# FastTimerService (Service)
from HLTrigger.Timer.FastTimerService_cfi import FastTimerService as _FastTimerService
process.FastTimerService = _FastTimerService.clone(
  dqmTimeRange = 2000,
  enableDQM = True,
  enableDQMTransitions = True,
  enableDQMbyLumiSection = True,
  enableDQMbyModule = True,
  enableDQMbyPath = True,
  enableDQMbyProcesses = True
)

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)

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40325/33407

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @missirol (Marino Missiroli) for master.

It involves the following packages:

  • HLTrigger/Timer (hlt)

@cmsbuild, @missirol, @Martin-Grunewald can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @silviodonato, @fwyzard this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@missirol
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-729461/29646/summary.html
COMMIT: c5af5ac
CMSSW: CMSSW_13_0_X_2022-12-15-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40325/29646/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: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3557521
  • DQMHistoTests: Total failures: 160
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3557339
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 211 log files, 162 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@missirol
Copy link
Contributor Author

+hlt

@cmsbuild
Copy link
Contributor

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)

@perrotta
Copy link
Contributor

+1

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

3 participants