RFR: 8310062: [Shenandoah] Incomplete SATB buffers may not be processed during degenerated young collection [v2]

William Kemper wkemper at openjdk.org
Thu Jun 15 16:35:46 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.

William Kemper has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:

 - Merge branch 'shenandoah-master' into fix-old-gen-satb-bug
 - Only verify SATB buffers are empty during final mark
   
   In generational mode, the SATB barrier for old marking could pick up pointers after 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:
  - all: https://git.openjdk.org/shenandoah/pull/287/files
  - new: https://git.openjdk.org/shenandoah/pull/287/files/f4b635fa..c3325bda

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=shenandoah&pr=287&range=01
 - incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=287&range=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 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