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

Serguei Spitsyn sspitsyn at openjdk.org
Wed Dec 3 22:46:16 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)

This pull request has now been integrated.

Changeset: 1294d55b
Author:    Serguei Spitsyn <sspitsyn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/1294d55b194704dce92c5132d6779e6f4d4850e6
Stats:     8 lines in 1 file changed: 5 ins; 0 del; 3 mod

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

Reviewed-by: lmesnik, pchilanomate, cjplummer, amenkov

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

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


More information about the hotspot-runtime-dev mailing list