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
Protect against concurrent access of DD4Hep Detector #33236
Conversation
Under the hood, DD4Hep uses ROOT's global gGeoManager and therefore can not support concurrent changes. - usesResources declaration avoids ES modules from running at same time - Make sure to reset gGeoManager pointer to avoid accidental reuse.
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33236/21686
|
A new Pull Request was created by @Dr15Jones (Chris Jones) for master. It involves the following packages: DetectorDescription/DDCMS @perrotta, @smuzaffar, @civanch, @Dr15Jones, @makortel, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @slava77, @jpata 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-e1281c/13644/summary.html Comparison SummarySummary:
|
Thanks, @Dr15Jones ! |
+1 |
Markus Frank has concerns about modifying |
@cvuosalo on a practical point, after many repeat runnings of the failed job I have yet to see a crash after this modification. If access to gGeoManager were necessary for our code after the construction phase, I would have expected a crash to have occured. |
Hi all, few points to have in mind:
May be we should not even try to force these geometry builders be so granular? Why not to have 1 module, which will call these modules sequentially and, if needed, provide everything as a parameters when call. gGeoManager may be called in one place only, not in each module. |
@civanch wrote
This does not appear to be the case. The RECO geometry is coming from XML but the MF is coming from the module that says it gets it from the DB. |
So with my change, I see three instances of TGeoManager being created
|
So I did a further test. in the |
+1 |
I think this PR is a step forward (to fix the crashes). If we need to adjust the use of |
Resolves cms-sw/framework-team#92 |
@Dr15Jones Just a clarification about the magnetic field geometry building: The magnetic field geometry file record is fetched from the DB, but it is an XML file blob that has to be parsed to build the magnetic field. It is unlike the reco geometry that we store in the DB that has already been parsed and processed. |
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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
Under the hood, DD4Hep uses ROOT's global gGeoManager and therefore
can not support concurrent changes.
PR validation: