-
Notifications
You must be signed in to change notification settings - Fork 815
Fix potential deadlock in case of lsp shutdown #2499
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
Thanks for looking into this. We really shouldn't have code that actually uses |
Along these lines ... ? |
1732720 to
84988c2
Compare
84988c2 to
3794e61
Compare
dc68319 to
c2630cc
Compare
|
The latest CI error is again caused by this: #2485 |
|
I don't know how you're hitting these races in CI so often when I don't even remember seeing them anywhere until now 😅 |
Hah I guess that's just because I'm working on this in so many incremental steps because I'm so inexperienced with this codebase (and Go, frankly) that I trigger more CI runs than you maybe? ;-) |
jakebailey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this is good, now.
The LSP server could deadlock during shutdown when background tasks or handlers attempted to send messages (logs, diagnostics, responses) to the
outgoingQueueafter thewriteLoophad exited. With no consumer draining the queue, these blocking channel sends would previously hang forever.