-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Fix potential deadlock #1117
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 potential deadlock #1117
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
Conflict: * cs_main in ProcessMessages() (before calling ProcessMessages) * cs_vSend in CNode::BeginMessage versus: * cs_vSend in ThreadMessageHandler2 (before calling SendMessages) * cs_main in SendMessages Even though cs_vSend is a try_lock, if it succeeds simultaneously with the locking of cs_main in ProcessMessages(), it could cause a deadlock.
ACK |
coblee
pushed a commit
to litecoin-project/litecoin
that referenced
this pull request
Jul 17, 2012
Fix potential deadlock
lateminer
pushed a commit
to lateminer/bitcoin
that referenced
this pull request
Jan 22, 2019
[PORT] Make boost::multi_index comparators const
lateminer
pushed a commit
to lateminer/bitcoin
that referenced
this pull request
Dec 25, 2019
…cts flow. 3fc6ad7 [Refactor] IsColdStakingPurpose method removed from CAdressBookEntry class. (furszy) 363abec [GUI][Model] Sending cold staking addresses flow fully connected. Wallet supporting contact creation, update and removal. (furszy) 4e2dc20 [Wallet][AddressBook] Sending cold staking addresses (contacts) flow created and SetAddressBook & DelAddressBook modified to support their storage, update and removal. (furszy) Pull request description: Essentially before there was no flow to store a remote cold staking address and the label field on the delegation screen was not storing the address properly in the address book ('send' purpose which was presenting the address in an invalid format). This PR has implemented a fully fledged CRUD over the external cold staking addresses. Every of the four actions running on top of the contacts screen and connected to the cold staking screen contacts dropdown. ACKs for top commit: random-zebra: ACK 3fc6ad7 Tree-SHA512: 683364975484a402e23feea9f0248f4626d5c2cdd4facb76fda6f3bf2b04eb4fe6e34bef144d9b7a7d9c1b82b9483447ea052e15f17a6cb746d497771fb9013d
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jun 15, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jun 18, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jun 18, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jun 19, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jun 19, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
Bushstar
pushed a commit
to Bushstar/omnicore
that referenced
this pull request
Jun 22, 2020
ca26920 Add release notes for Omni Core 0.8.2 (dexX7) Pull request description: This pull request updates the release notes for 0.8.2. Tree-SHA512: a41de962139eae3041dfe9d9541975a8ccf0a09776e0b6d7ef0ec6b634da13045ba018d0ab9d6e0e3ae21b06b747063eca4e711aae6488705fbf0d4a8290560f
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jul 7, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jul 8, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jul 8, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jul 8, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jul 10, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jul 11, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
jnewbery
added a commit
to jnewbery/bitcoin
that referenced
this pull request
Jul 24, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
Warchant
pushed a commit
to Warchant/bitcoin
that referenced
this pull request
Aug 6, 2020
This was changed to TRY_LOCK in bitcoin#1117 to fix a potential deadlock between cs_main and cs_vSend. cs_vSend was split into cs_vSend and cs_sendProcessing in bitcoin#9535 (and cs_sendProcessing was changed from a TRY_LOCK to a LOCK in the same PR). Since cs_vSend can no longer be taken before cs_main, revert this to a LOCK(). This commit leaves part of the code with bad indentation. That is fixed by the next (whitespace change only) commit.
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.
Conflict:
versus:
Even though cs_vSend is a try_lock, if it succeeds simultaneously with
the locking of cs_main in ProcessMessages(), it could cause a deadlock.