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

avoid deadlock in lighthouse queryWorker #1112

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Conversation

wadey
Copy link
Member

@wadey wadey commented Apr 11, 2024

If the lighthouse queryWorker tries to call StartHandshake on a lighthouse vpnIp, we can deadlock on the handshake_manager lock. This change drops the handshake_manager lock before we send on the lighthouse queryChan (which could block), and also avoids sending to the channel if this is a lighthouse IP itself.

we added this in #996 but removed it in #1044

If the lighthouse queryWorker tries to grab to call StartHandshake on
a lighthouse vpnIp, we can deadlock on the handshake_manager lock. This
change drops the handshake_manager lock before we send on the lighthouse
queryChan (which could block), and also avoids sending to the channel if
this is a lighthouse IP itself.
@wadey wadey added this to the v1.9.0 milestone Apr 11, 2024
@wadey wadey merged commit 7efa750 into master Apr 11, 2024
7 checks passed
@wadey wadey deleted the lighthouse-query-chan-lock branch April 11, 2024 21:00
@wadey wadey mentioned this pull request May 6, 2024
28 tasks
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