-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Fix some benign races #9225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix some benign races #9225
Conversation
This file contains hidden or 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
Thanks! The fDisconnect race was bothering me. utACK |
utACK. All looks good to me. |
utACK dfed983 |
andvgal
pushed a commit
to energicryptocurrency/gen2-energi
that referenced
this pull request
Jan 6, 2019
CryptoCentric
pushed a commit
to absolute-community/absolute
that referenced
this pull request
Feb 25, 2019
random-zebra
added a commit
to PIVX-Project/PIVX
that referenced
this pull request
Aug 2, 2020
b954796 include missing atomic to make CMake linux happy. (furszy) c452676 Make the cs_sendProcessing a LOCK instead of a TRY_LOCK (Matt Corallo) ec23964 Split CNode::cs_vSend: message processing and message sending (Matt Corallo) f9c458a Remove double brackets in addrman (Matt Corallo) e48c0d3 Fix AddrMan locking (Matt Corallo) 2d71f05 Make fDisconnect an std::atomic (Matt Corallo) 0544cc6 net: fix a few cases where messages were sent rather than dropped upon disconnection (furszy) Pull request description: Running 4.2 branch with `enable-debug`. Fixing: ``` POTENTIAL DEADLOCK DETECTED Previous lock order was: pnode->cs_vRecvMsg net.cpp:1830 (TRY) (in thread ) (1) cs_main main.cpp:5275 (in thread ) (2) cs_vSend net.cpp:2465 (in thread ) Current lock order is: (2) pnode->cs_vSend net.cpp:1846 (TRY) (in thread ) (1) cs_main main.cpp:6018 (TRY) (in thread ) ``` Plus, added few more minor possible races fixes too. Back porting: bitcoin#8862 bitcoin#9225 bitcoin#9535 ACKs for top commit: Fuzzbawls: ACK b954796 random-zebra: ACK b954796 Tree-SHA512: e15bd81e51282771ca4cb40689229d54787d72d7ed0ebc5f6f0058d3e252cc6691d8ebfc4670207bcd835d32b7898863651fd2ac74704d6cb4fdd30554d8a83a
zkbot
added a commit
to zcash/zcash
that referenced
this pull request
Jan 28, 2021
cherry-pick upstream locking fixes Cherry-pick bitcoin/bitcoin#9225
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes some benign races reported by helgrind. It makes some things atomic that need it, and fixes locking in addrman so that some log statements cant print garbage.