On Tue, 30 Sep 2025 11:37:37 GMT, Jaikiran Pai <[email protected]> wrote:

> 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.

This pull request has now been integrated.

Changeset: 17d8fa8e
Author:    Jaikiran Pai <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/17d8fa8e421db67027c9e7d2ddd634ff0b897cb6
Stats:     12 lines in 1 file changed: 10 ins; 0 del; 2 mod

8367026: Reorder the timeout failure handler commands to have jstack run before 
the rest

Reviewed-by: erikj, lmesnik

-------------

PR: https://git.openjdk.org/jdk/pull/27574

Reply via email to