RFR: Reset update watermark for cycles degenerated during evacuation
Kelvin Nilsen
kdnilsen at openjdk.java.net
Wed Mar 2 17:58:38 UTC 2022
On Wed, 2 Mar 2022 16:58:34 GMT, William Kemper <wkemper at openjdk.org> wrote:
> When an out of memory error occurs during concurrent evacuation the load reference barrier (LRB) stops trying to evacuate objects (this appears to be by design). As the collector transitions to a degenerated cycle, mutators may load references to objects in the collection set. If one of these references is written into a region that was `empty committed` after final mark, the region will have its top at mark start (TAMS) and update watermark (UWM) equal to the bottom of the region. Such regions are effectively skipped during the update reference phase. The degenerated cycle completes with live references to reclaimed memory in the heap, resulting in crashes or corruption.
>
> Rather than re-engineer the oom-during-evac protocol, upon entering a degenerated evacuation phase we again make thread local allocation buffers (TLABs) parsable and reset the UWM for active regions. Now, if the degenerated evacuation phase succeeds, the from-space pointers will be fixed in the update reference phase.
Thanks for this fix.
-------------
Marked as reviewed by kdnilsen (Committer).
PR: https://git.openjdk.java.net/shenandoah/pull/121
More information about the shenandoah-dev
mailing list