[geom] Fix stale thread-local navigators across manager lifetimes - #22937
Open
agheata wants to merge 1 commit into
Open
[geom] Fix stale thread-local navigators across manager lifetimes#22937agheata wants to merge 1 commit into
agheata wants to merge 1 commit into
Conversation
Invalidate cached navigator and thread-ID state across geometry manager lifetimes while keeping navigator selection local to each worker thread. Synchronize shared navigator-map lookups and add regression coverage for concurrent navigator creation and manager recreation after parallel overlap checks.
Test Results 23 files 23 suites 3d 14h 24m 10s ⏱️ For more details on these failures, see this check. Results for commit d6d85f1. |
dpiparo
self-requested a review
July 28, 2026 04:48
dpiparo
approved these changes
Jul 28, 2026
Member
|
Thanks. Please merge at your earliest convenience and backport to 6.40. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull request:
Repeatedly executing a geometry macro that creates a
TGeoManager, callsCheckOverlaps(), and draws the geometry can crash when interacting with thecanvas.
The parallel overlap check creates navigators for its worker threads.
TGeoManager::GetCurrentNavigator()caches these pointers in thread-localstorage. Deleting the manager destroys the navigators, but the caches belonging
to persistent worker threads remain alive. When these workers are reused for a
new geometry, they can return a dangling navigator from the previous manager.
Changes or fixes:
manager and an atomic geometry-state generation.
including during manager teardown.
preserving independent navigators created concurrently by different threads.
thread_localinitialization flags in the paralleloverlap checker with a check against the current manager.
gtest-geom-manager-lifetime, covering:CheckOverlaps()call.There are no public API, class-layout, dictionary, or I/O changes.
Checklist:
This PR fixes the issue reported in the forum: https://root-forum.cern.ch/t/crash-in-geometry-after-checkoverlaps/64954