RFR: 8257831: Suspend with handshakes [v2]

David Holmes dholmes at openjdk.java.net
Wed Apr 7 04:25:42 UTC 2021


On Tue, 6 Apr 2021 18:47:58 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> I think we should add JVMTI_ERROR_THREAD_SUSPENDED as @reinrich says, it is possible for someone to sneak in a second suspend request before us.
>> 
>> @dcubed-ojdk it seem like we could be posting JvmtiExport::post_monitor_contended_enter() from the ensure_join() which locks the threadObj.
>> 
>> So it might be best to treat this the same way as the others?
>
> By "treat this the same way as the others", you mean check and return either
> JVMTI_ERROR_THREAD_NOT_ALIVE or JVMTI_ERROR_THREAD_SUSPENDED as
> appropriate when we get a false back from JvmtiSuspendControl::suspend(current)?
> 
> I'm not sure what this question is about:
> 
>> it seem like we could be posting JvmtiExport::post_monitor_contended_enter() from the ensure_join() which locks the threadObj.

I'm also unclear what Robbin is referring to. I go back to my original comment that surely JVMTI_ERROR_THREAD_NOT_ALIVE is impossible here?

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

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


More information about the hotspot-runtime-dev mailing list