RFR: ReferenceProcessor is_alive setup is racy
Roman Kennke
rkennke at redhat.com
Mon Feb 26 11:13:36 UTC 2018
Oh bad. Green light for the fix. Go!
On Mon, Feb 26, 2018 at 11:54 AM, Aleksey Shipilev <shade at redhat.com> wrote:
> http://cr.openjdk.java.net/~shade/shenandoah/rp-racy/webrev.01/
>
> Looking into nightly failures, we have discovered that on conc-mark-with-update-refs cancellation
> path, RP discovery abruptly switches to ShIsAliveClosure, while it should be still using
> ShForwardedIsAliveClosure. I think this happens because our IsAliveMutators are being called from
> the worker threads: so, when the first thread that switched the closure to the correct one exits, it
> installs the *previous* closure for every other worker thread to enjoy^W crash on.
>
> The way out is to only do IsAlive mutations outside workers, in driver path. Additionally, to make
> failures like these more detectable, do not install any closure to RP (i.e. install NULL) when RP is
> not used, and assert the correct closure is installed.
>
> Testing: hotspot_gc_shenandoah
>
> Thanks,
> -Aleksey
>
More information about the shenandoah-dev
mailing list