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.

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

Commit messages:
 - change lock
 - moved disabler

Changes: https://git.openjdk.org/jdk/pull/20776/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20776&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8338934
  Stats: 8 lines in 3 files changed: 4 ins; 2 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/20776.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20776/head:pull/20776

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

Reply via email to