RFR: 8336846: assert(state->get_thread() == jt) failed: handshake unsafe conditions [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Thu Aug 1 22:47:31 UTC 2024


On Thu, 1 Aug 2024 09:37:08 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> The JVMTI Watch Field functions do not disable VTMS transitions with the `JvmtiVTMSTransitionDisabler`:
>> - `SetFieldAccessWatch()`
>> - `ClearFieldAccessWatch()`
>> - `SetFieldModificationWatch()`
>> - `ClearFieldModificationWatch()`
>>  so in the `recompute_enabled()` we could see that a vthread is mounted, but in the `EnterInterpOnlyModeClosure` handshake the thread could have been unmounted already. This is a root cause of failures with this assert.
>>  
>> The fix is to disable transitions in the `JvmtiEventControllerPrivate::change_field_watch()` function.
>> 
>> Testing:
>> - TBD: submit mach5 tiers 1-6
>
> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   rearranged to have one JvmtiVTMSTransitionDisabler instead of two

Looks good, but I see we have ranking issues with JvmtiThreadState_lock now. We will have to change JvmtiVTMSTransition_lock to be safepoint-1.

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

PR Review: https://git.openjdk.org/jdk/pull/20413#pullrequestreview-2214162122


More information about the serviceability-dev mailing list