RFR: 8257831: Suspend with handshakes [v2]

David Holmes dholmes at openjdk.java.net
Wed Mar 31 09:22:27 UTC 2021


On Wed, 31 Mar 2021 07:48:00 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> src/hotspot/share/prims/jvmtiEnv.cpp line 1009:
>> 
>>> 1007:   if (self_index >= 0) {
>>> 1008:     if (!JvmtiSuspendControl::suspend(current)) {
>>> 1009:       results[self_index] = JVMTI_ERROR_THREAD_NOT_ALIVE;
>> 
>> Surely impossible when dealing with the current thread!
>
> Another thread can win the race to suspend the current thread (if claim_handshake() in try_process() fails). Then JVMTI_ERROR_THREAD_SUSPENDED should be returned.

My comment was about JVMTI_ERROR_THREAD_NOT_ALIVE

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

PR: https://git.openjdk.java.net/jdk/pull/3191


More information about the hotspot-runtime-dev mailing list