On Tue, 16 May 2023 00:52:05 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
> Thank you for taking care about this issue! Yes, clearing the > `JvmtiThreadState` of a virtual thread has to be done while in transition as > it provides a needed synchronization. This makes it a little bit ugly but I > hope it can be simplified again after getting rid of the > `rebind_to_jvmti_thread_state_of()` which is still on my TODO list. Thanks, > Serguei > Thanks for the review Serguei! Patricio > src/hotspot/share/prims/jvmtiThreadState.cpp line 559: > >> 557: VTMS_unmount_begin(vthread, /* last_unmount */ true); >> 558: if (thread->jvmti_thread_state() != nullptr) { >> 559: assert(thread->jvmti_thread_state()->is_virtual(), "wrong >> JvmtiThreadState"); > > We agreed with you to temporarily remove this assert as it triggers the bug: > [8308124](https://bugs.openjdk.org/browse/JDK-8308124) dynamic loading of a > JVMTI agent has a race with JvmtiThreadState cleanup > > A fix of the [8308124](https://bugs.openjdk.org/browse/JDK-8308124) will add > this assert back. Yes, thanks for finding and filing a bug for that. I removed the assert. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13949#issuecomment-1549793062 PR Review Comment: https://git.openjdk.org/jdk/pull/13949#discussion_r1195260193