RFR: 8372769: Test runtime/handshake/HandshakeDirectTest.java failed - JVM TI ERROR 13
Leonid Mesnik
lmesnik at openjdk.org
Wed Dec 3 19:05:55 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.
Thanks for fixing this.
-------------
Marked as reviewed by lmesnik (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28643#pullrequestreview-3536494601
More information about the hotspot-runtime-dev
mailing list