RFR: 8298376: ZGC: thaws stackChunk with stale oops
Stefan Karlsson
stefank at openjdk.org
Thu Dec 8 11:13:54 UTC 2022
During the recent ZGC + Loom rewrites JDK-8296875 a bug was introduced, which causes Loom to thaw stackChunks with stale oops.
Before that change we made sure that only the GC performed load barriers on the cont oop in stackChunk, so that we could use the oop state as an indication of the age of the stackChunk. That information was then used in ZCollectedHeap::requires_barriers.
In Generational ZGC we changed the implementation of requires_barriers, so that the rest of the JVM didn't need to have special-handling of the cont oop. However, when upstreaming the changes in JDK-8296875 we purposefully didn't update requires_barriers, but we incorrectly brought over the removal of the special-handling of the cont oop.
To limit the fix for this bug, I propose that we restore the special-handling of the cont oop.
I've tested this with a reproducer running Fuzz.java + ZGC.
-------------
Depends on: https://git.openjdk.org/jdk/pull/11582
Commit messages:
- 8298376: ZGC: thaws stackChunk with stale oops
Changes: https://git.openjdk.org/jdk/pull/11585/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11585&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8298376
Stats: 19 lines in 4 files changed: 15 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/11585.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11585/head:pull/11585
PR: https://git.openjdk.org/jdk/pull/11585
More information about the hotspot-dev
mailing list