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

x/tools/gopls: deadlock involving server shutdown #47170

Closed
findleyr opened this issue Jul 13, 2021 · 1 comment
Closed

x/tools/gopls: deadlock involving server shutdown #47170

findleyr opened this issue Jul 13, 2021 · 1 comment
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Contributor

See https://build.golang.org/log/cb7ce77beb3f3eb1b6369a50ca21bb5de62fb46c

Analysis (this may be incomplete):

goroutine 144
wants snapshot.mu, while holding view.snapshotMu

goroutine 132
wants view.snapshotMu, while holding server.stateMu and session.viewMu

goroutine 113
wants session.viewMu, while holding snapshot.mu

I thought this might have been introduced by CL 309269, but I think it is actually a pre-existing problem. In general, cyclical references between server, session, view, and snapshot leave us susceptible to this type of deadlock.

CC @stamblerre

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jul 13, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jul 13, 2021
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.7.1 Jul 13, 2021
@findleyr findleyr added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 13, 2021
@stamblerre stamblerre modified the milestones: gopls/v0.7.1, gopls/v0.7.2 Jul 26, 2021
@stamblerre stamblerre modified the milestones: gopls/v0.7.2, gopls/on-deck Sep 9, 2021
@findleyr
Copy link
Contributor Author

Closing in favor of #52838

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2022
@golang golang locked and limited conversation to collaborators Jul 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants