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

Fix deadlock when waiting for churn thread #1316

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Fix deadlock when waiting for churn thread #1316

merged 1 commit into from
Apr 23, 2024

Conversation

Nettifani
Copy link
Contributor

This patch fixes a deadlock I was running into. Without this fix, I could reproduce the deadlock in about 10 tries on average (on a small repository).

Fixes #1315.

By dropping `churn_tx` before joining `churn_thread`, we ensure that
the churn thread will not wait for more data. This prevents a deadlock
from occuring.
@Nettifani Nettifani requested a review from o2sh as a code owner April 23, 2024 11:50
@o2sh o2sh requested a review from Byron April 23, 2024 11:55
@Nettifani Nettifani changed the title Fix churn thread deadlock Fix deadlock when waiting for churn thread Apr 23, 2024
Copy link
Collaborator

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Oh wow, thanks so much for the fix (and the prior analysis in the respective issue)!

@o2sh o2sh merged commit 8c1ad74 into o2sh:main Apr 23, 2024
11 checks passed
@o2sh o2sh added the fix label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Churn computation sometimes hangs/deadlocks
3 participants