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 potential p2p shutdown hangup #10839

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Fix potential p2p shutdown hangup #10839

merged 1 commit into from
Jun 21, 2024

Conversation

yperbasis
Copy link
Member

Copy PR #10626 into main

This is a fix for: 

#10192

This fixes is a deadlock in v4_udp.go where 
* Thread A waits on mutex.Lock() in resetTimeout() called after reading
listUpdate channel.
* Thread B waits on listUpdate <- plist.PushBack(p) called after locking
mutex.Lock()
  
This fix decouples the list operations which need locking from the
channel operations which don't by storing the changes in local
variables. These updates are used for resetting a timeout - which is not
order dependent.
@battlmonstr battlmonstr merged commit b16049b into main Jun 21, 2024
10 checks passed
@battlmonstr battlmonstr deleted the pick10626 branch June 21, 2024 11:28
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