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

Added protection from multiple creation of geometry #38640

Merged
merged 4 commits into from
Jul 9, 2022

Conversation

civanch
Copy link
Contributor

@civanch civanch commented Jul 7, 2022

PR description:

There are the crash discussed in #38624, which happens for alca run. The problem happens because in this run geometry was created twice. The fix is done in two places:

  1. inside SiPixelLorentzAnglePCLHarvester value of the magnetic field is accessed just after access to the EventSetup and stored in local class member. Likely this change has no effect but logically is more safe.
  2. inside DD4hep_VolumeBasedMagneticFieldESProducerFromDB a new class member added - pointer to geometry. Added a check, which guaranteed that the geometry is created only once.

PR validation:

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:

should be also in 12_3 and 12_4

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38640/30928

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2022

A new Pull Request was created by @civanch (Vladimir Ivantchenko) for master.

It involves the following packages:

  • CalibTracker/SiPixelLorentzAngle (alca)

@malbouis, @yuanchao, @cmsbuild, @francescobrivio, @ChrisMisan, @tvami can you please review it and eventually sign? Thanks.
@tocheng, @OzAmram, @ferencek, @mmusich, @dkotlins, @tvami this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@civanch
Copy link
Contributor Author

civanch commented Jul 7, 2022

please test

@mmusich
Copy link
Contributor

mmusich commented Jul 7, 2022

assign trk-dpg

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 7, 2022

New categories assigned: trk-dpg

@connorpa,@mmusich,@tsusa you have been requested to review this Pull request/Issue and eventually sign? Thanks

@mmusich
Copy link
Contributor

mmusich commented Jul 7, 2022

-1

@tvami
Copy link
Contributor

tvami commented Jul 7, 2022

@cmsbuild , please abort

@tvami
Copy link
Contributor

tvami commented Jul 7, 2022

-1

  • see discussion in the 12_3_X backport

@mmusich
Copy link
Contributor

mmusich commented Jul 7, 2022

-1

I mean the change per se is OK, though I would prefer to push it together with some other clean-up later (once the main issue is solved)

@tvami
Copy link
Contributor

tvami commented Jul 8, 2022

type bug-fix

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 8, 2022

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ff942f/26079/summary.html
COMMIT: 9d3abc4
CMSSW: CMSSW_12_5_X_2022-07-07-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/38640/26079/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: 10 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3654999
  • DQMHistoTests: Total failures: 20
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3654957
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@mmusich
Copy link
Contributor

mmusich commented Jul 8, 2022

+1

@tvami
Copy link
Contributor

tvami commented Jul 8, 2022

+alca

@clacaputo
Copy link
Contributor

+reconstruction

@@ -73,6 +74,8 @@ namespace magneticfield {
edm::ESGetToken<MagFieldConfig, IdealMagneticFieldRecord> chosenConfigToken_;

edm::ESGetToken<FileBlob, MFGeometryFileRcd> mayConsumeBlobToken_;
cms::DDDetector* detector_{nullptr};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cms::DDDetector* detector_{nullptr};
std::unique_ptr<cms::DDDetector> detector_{nullptr};

unique_ptr is preferred over a bare pointer. Then the delete in the destructor is not needed.

@tvami
Copy link
Contributor

tvami commented Jul 9, 2022

@cms-sw/orp-l2 can we merge this for 1100 IB?
Obviously there is a lot of improvements to be done both suggestions from Nicola and Carl, but these are code improvements, worries for exotic cases, so I think for 12_4_2 12_4_3 we can go on with this PR (well it's backport oc), and then whenever the perfect solutions comes it comes. What do you think?

@perrotta
Copy link
Contributor

perrotta commented Jul 9, 2022

@cms-sw/orp-l2 can we merge this for 1100 IB? Obviously there is a lot of improvements to be done both suggestions from Nicola and Carl, but these are code improvements, worries for exotic cases, so I think for 12_4_2 we can go on with this PR (well it's backport oc), and then whenever the perfect solutions comes it comes. What do you think?

FYI: CMSSW_12_4_2-was cut two days ago, see e.g. https://cms-talk.web.cern.ch/t/production-release-cmssw-12-4-2-now-available/12579
This may be entitled to enter 12_4_next though

@tvami
Copy link
Contributor

tvami commented Jul 9, 2022

yes, too many versions, I meant 12_4_3 or 12_4_2_patch1

@tvami
Copy link
Contributor

tvami commented Jul 9, 2022

Anyway @perrotta do didnt seem to address my comments. What's the plan given that the PR is fully signed?

@perrotta
Copy link
Contributor

perrotta commented Jul 9, 2022

Anyway @perrotta do didnt seem to address my comments. What's the plan given that the PR is fully signed?

The plan must take into account that today is Saturday, ICHEP is ongoing, and we already rushed to create quite a few releases in the past days.
Besides that, I conceptually don't see possible counterindications in merging this patched protection, also in the current data taking cycles. Let me find some time to go through the whole thread and the code itself, and it will likely get merged soon.

@perrotta
Copy link
Contributor

perrotta commented Jul 9, 2022

+1

@cmsbuild cmsbuild merged commit c79eb9f into cms-sw:master Jul 9, 2022
@tvami
Copy link
Contributor

tvami commented Jul 9, 2022

Thanks Andrea for merging this (on a Sat and during ICHEP ) -- much appreciated!

@@ -187,9 +194,10 @@ std::unique_ptr<MagneticField> DD4hep_VolumeBasedMagneticFieldESProducerFromDB::
"<MaterialSection label=\"materials.xml\"><ElementaryMaterial name=\"materials:Vacuum\" density=\"1e-13*mg/cm3\" "
"symbol=\" \" atomicWeight=\"1*g/mole\" atomicNumber=\"1\"/></MaterialSection>");

auto ddet = make_unique<cms::DDDetector>("cmsMagneticField:MAGF", sblob, true);
if (nullptr == detector_)
Copy link
Contributor

Choose a reason for hiding this comment

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

This simple test seems like a bad idea. We also need to be sure this is the correct geometry to use as well.

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.

9 participants