RFR: ReferenceProcessor is_alive setup is racy
Aleksey Shipilev
shade at redhat.com
Mon Feb 26 10:54:49 UTC 2018
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