Skip to content
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

server/swap: avoid deadlock with maker redeem ack #2021

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

chappjc
Copy link
Member

@chappjc chappjc commented Jan 2, 2023

This resolves the deadlock observed in https://github.com/decred/dcrdex/actions/runs/3824469529/jobs/6506641057#step:5:1100

When deleting a match after receiving the maker's redeem ack (of the
taker's redeem), do not violate established lock ordering of
Swapper.matchMtx and matchTracker.mtx.  This deals with the matchMtx
prior to locking the matchTracker, avoiding a possible deadlock with
another goroutine locking these.

When deleting a match after receiving the maker's redeem ack (of the
taker's redeem), do not violate established lock ordering of
Swapper.matchMtx and matchTracker.mtx.  This deals with the matchMtx
prior to locking the matchTracker, avoiding a possible deadlock with
another goroutine locking these.
@chappjc chappjc added this to the 0.6 milestone Jan 4, 2023
@chappjc chappjc added the bug bug or bugfix label Jan 4, 2023
@chappjc chappjc merged commit 9913e2a into decred:master Jan 11, 2023
@chappjc chappjc deleted the swapper-deadlock branch January 11, 2023 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bug or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants