[aarch64-port-dev ] RFR(S): 8248851: CMS: Missing memory fences between free chunk check and klass read
kim.barrett at oracle.com
Tue Jul 7 13:28:02 UTC 2020
> On Jul 7, 2020, at 7:48 AM, Yangfei (Felix) <felix.yang at huawei.com> wrote:
>> -----Original Message-----
>> From: Andrew Haley [mailto:aph at redhat.com]
>> Sent: Tuesday, July 7, 2020 4:42 PM
>> To: Yangfei (Felix) <felix.yang at huawei.com>; 'jdk8u-dev at openjdk.java.net'
>> <jdk8u-dev at openjdk.java.net>
>> Cc: hotspot-gc-dev at openjdk.java.net; aarch64-port-dev at openjdk.java.net
>> Subject: Re: [aarch64-port-dev ] RFR(S): 8248851: CMS: Missing memory
>> fences between free chunk check and klass read
>> On 07/07/2020 04:22, Yangfei (Felix) wrote:
>>> Webrev for jdk8u-dev:
>>> http://cr.openjdk.java.net/~fyang/8248851/webrev.00/ JTreg tested on
>>> x86_64-linux-gnu &aarch64-linux-gnu with jdk8u release builds.
>> That looks right. I was thinking of arguing that you only need loadload here,
>> but other parts of the same function use acquire, so we might as well be
>> I'd lose this line:
>> // Bugfix for systems with weak memory model (AARCH64).
>> It doesn't add anything, and it may mislead people into thinking that it's
>> AArch64 specific. Looking at the code, it seems like all the casting to volatile
>> was an earlier attempt to fix the same bug.
> Good suggestion.
> I have prepared a new webrev with the line removed: http://cr.openjdk.java.net/~fyang/8248851/webrev.01/
> Does it look better?
This change seems needed, but is it sufficient? Seems like there
should be a corresponding release/storestore/something for the
correspnding writes; is it there? (I haven't looked at CMS for quite a
while, so no longer sure where to look.)
This issue seems to persist all the way until CMS removal in JDK 14.
Also, there's the closely related JDK-8160369 (JDK 9), which doesn't
appear to have been backported to JDK 8.
More information about the hotspot-gc-dev