forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #2925: [BUG] Fix more thread issues
f5ba264 fix another possible deadlock (ale) f162f76 fix: fix data race and remove circular dependency (ale) 9207b8f fix data race: LOCK cs before accessing nodeState (ale) 58e5c8c fix: Solve possible deadlock (ale) Pull request description: This PR fixes more thread issues that ThreadSanitizer showed: first commit: Solve a possible 3-threads deadlock fixed by locking `mempool.cs` before `cs_inventory` (see the comment for the log) second commit: solve the trivial data race where `nodeState` is accessed without locking the corresponding mutex third commit: solve all the issues that the function `getQuorumNodes` had: - `it` iterator was accessed without having the lock on `cs_vPendingMasternodes` which was causing a possible data race - `connman->vNodes` was accessed without locking the mutex `cs_vNodes` (another possible data race) Solved by using the function `connman->ForEachNode` and removing the useless getter. fourth commit: Solve a possible deadlock: lock `cs_vPendingMasternodes` before calling `connmann->ForEachNode(...)` ACKs for top commit: f5ba264 Liquid369: tACK f5ba264 Fuzzbawls: ACK f5ba264 Tree-SHA512: 2fa61ec6b3ad395cbe968874a90f1ec16eb5ddec85d48ddeb438fc92f4ae281d4ff7c5b297b147c4b3bf60d6a4849c0619567e3beccb930a76f61d0815bea1d5
- Loading branch information
Showing
6 changed files
with
13 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters