--- old/src/share/vm/gc/g1/g1CollectedHeap.cpp 2017-07-28 14:29:29.453715802 +0200 +++ new/src/share/vm/gc/g1/g1CollectedHeap.cpp 2017-07-28 14:29:29.325710530 +0200 @@ -4389,6 +4389,15 @@ rp->verify_no_references_recorded(); assert(!rp->discovery_enabled(), "should have been disabled"); + // If during an initial mark pause we install a pending list head which is not otherwise reachable + // ensure that it is marked in the bitmap for concurrent marking to discover. + if (collector_state()->during_initial_mark_pause()) { + oop pll_head = Universe::reference_pending_list(); + if (pll_head != NULL) { + _cm->grayRoot(pll_head); + } + } + // FIXME // CM's reference processing also cleans up the string and symbol tables. // Should we do that here also? We could, but it is a serial operation --- old/src/share/vm/memory/universe.cpp 2017-07-28 14:29:29.961736726 +0200 +++ new/src/share/vm/memory/universe.cpp 2017-07-28 14:29:29.833731454 +0200 @@ -497,7 +497,11 @@ #define assert_pll_ownership() assert_pll_locked(owned_by_self) oop Universe::reference_pending_list() { - assert_pll_ownership(); + if (Thread::current()->is_VM_thread()) { + assert_pll_locked(is_locked); + } else { + assert_pll_ownership(); + } return _reference_pending_list; }