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.

Marked as reviewed by lmesnik (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/27574#pullrequestreview-3285362832

Reply via email to