On Tue, 30 Mar 2021 16:50:50 GMT, Daniel D. Daugherty <dcu...@openjdk.org> wrote:
>> Robbin Ehn has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake (review baseline) > > src/hotspot/os/posix/signals_posix.cpp line 1587: > >> 1585: // destructor has completed. >> 1586: >> 1587: if (thread->is_Java_thread() && >> thread->as_Java_thread()->is_terminated()) { > > We need @dholmes-ora to verify that this version of the code will > still solve the bug he was fixing when he added old L1610. Thanks @dcubed-ojdk - no it won't. The problem is that the signal can hit very late in a thread's termination process, after the JavaThread destructor has executed, so no query of JavaThread state is possible. So we needed something in the Thread state and the SR_lock was a good enough proxy for that. It may be possible to use a different Thread field (perhaps _ParkEvent but encapsulated in a Thread::has_terminated() helper method). ------------- PR: https://git.openjdk.java.net/jdk/pull/3191