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 race condition in the thread tracking set #3398

Merged
merged 1 commit into from
Sep 29, 2021
Merged

Conversation

karknu
Copy link
Contributor

@karknu karknu commented Sep 29, 2021

It was possible for threads to get "removed" before spawnOne had added
the threads. This caused those threads to never get removed which would
trigger ratelimiting and eventually the node would refuse to accept new
connections.

Change it so that if the thread isn't inserted yet we will wait for
spawnOne to do it before we remove the thread.

Thanks to @psychomb for helping troubleshoot this problem.

It was possible for threads to get "removed" before spawnOne had added
the threads. This caused those threads to never get removed which would
trigger ratelimiting and eventually the node would refuse to accept new
connections.

Change it so that if the thread isn't inserted yet we will wait for
spawnOne to do it before we remove the thread.

Thanks to @psychomb for helping troubleshoot this problem..
@karknu karknu marked this pull request as ready for review September 29, 2021 07:31
@karknu karknu requested a review from coot as a code owner September 29, 2021 07:31
Copy link
Contributor

@coot coot left a comment

Choose a reason for hiding this comment

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

LGTM

@karknu
Copy link
Contributor Author

karknu commented Sep 29, 2021

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 29, 2021

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.

3 participants