RFR: Missing Evac OOM scope when reference processor is single threaded

Zhengyu Gu zgu at redhat.com
Fri Jul 20 10:57:31 UTC 2018



On 07/20/2018 06:42 AM, Aleksey Shipilev wrote:
> On 07/20/2018 12:36 PM, Zhengyu Gu wrote:
>> When ReferenceProcessor processes references in single-threaded mode, it uses current thread, not
>> task executor, and we miss Evac OOM scope for current thread.
>>
>> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/missing_evac_oom_scope/webrev.00/index.html
> 
> I am confused: which path enters write barrier / evacuation code via the reference processing?!

Here is the backtrace: 
https://paste.fedoraproject.org/paste/2yVhSCOWQfMS9jXEQNe~hQ

and looks like we don't need scope for CM.

> 
> Roman should look at this. 
Cool, so I withdraw this RFR.

I think it is dangerous to unconditionally enter OOMScope in the
> non-worker thread, because IIRC OOM-protocol blocks failed thread until non-failed threads leave the
> scope. Which means, this is a deadlock waiting to happen.

This scenario, there should not have workers running, but VMThread vs. 
Java threads.

Thanks,

-Zhengyu


> 
> -Aleksey
> 


More information about the shenandoah-dev mailing list