Repository navigation
[#12301] Fix StackOverflowError with internal parent and CI-friendly revision - #12317
Merged
Merged
Conversation
Member
|
@gnodet please check it, look like master branch stop build after this merge |
gnodet
added a commit
that referenced
this pull request
Jun 19, 2026
This was referenced Jun 19, 2026
gnodet
added a commit
that referenced
this pull request
Jun 19, 2026
…revision (#12323) * [#12301] Fix StackOverflowError with internal parent and CI-friendly revision Re-forward-port the GH-12301 fix from maven-4.0.x to master, using ThreadLocal<Set<Path>> instead of the shared ConcurrentHashMap.newKeySet() that caused a race condition with PhasingExecutor parallel model loading. The original forward-port (#12317) used a shared set to track which POM files were being read by doReadFileModel(). This prevented the StackOverflowError from GH-12301, but caused false cycle detection when parallel threads in loadFilePom() read the same model simultaneously — breaking ConsumerPomBuilderTest.testSimpleConsumer. The fix uses ThreadLocal so each thread tracks only its own call stack, preventing actual recursive cycles within the same thread without blocking legitimate parallel reads across threads. Co-Authored-By: Claude Opus 4.6 <[email protected]> * Refactor: pass activeModelReads through call stack instead of ThreadLocal Replace ThreadLocal<Set<Path>> with a stack-passed Set<Path> parameter threaded through readFileModel() → doReadFileModel() → getEnhancedProperties(). Each readFileModel() entry point creates a fresh HashSet, avoiding any shared mutable state between concurrent model-loading threads. Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
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.
Forward-port of #12314 from
maven-4.0.xtomaster.Fixes StackOverflowError when a project has an internal parent in a subdirectory using CI-friendly
${revision}and a.mvn/root marker (GH-12301).The fix adds cycle detection in
doReadFileModel()via a sharedactiveModelReadsset that tracks paths currently being read, preventing recursive loops between parent resolution and enhanced property resolution.IT adapted for master (no version-range constructor).