On Thu, 29 Aug 2024 18:18:12 GMT, Leonid Mesnik <lmes...@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.

This pull request has now been integrated.

Changeset: 92aafb43
Author:    Leonid Mesnik <lmes...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/92aafb43424321d8f2552aa34a9a3df291abf992
Stats:     8 lines in 3 files changed: 4 ins; 2 del; 2 mod

8338934: vmTestbase/nsk/jvmti/*Field*Watch/TestDescription.java tests timeout 
intermittently

Reviewed-by: sspitsyn, amenkov

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

PR: https://git.openjdk.org/jdk/pull/20776

Reply via email to