8153834: G1 Card table verification fails due to concurrent region cleanup
authormgerdin
Tue, 12 Apr 2016 14:03:31 +0200
changeset 37468 2313142725e0
parent 37467 8173cbc15e07
child 37470 d668bb1f3633
child 37471 6ba3e52c2bd6
8153834: G1 Card table verification fails due to concurrent region cleanup Reviewed-by: ehelin, tschatzl
hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Tue Apr 12 09:08:48 2016 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Tue Apr 12 14:03:31 2016 +0200
@@ -4824,6 +4824,9 @@
 
     workers()->run_task(&cleanup_task);
 #ifndef PRODUCT
+    // Need to synchronize with concurrent cleanup since it needs to
+    // finish its card table clearing before we can verify.
+    wait_while_free_regions_coming();
     _verifier->verify_card_table_cleanup();
 #endif
   }