Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.1.5
-
Untriaged
-
Unknown
Description
There is a potential deadlock due to lock inversion warning issued by the thread sanitizer. This could during disconnection of a view engine connection on replica vbucket.
http://cv.jenkins.couchbase.com/job/ep-engine-threadsanitizer-3.0.x/263/console
Explaining the lock inversion:
(1) Backfill thread sending disk snapshot:
streamMutex (class Stream) ==> snapshotMutex (class VBucket)
(2) Front End thread receiving DCP mutation from active vb:
snapshotMutex (class VBucket) ==> stateLock (class VBucket) ==> streamsMutex (class DcpProducer)
(3) Another front end thread disconnecting the view engine connection:
streamsMutex (class DcpProducer) ==> streamMutex (class Stream)
This issue will be seen only in 3.0.x, but not in 4.x.x (because thread (2) operates bit differently in 4.x.x)
Also, it would be pretty rare to close a view engine connection forcibly when a backfill is still running.
Attachments
Issue Links
- blocks
-
MB-19323 3.1.6 release
- Closed