Skip to content

Conversation

sipa
Copy link
Member

@sipa sipa commented Apr 17, 2012

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.

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.
@gavinandresen
Copy link
Contributor

ACK

sipa added a commit that referenced this pull request Apr 17, 2012
@sipa sipa merged commit caeddc5 into bitcoin:master Apr 17, 2012
coblee pushed a commit to litecoin-project/litecoin that referenced this pull request Jul 17, 2012
@sipa sipa deleted the deadlockfix branch June 23, 2017 00:41
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.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants