RFR: 8307365: JvmtiStressModule hit SIGSEGV in JvmtiEventControllerPrivate::recompute_thread_enabled [v2]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Tue May 16 20:45:46 UTC 2023
On Tue, 16 May 2023 20:22:49 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> remove extra assert
>
> src/hotspot/share/prims/jvmtiThreadState.cpp line 584:
>
>> 582: JvmtiExport::post_vthread_unmount(vthread);
>> 583: }
>> 584: VTMS_unmount_begin(vthread, /* last_unmount */ false);
>
> I think it would be better just to add
> thread->rebind_to_jvmti_thread_state_of(thread->threadObj());
> after this call instead of adding a parameter to VTMS_unmount_begin.
> Just suggestion.
So we need to execute the thread->rebind_to_jvmti_thread_state_of(thread->threadObj()) call after we do the cleanup to avoid removing the wrong state. So the other option to avoid the extra parameter would be to remove the rebind call from VTMS_unmount_begin(), which I also thought. But that would require to also add it to VTMS_vthread_unmount() for the normal unmount case, which already breaks the symmetry of all those methods, given that for the mount case the rebind call is encapsulated in VTMS_mount_end().
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13949#discussion_r1195675308
More information about the serviceability-dev
mailing list