Details
-
Bug
-
Resolution: Fixed
-
Critical
-
Cheshire-Cat
-
Untriaged
-
1
-
Unknown
Description
In http://review.couchbase.org/c/plasma/+/149120, we added new assertion in plasma. We found that there are active writers while newSnapshot() is called. In plasma, memory can be freed (without holding mutex) since it expects that there is no writer being active when a snapshot is taken. This can cause double memory freed. In a small unit test, I can reproduce a variety of crashes and hang when there are concurrent writers during newSnapshot(). This includes
MB-36937
MB-40441
MB-44556
MB-44749
We can also reproduce a number of hangs. When dumping the goroutines during hang, we also see that the gorountines stop at places where there is no mutex.
If we comment out the free memory code in newSnapshot(), the test passes regularly.
Attachments
For Gerrit Dashboard: MB-45230 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
149653,2 | MB-45230 fix checking for pending writer before storage snapshot | unstable | indexing | Status: MERGED | +2 | +1 |
149783,1 | Revert "MB-45230 fix checking for pending writer before storage snapshot" | unstable | indexing | Status: ABANDONED | 0 | 0 |