RFR 8242484: Rework thread deletion during VM termination

Patricio Chilano patricio.chilano.mateo at oracle.com
Fri Apr 17 14:33:42 UTC 2020


Hi David,

On 4/16/20 10:49 PM, David Holmes wrote:
> Hi Patricio,
>
> Sorry I thought I had replied to this straight away.
>
> On 15/04/2020 6:07 am, Patricio Chilano wrote:
>> Hi,
>>
>> 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.
>
> This solution looks great to me, but of course I am biased here.
:-)
> Thanks for picking this one up.
Great, thanks for the review!


Patricio
> David
> -----
>
>> Tested in mach5 tiers 1-6.
>>
>> Bug:
>>     https://bugs.openjdk.java.net/browse/JDK-8242484
>>
>> Webrev:
>>     http://cr.openjdk.java.net/~pchilanomate/8242484/v1/webrev/
>>
>> Thanks,
>> Patricio



More information about the hotspot-runtime-dev mailing list