RFR: 8307365: JvmtiStressModule hit SIGSEGV in JvmtiEventControllerPrivate::recompute_thread_enabled [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Tue May 16 14:33:38 UTC 2023


On Tue, 16 May 2023 00:52:05 GMT, Serguei Spitsyn <sspitsyn at 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


More information about the hotspot-dev mailing list