RFR: 8323634: Shenandoah: Document behavior of EvacOOM protocol [v3]

William Kemper wkemper at openjdk.org
Tue Jan 16 21:48:50 UTC 2024


On Tue, 16 Jan 2024 21:17:13 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.hpp line 70:
>> 
>>> 68:  *
>>> 69:  *  1. If we fail to evacuate the entirety of live memory from all cset regions,
>>> 70:  *     we will transition to STW full gc at the end of the evacuation cycle.  Full GC
>> 
>> First it attempts a degenerated cycle. If we don't believe a degenerated oom-during-evac cycle can ever succeed, we should change this behavior.
>
> Is this true?  I believe degenerated cycle is unable to recover from OOM during evac.  We always have to upgrade to Full GC in this situation.  That's because the OOM during Evac protocol has compromised the cset by possibly allowing references to the cset to sneak through the LRB barrier.  Hereafter, degen is not sufficient to recover.

Yes, this happens. That is why we specifically has to add this patch: https://github.com/openjdk/shenandoah/blob/master/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp#L202 to help the degenerated cycle recover from oom-during-evac correctly.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17385#discussion_r1454085125


More information about the hotspot-gc-dev mailing list