On Wed, 31 Mar 2021 07:48:00 GMT, Richard Reingruber <rr...@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