RFR (XS) 8224880: ShenandoahRootScanner::roots_do assert is too strong
Aleksey Shipilev
shade at redhat.com
Wed May 29 11:19:58 UTC 2019
Bug:
https://bugs.openjdk.java.net/browse/JDK-8224970
It reliably happens with x86_32 and gc/shenandoah/oom tests that enter the heap inspection on OOM.
That operation is done under its own VM op. So, the fix is to relax the assert to accept
non-Shenandoah safepoints.
diff -r 785a12e0f89b src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp Wed May 29 12:01:21
2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp Wed May 29 12:57:03
2019 +0200
@@ -28,4 +28,5 @@
#include "gc/shenandoah/shenandoahRootProcessor.hpp"
#include "gc/shenandoah/shenandoahTimingTracker.hpp"
+#include "gc/shenandoah/shenandoahUtils.hpp"
#include "memory/resourceArea.hpp"
@@ -91,7 +92,8 @@
template <typename ITR>
void ShenandoahRootScanner<ITR>::roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds,
CodeBlobClosure* code, ThreadClosure *tc) {
- assert(!ShenandoahHeap::heap()->unload_classes() ||
+ assert(!ShenandoahSafepoint::is_at_shenandoah_safepoint() ||
+ !ShenandoahHeap::heap()->unload_classes() ||
ShenandoahHeap::heap()->heuristics()->can_do_traversal_gc(),
- "No class unloading or traversal GC");
+ "Expect class unloading or traversal when Shenandoah cycle is running");
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc);
ResourceMark rm;
Testing: hotspot_gc_shenandoah + failing test
--
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list