On Tue, 6 Apr 2021 12:22:42 GMT, Robbin Ehn <r...@openjdk.org> wrote:
>> Sure. I agree with your comment. > > 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. ------------- PR: https://git.openjdk.java.net/jdk/pull/3191