RFR(sh/jdk8): Fix racy update of code roots

Aleksey Shipilev shade at redhat.com
Wed Dec 9 07:34:07 UTC 2020


On 12/8/20 9:34 PM, Roman Kennke wrote:
> This is jdk8-specific (I have checked jdk16 and jdk11 and they don't
> have this problem).
> 
> There is a race in ShenadoahRootUpdater: threads go into
> threads::oops_do() with a CodeBlobClosure and then they *also* go into
> ShenandoahCodeRoots::oops_do(). This leads to visiting nmethods
> concurrently, which is problematic because fix_relocations() is not
> MT-safe and will mess up oops in nmethods.
> 
> Conservative fix:
> http://cr.openjdk.java.net/~rkennke/fixracycodecacheupdate/webrev.00/

Looks good!

Please coordinate with Andrew Hughes to get it to aarch64-port/jdk8u-shenandoah for Jan CPU.

-- 
Thanks,
-Aleksey



More information about the shenandoah-dev mailing list