RFR: 8276201: Shenandoah: Race results degenerated GC to enter wrong entry point

Zhengyu Gu zgu at openjdk.java.net
Sat Oct 30 13:03:28 UTC 2021


There is subtle race when concurrent GC comes out of final mark safepoint: an allocation failure occurred before control thread checks OOM conditional, that triggers degenerated GC enters "mark" degenerated point.

Degenerated GC re-executes final mark, then switching off SATB, but it is already off, because concurrent GC already completed final mark, that triggers the assertion.

The solution is to consult concurrent_mark_in_progress flag when selects degen-point.

Test:
- [x] hotspot_gc_shenandoah

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

Commit messages:
 - v0

Changes: https://git.openjdk.java.net/jdk/pull/6179/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6179&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8276201
  Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6179.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6179/head:pull/6179

PR: https://git.openjdk.java.net/jdk/pull/6179



More information about the hotspot-gc-dev mailing list