RFR: Do not put down update-refs-in-progress flag concurrently
Roman Kennke
rkennke at redhat.com
Mon Jan 22 12:20:46 UTC 2018
Am 22.01.2018 um 12:23 schrieb Aleksey Shipilev:
> http://cr.openjdk.java.net/~shade/shenandoah/no-concurrent-ur-flag/webrev.01/
>
> There is a race with update-refs-in-progress flag handling that is reliably reproducible with
> Degenerated GC patch and AllocFailureALot. On cancellation path, ShConcThread puts u-r-in-p to false
> (this was added to handle partial GC failure, IIRC). But, this is enough race window for *native*
> thread to skip StoreValBarrier that is sensed by ShBarrierSet::need_update_refs_barrier and then
> ShBarrierSet::write_ref_array silently corrupts the heap by not fixing up from-space ptrs.
>
> The way out is to handle it properly, at safepoint. No thread is waiting for that flag to get down,
> so there is no reason at all to do this concurrently. Full GC code has to clean up the flag instead.
>
> There is a similar but significantly more complicated patch for evac-in-progress, which is better be
> separate from this.
>
> Testing: hotspot_gc_shenandoah, Degenerate GC tests
>
> Thanks,
> -Aleksey
>
Sounds good. We've had enough issues with concurrently putting down
-in-progress flags. Let's just do it at a proper safepoint.
Roman
More information about the shenandoah-dev
mailing list