// Rechecking if the region is coarsened, while holding the lock.
if (is_region_coarsened(from_hrm_ind)) {
assert(contains_reference(from), "We just found " PTR_FORMAT " in the Coarse table", p2i(from));
return;
}
The problem is the contains_reference() call, that tries to lock the same Mutex while already holding that same lock. Actually the comment above that "if" says that we're holding the lock....
So Mutex code correctly asserts with
assert(owner() != self) failed: invariant
The fix is to call contains_reference_locked() instead.
The original author of
- relates to
-
JDK-8242032 G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions
-
- Resolved
-