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/internal/lsp: TestLSP/GOPATH failure with "race detected during execution of test" #54276

Closed
dmitshur opened this issue Aug 4, 2022 · 3 comments
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. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Aug 4, 2022

2022/08/02 19:20:54 New session
	create_session=1
2022/08/02 19:20:56 go/packages.Load #1
[...]
==================
WARNING: DATA RACE
Read at 0x00c0086205a0 by goroutine 34461:
  golang.org/x/tools/internal/lsp/cache.(*snapshot).load()
      /tmp/workdir/gopath/src/golang.org/x/tools/internal/lsp/cache/load.go:144 +0x11a6
  golang.org/x/tools/internal/lsp/cache.(*snapshot).loadWorkspace()
      /tmp/workdir/gopath/src/golang.org/x/tools/internal/lsp/cache/view.go:710 +0x38b
  golang.org/x/tools/internal/lsp/cache.(*snapshot).initialize()
      /tmp/workdir/gopath/src/golang.org/x/tools/internal/lsp/cache/view.go:645 +0x229
  golang.org/x/tools/internal/lsp/cache.(*Session).createView.func4()
      /tmp/workdir/gopath/src/golang.org/x/tools/internal/lsp/cache/session.go:268 +0x8d

Previous write at 0x00c0086205a0 by goroutine 34426:
  golang.org/x/tools/internal/lsp/cache.(*View).SetOptions()
[...]
2022/08/02 19:22:47 go/packages.Load #30
	snapshot=1
	package="command-line-arguments"
	files=[/tmp/workdir/go/src/builtin/builtin.go]
2022/08/02 19:22:47 go/packages.Load #30: updating metadata for 1 packages
2022/08/02 19:22:49 no signature help: no signature help within a string literal
	position={49 5}
2022/08/02 19:22:49 no signature help: no signature help within a function declaration
	position={76 2}
--- FAIL: TestLSP (119.09s)
    --- FAIL: TestLSP/GOPATH (48.73s)
        testing.go:1319: race detected during execution of test
    testing.go:1319: race detected during execution of test
FAIL
FAIL	golang.org/x/tools/internal/lsp	119.292s

2022-08-02T18:52:36-0d04f65-4345620/freebsd-amd64-race

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 4, 2022
@dmitshur dmitshur added this to the Unreleased milestone Aug 4, 2022
@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 Aug 4, 2022
@findleyr
Copy link
Member

findleyr commented Aug 5, 2022

Dupe of #54214.

@findleyr findleyr closed this as completed Aug 5, 2022
@dmitshur
Copy link
Contributor Author

dmitshur commented Aug 5, 2022

Thanks and sorry I missed it. I changed the prefix in the title of #54214 to follow the usual convention so it'll be easier to find.

@findleyr
Copy link
Member

findleyr commented Aug 5, 2022

Thanks, don't know what I was thinking with that issue title! (how many issues have I filed...?!)

@golang golang locked and limited conversation to collaborators Aug 5, 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. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. 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