x/tools/cmd/gopls: data race during package load #30107
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, I am testing on master (40960b6) at time of writing.
What did you do?
Compile
gopls
with-race
. Usecmd/gopls/forward
. Use vscode-go. I am working out of my$GOPATH
using modules, and haveGO111MODULE=on
.The race manifests reliably and almost immediately after loading the editor.
What did you expect to see?
Things working as normal.
What did you see instead?
The race detector reports warnings.
Additional notes
I have verified that the mutex held in
GetPackage()
is the same one every time by adding the following log statement:log.Printf("operating with view mu: %p", &f.view.mu)
. It always reports the same value.It's interesting because it looks like the lsp code is doing the reasonable thing to prevent concurrent writes, but something is going on with the handling of float constants inside the type checker.
Data race warnings:
/cc @stamblerre
The text was updated successfully, but these errors were encountered: