RFR: 8351997: AArch64: Interpreter volatile reference stores with G1 are not sequentially consistent

Andrew Haley aph at openjdk.org
Wed May 28 11:06:51 UTC 2025


On Wed, 28 May 2025 10:48:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Ouch. I think this is fine without further refactoring, especially since I see it should be backported into JDK 21 as well.

It's many things, but IMO fine is not one of them. It would surely be better if this evil were expunged from JDK 21 as well, lest it also confuse a backporter.

> I was wondering why haven't we caught this in jcstress. jcstress runs in int/C1/C2 modes specifically to catch issues like these. I believe this slipped through because all of our seqcst tests, Dekker included, operate on primitives. So we never actually explore what happens with reference load/stores, and as this bug shows, there are _interesting_ interactions with GC barriers. I'll see how to amend jcstress to cover this...

It's interesting to see how to do that. One question for @fisk : did this problem manifest interpreter-only, or with a combination of interpreted in one thread, compiled in the other?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25483#issuecomment-2915895116


More information about the hotspot-runtime-dev mailing list