The code in add_reference to add a remembered set looks as follows:
X = ... from-region-of-added-card
if (already coarsened(X)) {
exit;
}
...
MutexLocker x(...)
if (region X in sparse PRT) {
add card for region X in sparse PRT
exit
}
...
maybe coarsen PRT for region X
The problem is that while one thread is in the mutex-guarded region, other threads that also want to add a card to PRT for region X might get blocked on the mutex. If the original thread now coarsens the PRT for region X, and the other threads for get into it, they will find that there is no fine and sparse PRT for X, so create a new one.
The code in the mutex guarded section should also check whether the region X has already been coarsened or not.
Apart from memory waste (and minor miscounting of occupied cards) this is benign.
This is a day one bug afaik.