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/internal/regtest/codelens: unrecognized failures #58054

Closed
gopherbot opened this issue Jan 26, 2023 · 11 comments
Closed

x/tools/gopls/internal/regtest/codelens: unrecognized failures #58054

gopherbot opened this issue Jan 26, 2023 · 11 comments
Assignees
Labels
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

@gopherbot
Copy link

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/codelens" && test == ""

Issue created automatically to collect these failures.

Example (log):

signal: segmentation fault

watchflakes

@gopherbot gopherbot added 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. labels Jan 26, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/codelens" && test == ""
2023-01-25 23:57 darwin-amd64-11_0 tools@82707575 go@4df10fba x/tools/gopls/internal/regtest/codelens (log)
signal: segmentation fault
2023-01-25 23:57 darwin-amd64-11_0 tools@82707575 go@cea70301 x/tools/gopls/internal/regtest/codelens (log)
signal: segmentation fault

watchflakes

@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jan 26, 2023
@gopherbot gopherbot added this to the Unreleased milestone Jan 26, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/codelens" && test == ""
2023-01-25 23:57 darwin-amd64-10_15 tools@82707575 go@4df10fba x/tools/gopls/internal/regtest/codelens (log)
signal: segmentation fault
2023-01-25 23:57 darwin-amd64-10_15 tools@82707575 go@cea70301 x/tools/gopls/internal/regtest/codelens (log)
signal: segmentation fault

watchflakes

@gopherbot gopherbot reopened this Mar 8, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/codelens" && test == ""
2023-03-07 18:17 solaris-amd64-oraclerel tools@75c657b1 go@74a9d283 x/tools/gopls/internal/regtest/codelens (log)
fork/exec /opt/golang/tmp/workdir-host-solaris-oracle-amd64-oraclerel/tmp/go-build2183781231/b513/codelens.test: exec format error

watchflakes

@findleyr
Copy link
Contributor

codelens.test: exec format error

This looks like a builder problem.

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/codelens" && test == ""
2023-11-02 20:25 windows-amd64-race tools@970eac5e go@998fdce3 x/tools/gopls/internal/regtest/codelens (log)
2023/11/02 20:35:12 error killing the Go command: invalid argument
PASS
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x30 pc=0x9a1776]

goroutine 6664 [running]:
golang.org/x/tools/internal/gopathwalk.(*walker).walk(0xc000c93de0, {0xc00308b730, 0x66}, {0x0, 0x0}, {0x1ad9c00, 0xc003042e70?})
	C:/workdir/gopath/src/golang.org/x/tools/internal/gopathwalk/walk.go:188 +0x76
path/filepath.WalkDir({0xc00308b730, 0x66}, 0xc000c93dd0)
	C:/workdir/go/src/path/filepath/path.go:541 +0x69
golang.org/x/tools/internal/gopathwalk.walkDir({{0xc007896310?, 0xc006c59b60?}, 0x0?}, 0xc0026f26a0, 0xc0026f2690, {0x0?, 0xd0?})
	C:/workdir/gopath/src/golang.org/x/tools/internal/gopathwalk/walk.go:98 +0x3bb
golang.org/x/tools/internal/gopathwalk.WalkSkip(...)
	C:/workdir/gopath/src/golang.org/x/tools/internal/gopathwalk/walk.go:64
golang.org/x/tools/internal/imports.(*ModuleResolver).scan.func4()
	C:/workdir/gopath/src/golang.org/x/tools/internal/imports/mod.go:524 +0x45e
created by golang.org/x/tools/internal/imports.(*ModuleResolver).scan
	C:/workdir/gopath/src/golang.org/x/tools/internal/imports/mod.go:508 +0x86c

watchflakes

@gopherbot gopherbot reopened this Nov 2, 2023
@findleyr
Copy link
Contributor

findleyr commented Nov 7, 2023

CC @bcmills -- could this be related to recent changes in gopathwalk?

@bcmills
Copy link
Contributor

bcmills commented Nov 7, 2023

Seems likely. I'll take a look!

@bcmills
Copy link
Contributor

bcmills commented Nov 7, 2023

Just recording some debugging info.

I suspect that something in the test may have deleted a file or directory out from under the walk, and the error — which is usually buried — resulted in a panic due to the nil DirEntry interface. I will send a fix.

@bcmills bcmills self-assigned this Nov 7, 2023
@gopherbot
Copy link
Author

Change https://go.dev/cl/539480 mentions this issue: internal/gopathwalk: rationalize error handling in walker.walk

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/codelens" && test == ""
2023-11-28 21:19 darwin-amd64-longtest tools@4cbc0533 go@aae77346 x/tools/gopls/internal/regtest/codelens (log)
DETECTED A HANGING GO COMMAND

The gopls test runner has detected a hanging go command. In order to debug
this, the output of ps and lsof/fstat is printed below.

See golang/go#54461 for more details.

ps axo ppid,pid,command:
-------------------------
 PPID   PID COMMAND
...
panic: detected hanging go command (pid 24231): see golang/go#54461 for more details

goroutine 11093 [running]:
golang.org/x/tools/internal/gocommand.HandleHangingGoCommand(0xc0014e15c0)
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:442 +0x419
golang.org/x/tools/internal/gocommand.runCmdContext({0x60c8248, 0xc000e6ef60}, 0xc000d83a20)
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:375 +0x4a5
golang.org/x/tools/internal/gocommand.(*Invocation).run(0xc001275fc8, {0x60c8248, 0xc000e6ef60}, {0x60bf7e8, 0xc000e6f080}, {0x60bf7e8, 0xc000e6f0b0})
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:270 +0x1012
golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError(0xc001275f90?, {0x60c8248, 0xc000e6ef60}, {0x60bf7e8?, 0xc000e6f080?}, {0x60bf7e8, 0xc000e6f0b0})
...
golang.org/x/tools/gopls/internal/lsp/cache.(*Snapshot).load(0xc000a0c240, {0x60c8280, 0xc000e65ae0}, 0x1, {0xc002610f80, 0x2, 0x4d5d6488?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/load.go:135 +0xcd1
golang.org/x/tools/gopls/internal/lsp/cache.(*Snapshot).loadWorkspace(0xc000a0c240, {0x60c8280, 0xc000e65ae0}, 0x1)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/view.go:860 +0x25d
golang.org/x/tools/gopls/internal/lsp/cache.(*Snapshot).initialize(0xc000a0c240, {0x60c8280, 0xc000e65ae0}, 0x1)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/view.go:771 +0x17d
golang.org/x/tools/gopls/internal/lsp/cache.(*Session).createView.func2()
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/session.go:209 +0x3e
created by golang.org/x/tools/gopls/internal/lsp/cache.(*Session).createView in goroutine 11053
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/session.go:207 +0xa28

watchflakes

@gopherbot gopherbot reopened this Nov 29, 2023
@findleyr
Copy link
Contributor

This flake is https://go.dev/issue/54461; not sure why it wasn't de-duped to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Status: Done
Development

No branches or pull requests

4 participants