Repository navigation
[SUREFIRE-3459] Allow opting out of StackWalker stack capture - #3493
Merged
olamy merged 1 commit intoOct 3, 2026
Merged
Conversation
Use the existing Thread.getStackTrace fallback when the test JVM sets surefire.stackTrace.disableStackWalker=true. Keep stack capture enabled and StackWalker as the default, including when a security manager denies property access. Document the argLine setting and cover both capture paths. Signed-off-by: goutamadwant <workwithgoutam@gmail.com>
Member
|
sure we can add some workaround but the root cause seems to be a JDK bug though |
|
@olamy Please assign appropriate label to PR according to the type of change. |
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.
Summary
Surefire 3.6.0 uses StackWalker for stack capture on Java 9+. Issue #3459 reports that three RocksDB FFM callback test classes terminate their forked JVMs on Windows x64 with JDK 25. The downstream workaround sets
stackTraceMaxFramesto0, which also removes stack capture.This change adds the JVM property
surefire.stackTrace.disableStackWalker=trueto select the existingThread.getStackTrace()path while retaining stack capture. StackWalker remains the default. For forked tests, the property can be appended toargLine; the documentation includes an example. Regression tests cover the default and opt-out paths.Related to #3459.
Validation
mvn clean installpassed locally on JDK 21.mvn clean installpassed in a Linux arm64 JDK 25 container.ProcessCheckerTest.shouldHavePidAtBeginPID assertion: https://github.com/goutamadwant/maven-surefire/actions/runs/36345975232Contribution checklist
mvn clean installpassed.mvn -Prun-its clean installpassed.