Skip to content

Conversation

@UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Apr 26, 2020

My nodes running on develop keep getting stuck randomly every day or two. I believe it's because of deadlocks introduced in 78d303c. Had to disable scheduler in validation interface to find them 6047b18a84 https://travis-ci.org/github/UdjinM6/dash/builds/679522457. With these patches applied on top of that branch tests pass again (no deadlocks).

@UdjinM6 UdjinM6 added this to the 16 milestone Apr 26, 2020
UdjinM6 added 2 commits April 26, 2020 14:07
This fixes deadlocks introduced in 78d303c/dashpay#3361
POTENTIAL DEADLOCK DETECTED
Previous lock order was:
 pnode->cs_sendProcessing  net.cpp:2724
 cs_main  net_processing.cpp:3867 (TRY)
 (1) pto->cs_inventory  net_processing.cpp:4106
 (2) cs  txmempool.cpp:1137
Current lock order is:
 cs_main  wallet/rpcwallet.cpp:468
 (2) mempool.cs  wallet/rpcwallet.cpp:468
 pwallet->cs_wallet  wallet/rpcwallet.cpp:469
 cs_main  wallet/wallet.cpp:4045
 (2) mempool.cs  wallet/wallet.cpp:4045
 cs_wallet  wallet/wallet.cpp:4046
 cs_vNodes  net.cpp:3464
 (1) cs_inventory  ./net.h:1056
Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@UdjinM6 UdjinM6 requested a review from codablock April 27, 2020 12:47
@UdjinM6 UdjinM6 merged commit b0963b0 into dashpay:develop May 2, 2020
@UdjinM6 UdjinM6 deleted the fixdeadlocks branch November 26, 2020 13:26
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Feb 14, 2022
* Lock mempool before locking cs_wallet

This fixes deadlocks introduced in 78d303c/dashpay#3361

* Fix mempool.cs vs cs_inventory potential deadlock

POTENTIAL DEADLOCK DETECTED
Previous lock order was:
 pnode->cs_sendProcessing  net.cpp:2724
 cs_main  net_processing.cpp:3867 (TRY)
 (1) pto->cs_inventory  net_processing.cpp:4106
 (2) cs  txmempool.cpp:1137
Current lock order is:
 cs_main  wallet/rpcwallet.cpp:468
 (2) mempool.cs  wallet/rpcwallet.cpp:468
 pwallet->cs_wallet  wallet/rpcwallet.cpp:469
 cs_main  wallet/wallet.cpp:4045
 (2) mempool.cs  wallet/wallet.cpp:4045
 cs_wallet  wallet/wallet.cpp:4046
 cs_vNodes  net.cpp:3464
 (1) cs_inventory  ./net.h:1056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants