# HG changeset patch # User rehn # Date 1569308079 -7200 # Node ID 448fe2bfd50594f9c5ea85e696a1b0973edab192 # Parent e47b459b315c14557ce26d588bf72ae31c0599a9 8229778: TestJstatdDefaults.java failed due to "fatal error: LEAF method calling lock?" Reviewed-by: dholmes, dcubed diff -r e47b459b315c -r 448fe2bfd505 src/hotspot/share/runtime/thread.cpp --- a/src/hotspot/share/runtime/thread.cpp Mon Sep 23 19:55:26 2019 -0700 +++ b/src/hotspot/share/runtime/thread.cpp Tue Sep 24 08:54:39 2019 +0200 @@ -1803,7 +1803,10 @@ void JavaThread::block_if_vm_exited() { if (_terminated == _vm_exited) { // _vm_exited is set at safepoint, and Threads_lock is never released - // we will block here forever + // we will block here forever. + // Here we can be doing a jump from a safe state to an unsafe state without + // proper transition, but it happens after the final safepoint has begun. + set_thread_state(_thread_in_vm); Threads_lock->lock(); ShouldNotReachHere(); }