[aarch64-port-dev ] 8233839: aarch64: missing memory barrier in NewObjectArrayStub and NewTypeArrayStub
Yangfei (Felix)
felix.yang at huawei.com
Mon Nov 11 01:41:22 UTC 2019
> -----Original Message-----
> From: Andrew Dinn [mailto:adinn at redhat.com]
> Sent: Friday, November 8, 2019 5:04 PM
> To: Yangfei (Felix) <felix.yang at huawei.com>;
> hotspot-runtime-dev at openjdk.java.net; aarch64-port-dev at openjdk.java.net
> Subject: Re: 8233839: aarch64: missing memory barrier in NewObjectArrayStub
> and NewTypeArrayStub
>
> On 08/11/2019 08:30, Yangfei (Felix) wrote:
> > I witnessed random fail of one jcstress test on my 128-core aarch64 server:
> "org.openjdk.jcstress.tests.defaultValues.arrays.small.plain.StringTest"
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8233839
> >
> > I used the latest aarch64 jdk8u release build. Please refer to the bugzilla for
> details and the analysis.
> > I checked the assembler code emitted by
> LIR_Assembler::emit_alloc_array:
> > For the fast path, the StoreStore memory barrier is there. But it’s not the
> case for the slow path.
> >
> > Patch adding the missing barrier for 14:
> >
> > diff -r ad157fab6bf5 src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
> > --- a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp Thu Nov 07
> 16:26:57 2019 -0800
> > +++ b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp Fri Nov 08
> 16:10:08 2019 +0800
> > @@ -840,6 +840,7 @@
> > __ sub(arr_size, arr_size, t1); // body length
> > __ add(t1, t1, obj); // body start
> > __ initialize_body(t1, arr_size, 0, t2);
> > + __ membar(Assembler::StoreStore);
> > __ verify_oop(obj);
> >
> > __ ret(lr);
> >
> > JDK builds OK and passed tier1 test.
> Very nice detective work finding that one!
>
> The jdk14 patch looks good. Also the same patch for jdk11 and the variant for
> jdk8 are good.
>
Thanks for reviewing this.
The jdk14 patch has been pushed as: https://hg.openjdk.java.net/jdk/jdk/rev/90cf1d4e712f
Will push to aarch64 jdk8u after the jdk11u-fix-request is approved.
Felix
More information about the aarch64-port-dev
mailing list