RFR: 8254263: Remove special_runtime_exit_condition() check from ~ThreadInVMForHandshake()

Patricio Chilano Mateo pchilanomate at openjdk.java.net
Mon Oct 12 04:43:08 UTC 2020


On Sun, 11 Oct 2020 22:20:47 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Just to clarify my own understanding. Looking at the original problem scenario in JDK-8223572 we have:
> 
> * T calls _semaphore.wait_with_safepoint_check()
> * T transitions from _thread_in_vm to _thread_blocked
> * The VM thread completes H and calls _semaphore.signal()
> * Before T can transition back to _thread_in_vm, the VM thread schedules another safepoint and
>   executes VM_ThreadSuspend on behalf of a JVMTI agent that wants to suspend T
> 
> The key change in JDK-8238761 is that we now call:
> 
> ` MutexLocker ml(&_lock, Mutex::_no_safepoint_check_flag);`
> 
> so there is longer the possibility of T becoming handshake-safe and so the VM_ThreadSuspend cannot happen.

Exactly.

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

PR: https://git.openjdk.java.net/jdk/pull/577


More information about the hotspot-runtime-dev mailing list