Fix issue with OOM-during-evac
Roman Kennke
rkennke at redhat.com
Sat Mar 4 17:07:32 UTC 2017
When we run OOM during the initial evacuation (at the final-mark pause),
we (can) have a problem:
- GC thread 1 attempts to evacuate object A at root x and fails (no
GCLAB left and no memory left), leaving x pointing to A.
- GC thread 2 attempts to evacuate object A at root y and succeeds
(still got some GCLAB left), and updates y to point to A'.
This leaves us with x pointing to A, even though we have a valid A'.
This is very verboten and must not happen!
The solution is to check for cancelled_concgc() after initial-evac
(after all GC threads are done), and doing a fixup-refs-pass over the
evacuation roots if we have run OOM.
This also adds a check after initial evac that all init-evac roots are
now pointing to an object without forwardee (from-space or to-space).
It also moves some closures around to be accessible where we need them.
http://cr.openjdk.java.net/~rkennke/fixoom-during-init-evac/webrev.00/
Ok to push?
Roman
More information about the shenandoah-dev
mailing list