RFR(xxs): 8213236: A partial removed/deleted JavaThread cannot transition

Daniel D. Daugherty daniel.daugherty at oracle.com
Thu Nov 1 19:24:07 UTC 2018


On 11/1/18 3:22 PM, Robbin Ehn wrote:
> Hi Dan,
>>> I don't think we should grab Heap_lock at all and we should just 
>>> remove it.
>>> If there is a problem with "unparseable heap", taking Heap_lock 
>>> seems to the wrong solution.
>>
>> I don't think you want to drob the grab of the Heap_lock from
>> this code path as part of this fix. That should be done separately.
>> Of course, you have GC folks close to you so you might be able to
>> resolve the issue (theoretically) quickly. However, I think that
>> will mean that this fix needs more testing.
>
> I was wrong, we can do as you say just skip safepoint checks on 
> Heap_lock.
>
> The incremental is:
> diff -r f5f6ed30bb13 src/hotspot/share/runtime/thread.cpp
> --- a/src/hotspot/share/runtime/thread.cpp    Thu Nov 01 20:10:18 2018 
> +0100
> +++ b/src/hotspot/share/runtime/thread.cpp    Thu Nov 01 20:17:58 2018 
> +0100
> @@ -4289,1 +4289,1 @@
> -    MutexLocker ml(Heap_lock);
> +    MutexLockerEx ml(Heap_lock, Mutex::_no_safepoint_check_flag);
> diff -r f5f6ed30bb13 src/hotspot/share/runtime/vmThread.cpp
> --- a/src/hotspot/share/runtime/vmThread.cpp    Thu Nov 01 20:10:18 
> 2018 +0100
> +++ b/src/hotspot/share/runtime/vmThread.cpp    Thu Nov 01 20:17:58 
> 2018 +0100
> @@ -323,1 +323,1 @@
> -  assert(((JavaThread*)Thread::current())->is_terminated(), "Should 
> be off threadslist");
> +  assert(((JavaThread*)Thread::current())->is_terminated(), "Should 
> be terminated");
>
> Re-running t1-2, I expect no problems.

I'm good with the above tweaks.

Dan


>
> Thanks!
>
> /Robbin
>
>>
>> Dan
>>
>>
>>>
>>> /Robbin
>>>
>>>>
>>>> Dan
>>>>
>>>>
>>>>
>>>>> _should_terminate = true;
>>>>>      VMOperationQueue_lock->notify();
>>>>>    }
>>>>>
>>>>> Passes t1-2.
>>>>>
>>>>> Thanks Robbin
>>>>
>>



More information about the hotspot-runtime-dev mailing list