This is newly integrated test times out because it has a race in in the Test #A.1 and #A.2. The main root cause is a print statement which can case target virtual thread to unpark and unmount. This causes that the `StopThreads` unexpectedly fails with the `JVMTI_ERROR_OPAQUE_FRAME` error code. The target thread can be in some other unexpected states if JVMTI `StopThread` is called before the target thread method `A()` reached the synchronized statement.
The fix is to replace the `ensureStarted()` with the `ensureAtPointA()`. The fix also includes some simplifications related to clearing the target thread interrupt status. Testing: Hundreds of mach5 runs of `serviceability/jvmti/vthread` tests which include the fixed `StopThreadTest`. TBD: To run mack5 tiers1-3. ------------- Commit messages: - 8307968: serviceability/jvmti/vthread/StopThreadTest/StopThreadTest.java timed out Changes: https://git.openjdk.org/jdk/pull/13969/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13969&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8307968 Stats: 20 lines in 1 file changed: 3 ins; 10 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/13969.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13969/head:pull/13969 PR: https://git.openjdk.org/jdk/pull/13969