RFR: 8338934: vmTestbase/nsk/jvmti/*Field*Watch/TestDescription.java tests timeout intermittently [v2]
Serguei Spitsyn
sspitsyn at openjdk.org
Sat Aug 31 07:35:18 UTC 2024
On Fri, 30 Aug 2024 14:50:45 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> The tests time out because of dedlock of of the thread that is in transition and thread changing field watches.
>>
>> They use JvmtiThreadState_lock and JvmtiVTMSTransitionDisabler.
>>
>> The change field watch require disabler, but attempt to use it only when already locked in
>>
>> void
>> JvmtiEventController::change_field_watch(jvmtiEvent event_type, bool added) {
>> MutexLocker mu(JvmtiThreadState_lock);
>> JvmtiEventControllerPrivate::change_field_watch(event_type, added);
>> }
>>
>>
>> while it is needed to first disable transitions and then try to use JvmtiThreadState_lock.
>> I quickly looked that most of jvmti methods do it already. Also moved disabler into jvmtiEmv.cpp to be more consistent with other methods.
>>
>>
>> I was able to verify my fix in loom repo locally. and run tier1 + tier5-svc testing in jdk.
>
> Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
>
> fixed spaces
Marked as reviewed by sspitsyn (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/20776#pullrequestreview-2273782106
More information about the hotspot-dev
mailing list