RFR: 8371502: serviceability/jvmti/vthread/ThreadListStackTracesTest/ThreadListStackTracesTest.java failing [v2]

Serguei Spitsyn sspitsyn at openjdk.org
Wed Dec 10 08:48:07 UTC 2025


> 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

Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:

  minor correction for sleep

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28734/files
  - new: https://git.openjdk.org/jdk/pull/28734/files/944164a7..38ad6eec

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28734&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28734&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/28734.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28734/head:pull/28734

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


More information about the serviceability-dev mailing list