RFR: 8310062: Incomplete SATB buffers may not be processed during degenerated young collection

William Kemper wkemper at openjdk.org
Wed Jun 14 20:58:25 UTC 2023


When Shenandoah's young generation exhausts available memory, it transitions to a "degenerated" cycle. If old marking is in progress, SATB queues need to be drained before evacuation to avoid invalidating any pointers in the queues. In the case when old marking is active and the concurrent collection failed during root scan, the SATB queues might not be drained - this is an error.

The change here moves handling of the old pointers in the SATB queues to the case when degeneration occurs during the root scan. We _could_ rely on SATB processing in the degenerated mark case, but we would still need the explicit methods for handling old pointers during the concurrent cycles.

The verifier has also been modified to check that all SATB buffers are empty after marking is complete. This is _only_ valid after marking is completed on the safepoint. If concurrent marking for old is in progress, the SATB queues are not expected to be empty during other phases of a concurrent young collection.

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

Commit messages:
 - Only verify SATB buffers are empty during final mark
 - Drain satb for old and young marking, fix test for ptr queue emptiness
 - Transfer old satb pointers for degenerated roots and out of cycle

Changes: https://git.openjdk.org/shenandoah/pull/287/files
 Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=287&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8310062
  Stats: 58 lines in 4 files changed: 44 ins; 9 del; 5 mod
  Patch: https://git.openjdk.org/shenandoah/pull/287.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/287/head:pull/287

PR: https://git.openjdk.org/shenandoah/pull/287


More information about the shenandoah-dev mailing list