-
Bug
-
Resolution: Fixed
-
P3
-
8-shenandoah, 11-shenandoah, 15, 16
-
b03
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8250937 | 15.0.2 | Zhengyu Gu | P3 | Resolved | Fixed | b01 |
JDK-8251068 | 15.0.1 | Zhengyu Gu | P3 | Resolved | Fixed | b04 |
Look at Full GC marking code:
void ShenandoahMarkCompact::phase1_mark_heap() {
...
cm->update_roots(ShenandoahPhaseTimings::full_gc_update_roots);
cm->mark_roots(ShenandoahPhaseTimings::full_gc_scan_roots);
}
It enters update_roots, which ends up calling this:
void ShenandoahRootUpdater::roots_do(uint worker_id, IsAlive* is_alive, KeepAlive* keep_alive) {
...
_serial_weak_roots.weak_oops_do(is_alive, keep_alive, worker_id);
...
_weak_roots.weak_oops_do(is_alive, keep_alive, worker_id);
...
_dedup_roots.oops_do(is_alive, keep_alive, worker_id);
}
But the problem is, at this point we already have clear bitmap, so "is_alive" always replies "false", and so the particular roots might not be updated at all. This is an obscure corner case that matters when heap has forwarded objects in roots that need updates, and we run into Full GC.
void ShenandoahMarkCompact::phase1_mark_heap() {
...
cm->update_roots(ShenandoahPhaseTimings::full_gc_update_roots);
cm->mark_roots(ShenandoahPhaseTimings::full_gc_scan_roots);
}
It enters update_roots, which ends up calling this:
void ShenandoahRootUpdater::roots_do(uint worker_id, IsAlive* is_alive, KeepAlive* keep_alive) {
...
_serial_weak_roots.weak_oops_do(is_alive, keep_alive, worker_id);
...
_weak_roots.weak_oops_do(is_alive, keep_alive, worker_id);
...
_dedup_roots.oops_do(is_alive, keep_alive, worker_id);
}
But the problem is, at this point we already have clear bitmap, so "is_alive" always replies "false", and so the particular roots might not be updated at all. This is an obscure corner case that matters when heap has forwarded objects in roots that need updates, and we run into Full GC.
- backported by
-
JDK-8250937 Shenandoah: pre-Full GC root updates may miss some roots
- Resolved
-
JDK-8251068 Shenandoah: pre-Full GC root updates may miss some roots
- Resolved