On Wed, 10 Dec 2025 06:00:47 GMT, Serguei Spitsyn <[email protected]> wrote:

> This fixes the test which is unreliable and fails intermittently from time to 
> time.
> The test was failing in the method `checkReentrantLock()` when comparing the 
> expected state with result from `vt.getState()`. The issue is that the call 
> to `ThreadListStackTracesTest.reentrantLock.lock()` in a 
> `ReentrantLockTestTask` can reach waiting state on some class loading but not 
> on the ReentrantLock. Please see the first comment for test sources details.
> The fix is to add a big enough sleep before call to the checkStates().
> 
> Testing:
>  - submitted about thousands of mach5 runs of the `ThreadListStackTracesTest` 
> test runs before and after the fix
>  - TBD: submit mach5 tiers 1-3 to be completely safe

This pull request has now been integrated.

Changeset: c46bed72
Author:    Serguei Spitsyn <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/c46bed7292aad21b8cf9defcccac43c010a1f116
Stats:     9 lines in 1 file changed: 7 ins; 0 del; 2 mod

8371502: 
serviceability/jvmti/vthread/ThreadListStackTracesTest/ThreadListStackTracesTest.java
 failing

Reviewed-by: lmesnik, amenkov

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

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

Reply via email to