You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am frequently encountering this in tests involving multiple SDK apps in the same process, on iavl tag v1.3.2. I am working with the latest cosmos-sdk commit, where async pruning is fixed to true.
(*nodeDB).startPruning runs in its own goroutine, created during newNodeDB. (*nodeDB).Close is called on a separate goroutine, e.g. from closing an SDK commitment store. Flow during the deadlock happens as follows:
The Close goroutine acquires the lock on ndb.mtx
Concurrently, the startPruning goroutine enters the default case and attempts to call ndb.mtx.Lock(), but it cannot acquire the lock until the Close goroutine releases it
Therefore, the Close goroutine is blocked reading from ndb.done because the startPruning goroutine cannot advance past acquiring the lock
The text was updated successfully, but these errors were encountered:
I am frequently encountering this in tests involving multiple SDK apps in the same process, on iavl tag v1.3.2. I am working with the latest cosmos-sdk commit, where async pruning is fixed to true.
The relevant code snippets are:
iavl/nodedb.go
Lines 1122 to 1129 in d89d5d2
and
iavl/nodedb.go
Lines 599 to 608 in d89d5d2
(*nodeDB).startPruning
runs in its own goroutine, created duringnewNodeDB
.(*nodeDB).Close
is called on a separate goroutine, e.g. from closing an SDK commitment store. Flow during the deadlock happens as follows:Close
goroutine acquires the lock onndb.mtx
startPruning
goroutine enters the default case and attempts to callndb.mtx.Lock()
, but it cannot acquire the lock until theClose
goroutine releases itClose
goroutine is blocked reading fromndb.done
because thestartPruning
goroutine cannot advance past acquiring the lockThe text was updated successfully, but these errors were encountered: