-
Bug
-
Resolution: Fixed
-
P4
-
25, 26
-
master
Shenandoah's generational mode runs a separate thread to monitor the heap during old collections. This thread is responsible for deciding to start collections. When the thread which actually runs collections (the control thread) changes the state of various gc components _on a safepoint_, it has the expectation that these changes will become visible to mutator threads atomically, and consistently. However, the regulator thread does not participate in safepoints and may observe gc components in inconsistent states and so make incorrect choices about trying to start GC cycles.
For example:
```
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp:625), pid=3796044, tid=3796163
# assert(_old_generation->state() == ShenandoahOldGeneration::MARKING) failed: Unexpected old gen state: Waiting for Bootstrap
#
```
The solution here is to make the regulator thread participate in safepoints. There is no need for it to run during a safepoint.
For example:
```
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp:625), pid=3796044, tid=3796163
# assert(_old_generation->state() == ShenandoahOldGeneration::MARKING) failed: Unexpected old gen state: Waiting for Bootstrap
#
```
The solution here is to make the regulator thread participate in safepoints. There is no need for it to run during a safepoint.
- links to
-
Commit(master) openjdk/jdk/926f61f2
-
Review(master) openjdk/jdk/27702