For some reason, the lookup() retry loop (for when happened to
race with a removal and grab an invalid WeakPtr) locked
the lock again. This causes the #3836 crash since the lock
is already locked. It's rare since it requires a lookup between
invalidation of the WeakPtr and removal of the WeakPtr entry.
Fixes: #3836
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit
037900dc7a051ce2293a4ef9d0e71911b29ec159)
break;
}
cond.Wait(lock);
- Mutex::Locker l(lock);
}
return VPtr();
}