RFR: 8372769: Test runtime/handshake/HandshakeDirectTest.java failed - JVMTI ERROR 13

Alex Menkov amenkov at openjdk.org
Wed Dec 3 19:38:05 UTC 2025


On Wed, 3 Dec 2025 18:56:46 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> Please, review a simple correction of the test issue.
> The test method `suspendThread()` does not throw an exception if JVMTI `SuspendThread` returns `JVMTI_ERROR_THREAD_NOT_ALIVE` or `JVMTI_ERROR_WRONG_PHASE`. So these two error codes are accepted as valid. JVMTI `SuspendThread` does not suspend the target thread in such a case, so JVMTI `ResumeThread` can return the JVMTI_ERROR_THREAD_NOT_SUSPENDED (13).
> 
> The fix is to skip call to JVMTI `ResumeThread` if JVMTI `SuspendThread` returned `JVMTI_ERROR_THREAD_NOT_ALIVE` or `JVMTI_ERROR_WRONG_PHASE`. 
> 
> Testing:
>  - This problem is hard to reproduce, but I was able to reproduce it with a JVMTI hack. The fixed test does not fail anymore.
>  - In progress: mach5 tiers 1-4 (to be safe)

Marked as reviewed by amenkov (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/28643#pullrequestreview-3536619369


More information about the hotspot-runtime-dev mailing list