8202049: G1: ReferenceProcessor doesn't handle mark stack overflow
Summary: Issue a fatal error when mark stack overflows during reference processing in the Remark phase
Reviewed-by: kbarrett
--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp Thu Jun 07 11:20:30 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp Thu Jun 07 11:20:55 2018 +0200
@@ -1651,7 +1651,11 @@
}
if (has_overflown()) {
- // We can not trust g1_is_alive if the marking stack overflowed
+ // We can not trust g1_is_alive and the contents of the heap if the marking stack
+ // overflowed while processing references. Exit the VM.
+ fatal("Overflow during reference processing, can not continue. Please "
+ "increase MarkStackSizeMax (current value: " SIZE_FORMAT ") and "
+ "restart.", MarkStackSizeMax);
return;
}