RFR: 8367026: Reorder the timeout failure handler commands to have jstack run before the rest
Jaikiran Pai
jpai at openjdk.org
Tue Sep 30 11:48:05 UTC 2025
Can I please get a review of this change to a jtreg failure handler configured in the JDK?
The change proposes to generate a thread dump much sooner than previously whenever a test times out. This should thus capture a much more accurate state of the test process when the test is considered timed out.
Due to the recent changes in the default timeout factor, we have noticed some tests which timeout and the jtreg failure handler actions start execution. While those are being executed the test sometimes completes. So by the time the "jstack" failure handler action is executed (can be several seconds later), the test's state will no longer be accurate.
The change here generates a thread dump using jstack as the first action in the set of failure handler actions. It does it only once and then moves to the rest of the actions, one of which subsequent "jstack" which generates thread dumps more than once.
I have verified that this change works as expected when a test times out. The action is named "thread_dump" instead of just reusing the "jstack" name because the current HTML rendering of the processes.html runs into trouble if there are more than one action with the same name.
I wanted to reorder some of the other commands in that set, but it causes some trouble in the rendering of the HTML and would require some changes to that part. So I decided to keep this simple and have it done sooner to help investigating timeout failures in our CI.
-------------
Commit messages:
- 8367026: Reorder the timeout failure handler commands to have jstack run before the rest
Changes: https://git.openjdk.org/jdk/pull/27574/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27574&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8367026
Stats: 12 lines in 1 file changed: 10 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/27574.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27574/head:pull/27574
PR: https://git.openjdk.org/jdk/pull/27574
More information about the core-libs-dev
mailing list