RFR 8242484: Rework thread deletion during VM termination
patricio.chilano.mateo at oracle.com
Tue Apr 14 20:07:40 UTC 2020
Please review this small follow up for 8240918 to always delete the
JavaThread that calls Threads::destroy_vm().
In 8240918 I added a conditional check in Threads::destroy_vm() to
prevent deleting a JavaThread when there are handshakers blocked in its
handshake_turn_sem semaphore. We can actually avoid this issue
altogether if after removing the JavaThread from the active list and
before triggering the terminating safepoint, we wait until the
JavaThread is no longer protected by a ThreadsList reference.
Tested in mach5 tiers 1-6.
More information about the hotspot-runtime-dev