RFR: 8355789: GenShen: assert(_degen_point == ShenandoahGC::_degenerated_unset) failed: Should not be set yet: Outside of Cycle

William Kemper wkemper at openjdk.org
Tue Apr 29 00:02:20 UTC 2025


When old generation marking is cancelled to run a young collection. we still set a `_degen_point ` for reasons that became vestigial after [JDK-8349094](https://bugs.openjdk.org/browse/JDK-8349094). When old marking is cancelled, the `_degen_point` should only be set if the marking was cancelled because of an allocation failure (and it should still only be set to "outside of cycle"). The following sequence could lead to this assertion failure:
1. Control thread is marking old
2. Young GC preempts it
3. Control thread sets the degen point because the old GC was "cancelled"
4. The concurrent young GC fails and attempts to set a degenerated point
5. This trips the assert because we already (incorrectly) set the degen point in `3`.

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

Commit messages:
 - Only set degeneration point for allocation failures during old marking

Changes: https://git.openjdk.org/jdk/pull/24940/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24940&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8355789
  Stats: 11 lines in 1 file changed: 0 ins; 3 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/24940.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24940/head:pull/24940

PR: https://git.openjdk.org/jdk/pull/24940


More information about the shenandoah-dev mailing list