--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp Wed Jun 26 09:06:32 2019 -0400
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp Wed Jun 26 13:18:38 2019 -0400
@@ -2419,12 +2419,13 @@
abort_marking_if_regular_check_fail();
}
+ // Can't assert qset is empty here, even if not aborted. If concurrent,
+ // some other thread might be adding to the queue. If not concurrent,
+ // some other thread might have won the race for the last buffer, but
+ // has not yet decremented the count.
+
_draining_satb_buffers = false;
- assert(has_aborted() ||
- _cm->concurrent() ||
- satb_mq_set.completed_buffers_num() == 0, "invariant");
-
// again, this was a potentially expensive operation, decrease the
// limits to get the regular clock call early
decrease_limits();