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

remove deadlock in GetOrHandshake #1151

Merged
merged 1 commit into from
May 29, 2024
Merged

remove deadlock in GetOrHandshake #1151

merged 1 commit into from
May 29, 2024

Conversation

wadey
Copy link
Member

@wadey wadey commented May 28, 2024

We had a rare deadlock in GetOrHandshake because we kept the hostmap lock when we do the call to StartHandshake. StartHandshake can block while sending to the lighthouse query worker channel, and that worker needs to be able to grab the hostmap lock to do its work. Other calls for StartHandshake don't hold the hostmap lock so we should be able to drop it here.

This lock was originally added with: #954

We had a rare deadlock in GetOrHandshake because we kept the hostmap
lock when we do the call to StartHandshake. StartHandshake can block
while sending to the lighthouse query worker channel, and that worker
needs to be able to grab the hostmap lock to do its work. Other calls
for StartHandshake don't hold the hostmap lock so we should be able to
drop it here.

This lock was originally added with: #954
@wadey wadey added this to the v1.10.0 milestone May 28, 2024
@wadey wadey modified the milestones: v1.10.0, v1.9.1 May 29, 2024
@wadey wadey added the bug Something isn't working label May 29, 2024
@wadey wadey merged commit 4eb1da0 into master May 29, 2024
9 checks passed
@wadey wadey deleted the start-handshake-deadlock branch May 29, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants