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

Add protection for pathologic cases in MuonBeamspotConstraintValueMapProducer #45243

Merged
merged 2 commits into from
Jun 29, 2024

Conversation

namapane
Copy link
Contributor

PR description:

Address #45189.
A description of the pathologic case being addressed is given here.

The fix consists in catching the exception and moving on with the fall-back case (no beamspot update).

PR validation:

Checked that it solved the exception in the event reported in #45189 .

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 17, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45243/40622

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @namapane for master.

It involves the following packages:

  • RecoMuon/GlobalTrackingTools (reconstruction)

@mandrenguyen, @jfernan2, @cmsbuild can you please review it and eventually sign? Thanks.
@missirol, @bellan, @amagitte, @abbiendi, @jhgoh, @Fedespring, @HuguesBrun, @trocino, @rociovilar, @CeliaFernandez, @JanFSchulte, @cericeci, @andrea21z this is something you requested to watch as well.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@mandrenguyen
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ed651c/39923/summary.html
COMMIT: 7e5016a
CMSSW: CMSSW_14_1_X_2024-06-16-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45243/39923/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3345018
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3344995
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@mandrenguyen
Copy link
Contributor

+1

@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. @rappoccio, @sextonkennedy, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@antoniovilela
Copy link
Contributor

@namapane @mandrenguyen @cms-sw/core-l2
Hi Nicola, (Cc Core)
Can the exception be handled by the Framework?
In any case, I guess we want to avoid a catch all?
Thanks.

@namapane
Copy link
Contributor Author

Hi @antoniovilela,
As described in the issue [link] I tried to track where the exception comes from, and that is deep inside general KVF code. I would not introduce a change in behaviour such a place since that may have side effects in a lot of other contexts.
Or are you thinking of something different?

Regarding catch all: for what this code is concerned, whatever issue arises with constraining a track with the PV (which is already a fall-back case) simply means that we don't want to rely on that PV for a constrain This would make sense whatever exception may possibly be thrown within SingleTrackVertexConstraint::constrain.
If you prefer to restrict to only this 'VertexException' it can be done, but I don't see why other exceptions that may possibly be thrown should be treated differently...

chi2s.push_back(std::get<2>(btft));
tbd = false;
}
} catch (...) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The CMS software documentation says to avoid catch(...) . Please catch the appropriate type as a memory error would be caught and ignored with the present use of catch(...)

@antoniovilela
Copy link
Contributor

Hi @antoniovilela, As described in the issue [link] I tried to track where the exception comes from, and that is deep inside general KVF code. I would not introduce a change in behaviour such a place since that may have side effects in a lot of other contexts. Or are you thinking of something different?

Regarding catch all: for what this code is concerned, whatever issue arises with constraining a track with the PV (which is already a fall-back case) simply means that we don't want to rely on that PV for a constrain This would make sense whatever exception may possibly be thrown within SingleTrackVertexConstraint::constrain. If you prefer to restrict to only this 'VertexException' it can be done, but I don't see why other exceptions that may possibly be thrown should be treated differently...

@smuzaffar
Hi Nicola,
Maybe Shahzad can comment on the recommendation/policy from the Core side, but I would restrict to the known exception(s), or at least to cms::Exception?

@Dr15Jones
Copy link
Contributor

With @makortel on vacation, my comment can be interpreted as from Core

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45243/40682

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

Pull request #45243 was updated. @jfernan2, @mandrenguyen, @cmsbuild can you please check and sign again.

@mandrenguyen
Copy link
Contributor

I leave it to @cms-sw/core-l2 @antoniovilela @Dr15Jones to comment whether they are ok with this solution

@antoniovilela
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ed651c/40107/summary.html
COMMIT: 988554b
CMSSW: CMSSW_14_1_X_2024-06-26-1200/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45243/40107/install.sh to create a dev area with all the needed externals and cmssw changes.

  • DAS Queries: The DAS query tests failed, see the summary page for details.

Comparison Summary

Summary:

  • You potentially added 5 lines to the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3345088
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3345068
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@mandrenguyen
Copy link
Contributor

+1

@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 be automatically merged.

@cmsbuild cmsbuild merged commit b605a4d into cms-sw:master Jun 29, 2024
11 checks passed
@namapane
Copy link
Contributor Author

namapane commented Jul 1, 2024

I think a backport to 14_0_X would make sense; should I proceed?

@mmusich
Copy link
Contributor

mmusich commented Jul 1, 2024

I think a backport to 14_0_X would make sense; should I proceed?

I think so. Incidentally it seems that there won't be a full release for a while (see e.g joint ops gdoc ) perhaps should be backported also in the CMSSW_14_0_9_patchX branch.

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.

6 participants