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/diagnostics: hanging go command failures #55323

Closed
gopherbot opened this issue Sep 21, 2022 · 8 comments
Closed
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

@gopherbot
Copy link

gopherbot commented Sep 21, 2022

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/diagnostics" && test == "" && 
        `DETECTED A HANGING GO COMMAND`

Issue created automatically to collect these failures.

Example (log):

2022/09/20 08:42:37 error killing the Go command: os: process already finished
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:
-------------------------
...
panic: detected hanging go command: see golang/go#54461 for more details

goroutine 17901 [running]:
golang.org/x/tools/internal/gocommand.HandleHangingGoCommand()
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:333 +0x34c
golang.org/x/tools/internal/gocommand.runCmdContext({0x100f61f60, 0x14004c8d9e0}, 0x14005848000)
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:294 +0x2f0
golang.org/x/tools/internal/gocommand.(*Invocation).run(0x1400645d148, {0x100f61f60, 0x14004c8d9e0}, {0x100f5a548?, 0x14003f0d380}, {0x100f5a548?, 0x14003f0d3b0})
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:234 +0xcc4
golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError(0x1400645d110?, {0x100f61f60, 0x14004c8d9e0}, {0x100f5a548?, 0x14003f0d380?}, {0x100f5a548?, 0x14003f0d3b0?})
...
golang.org/x/tools/gopls/internal/lsp/mod.Diagnostics({0x100f61f98, 0x14003fda3c0}, {0x100f6dd78, 0x14002971540})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/mod/diagnostics.go:24 +0x128
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnose(0x14005298a20, {0x100f61f98, 0x14003fadd40}, {0x100f6dd78, 0x14002971540}, 0x0)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:229 +0x24c
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshot(0x14005298a20, {0x100f6dd78, 0x14002971540}, {0x14006365ea0, 0x1, 0x1}, 0xe0?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:156 +0x238
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshots.func1({0x100f6dd78?, 0x14002971540?}, {0x14006365ea0?, 0x14002e2cc60?, 0x140053cd900?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:133 +0x78
created by golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshots
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:131 +0x6c

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. gopls Issues related to the Go language server, gopls. labels Sep 21, 2022
@gopherbot gopherbot added this to the Unreleased milestone Sep 21, 2022
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/diagnostics" && test == ""
2022-09-20 12:40 darwin-arm64-12 tools@df2eb938 go@1eeb257b x/tools/gopls/internal/regtest/diagnostics (log)
2022/09/20 08:42:37 error killing the Go command: os: process already finished
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:
-------------------------
...
panic: detected hanging go command: see golang/go#54461 for more details

goroutine 17901 [running]:
golang.org/x/tools/internal/gocommand.HandleHangingGoCommand()
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:333 +0x34c
golang.org/x/tools/internal/gocommand.runCmdContext({0x100f61f60, 0x14004c8d9e0}, 0x14005848000)
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:294 +0x2f0
golang.org/x/tools/internal/gocommand.(*Invocation).run(0x1400645d148, {0x100f61f60, 0x14004c8d9e0}, {0x100f5a548?, 0x14003f0d380}, {0x100f5a548?, 0x14003f0d3b0})
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:234 +0xcc4
golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError(0x1400645d110?, {0x100f61f60, 0x14004c8d9e0}, {0x100f5a548?, 0x14003f0d380?}, {0x100f5a548?, 0x14003f0d3b0?})
...
golang.org/x/tools/gopls/internal/lsp/mod.Diagnostics({0x100f61f98, 0x14003fda3c0}, {0x100f6dd78, 0x14002971540})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/mod/diagnostics.go:24 +0x128
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnose(0x14005298a20, {0x100f61f98, 0x14003fadd40}, {0x100f6dd78, 0x14002971540}, 0x0)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:229 +0x24c
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshot(0x14005298a20, {0x100f6dd78, 0x14002971540}, {0x14006365ea0, 0x1, 0x1}, 0xe0?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:156 +0x238
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshots.func1({0x100f6dd78?, 0x14002971540?}, {0x14006365ea0?, 0x14002e2cc60?, 0x140053cd900?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:133 +0x78
created by golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshots
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:131 +0x6c

watchflakes

@rsc rsc changed the title x/tools/gopls/internal/regtest/diagnostics: unrecognized failures x/tools/gopls/internal/regtest/diagnostics: hanging go command failures Sep 21, 2022
@rsc
Copy link
Contributor

rsc commented Sep 21, 2022

Changed to watch for DETECTED A HANGING GO COMMAND.

@bcmills
Copy link
Contributor

bcmills commented Sep 21, 2022

Duplicate of #54461

@bcmills bcmills marked this as a duplicate of #54461 Sep 21, 2022
@bcmills
Copy link
Contributor

bcmills commented Sep 21, 2022

(I'll move the watchflakes setup to that issue.)

@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2022
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/diagnostics" && test == "" && 
        `DETECTED A HANGING GO COMMAND`
2023-01-20 02:42 netbsd-386-9_3 tools@a7f033af go@e587a769 x/tools/gopls/internal/regtest/diagnostics (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 11717): see golang/go#54461 for more details

goroutine 8846 [running]:
golang.org/x/tools/internal/gocommand.HandleHangingGoCommand(0xb49e030)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:333 +0x519
golang.org/x/tools/internal/gocommand.runCmdContext({0x8cfc494, 0xafae600}, 0xb548000)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:294 +0x49e
golang.org/x/tools/internal/gocommand.(*Invocation).run(0xa108f3c, {0x8cfc494, 0xafae600}, {0x8cf783c, 0x9d7a5e8}, {0x8cf783c, 0x9d7a600})
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:234 +0xcfe
golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError(0xa108f3c, {0x8cfc494, 0xafae600}, {0x8cf783c, 0x9d7a5e8}, {0x8cf783c, 0x9d7a600})
...
golang.org/x/tools/gopls/internal/lsp/cache.(*snapshot).MetadataForFile(0xb7d0900, {0x8cfc4f4, 0x9d7a2b8}, {0xb1fa540, 0x53})
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/snapshot.go:672 +0x1ec
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseChangedFiles(0xae46510, {0x8cfc4f4, 0x9d7a150}, {0x8d011fc, 0xb7d0900}, {0x9f2fe38, 0x1, 0x1}, 0x0)
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:205 +0x2ba
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshot(0xae46510, {0x8d011fc, 0xb7d0900}, {0x9f2fe38, 0x1, 0x1}, 0x0)
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:158 +0x157
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshots.func1({0x8d011fc, 0xb7d0900}, {0x9f2fe38, 0x1, 0x1})
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:137 +0x8a
created by golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshots
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:135 +0x5c
2023-01-23 17:31 netbsd-386-9_3 tools@ce28f407 go@581603cb x/tools/gopls/internal/regtest/diagnostics (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 17644): see golang/go#54461 for more details

goroutine 26642 [running]:
golang.org/x/tools/internal/gocommand.HandleHangingGoCommand(0xc687b30)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:333 +0x519
golang.org/x/tools/internal/gocommand.runCmdContext({0x8ccd6cc, 0xd89b020}, 0xd42cdc0)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:294 +0x4f0
golang.org/x/tools/internal/gocommand.(*Invocation).run(0xbd87d58, {0x8ccd6cc, 0xd89b020}, {0x8cc8cc8, 0xb397d70}, {0x8cc8cc8, 0xb397d88})
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:234 +0xde3
golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError(0xbfc2558, {0x8ccd6cc, 0xd89b020}, {0x8cc8cc8, 0xb397d70}, {0x8cc8cc8, 0xb397d88})
...
golang.org/x/tools/internal/gocommand.(*Runner).runConcurrent(0xd7c48b8, {0x8ccd6cc, 0xd89b020}, {{0x8a41db5, 0x4}, {0xdbbdb60, 0x4, 0x4}, {0x92165a4, 0x0, ...}, ...})
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:100 +0x1d7
golang.org/x/tools/internal/gocommand.(*Runner).RunRaw(0xd7c48b8, {0x8ccd6cc, 0xd89b020}, {{0x8a41db5, 0x4}, {0xdbbdb60, 0x4, 0x4}, {0x92165a4, 0x0, ...}, ...})
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:75 +0x5e
golang.org/x/tools/go/internal/packagesdriver.GetSizesGolist({0x8ccd6cc, 0xd89b020}, {{0x8a41db5, 0x4}, {0xdbbdb60, 0x4, 0x4}, {0x92165a4, 0x0, 0x0}, ...}, ...)
	/tmp/workdir/gopath/src/golang.org/x/tools/go/internal/packagesdriver/sizes.go:22 +0xd8
golang.org/x/tools/go/packages.goListDriver.func1()
	/tmp/workdir/gopath/src/golang.org/x/tools/go/packages/golist.go:157 +0x124
created by golang.org/x/tools/go/packages.goListDriver
	/tmp/workdir/gopath/src/golang.org/x/tools/go/packages/golist.go:155 +0x325

watchflakes

@gopherbot gopherbot reopened this Jan 25, 2023
@findleyr
Copy link
Contributor

Dupe of #54461. Bryan filed a separate issue for netbsd.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/diagnostics" && test == "" && 
        `DETECTED A HANGING GO COMMAND`
2023-03-21 23:14 netbsd-386-9_3 tools@255eeebb go@ed2442a0 x/tools/gopls/internal/regtest/diagnostics (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 17881): see golang/go#54461 for more details

goroutine 16912 [running]:
golang.org/x/tools/internal/gocommand.HandleHangingGoCommand(0xc6b49f0)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:333 +0x519
golang.org/x/tools/internal/gocommand.runCmdContext({0x8d50acc, 0xc0ee4b0}, 0x9823440)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:294 +0x494
golang.org/x/tools/internal/gocommand.(*Invocation).run(0x9994bbc, {0x8d50acc, 0xc0ee4b0}, {0x8d4bd2c, 0xc05ba88}, {0x8d4bd2c, 0xc05baa0})
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:234 +0xd12
golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError(0x9994bbc, {0x8d50acc, 0xc0ee4b0}, {0x8d4bd2c, 0xc05ba88}, {0x8d4bd2c, 0xc05baa0})
...
golang.org/x/tools/gopls/internal/lsp/cache.(*snapshot).MetadataForFile(0x9823140, {0x8d50aec, 0xbb54570}, {0xc500c40, 0x65})
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/snapshot.go:734 +0x1ee
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseChangedFiles(0xa3e3440, {0x8d50aec, 0xbb544c8}, {0x8d55cbc, 0x9823140}, {0xa266f50, 0x1, 0x1}, 0x0)
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:202 +0x298
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshot(0xa3e3440, {0x8d55cbc, 0x9823140}, {0xa266f50, 0x1, 0x1}, 0x0)
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:158 +0x157
golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshots.func1({0x8d55cbc, 0x9823140}, {0xa266f50, 0x1, 0x1})
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:137 +0x8a
created by golang.org/x/tools/gopls/internal/lsp.(*Server).diagnoseSnapshots in goroutine 16941
	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/diagnostics.go:135 +0x5f

watchflakes

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

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/diagnostics" && test == "" && 
        `DETECTED A HANGING GO COMMAND`
2023-04-10 20:09 netbsd-386-9_3 tools@40fb89cd go@22c1d18a x/tools/gopls/internal/regtest/diagnostics (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 16187): see golang/go#54461 for more details

goroutine 16248 [running]:
golang.org/x/tools/internal/gocommand.HandleHangingGoCommand(0xae0f410)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:341 +0x519
golang.org/x/tools/internal/gocommand.runCmdContext({0x8d6ec00, 0x9688de0}, 0xaa4b3f0)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:302 +0x4fe
golang.org/x/tools/internal/gocommand.(*Invocation).run(0xb839d58, {0x8d6ec00, 0x9688de0}, {0x8d69d8c, 0xc409de8}, {0x8d69d8c, 0xc409e00})
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:235 +0xde3
golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError(0xa773558, {0x8d6ec00, 0x9688de0}, {0x8d69d8c, 0xc409de8}, {0x8d69d8c, 0xc409e00})
...
golang.org/x/tools/internal/gocommand.(*Runner).runConcurrent(0xc20a378, {0x8d6ec00, 0x9688de0}, {{0x8ac6aae, 0x4}, {0xa22c740, 0x4, 0x4}, {0x92f549c, 0x0, ...}, ...})
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:101 +0x17c
golang.org/x/tools/internal/gocommand.(*Runner).RunRaw(0xc20a378, {0x8d6ec00, 0x9688de0}, {{0x8ac6aae, 0x4}, {0xa22c740, 0x4, 0x4}, {0x92f549c, 0x0, ...}, ...})
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:76 +0x5e
golang.org/x/tools/go/internal/packagesdriver.GetSizesGolist({0x8d6ec00, 0x9688de0}, {{0x8ac6aae, 0x4}, {0xa22c740, 0x4, 0x4}, {0x92f549c, 0x0, 0x0}, ...}, ...)
	/tmp/workdir/gopath/src/golang.org/x/tools/go/internal/packagesdriver/sizes.go:22 +0xd8
golang.org/x/tools/go/packages.goListDriver.func1()
	/tmp/workdir/gopath/src/golang.org/x/tools/go/packages/golist.go:157 +0x124
created by golang.org/x/tools/go/packages.goListDriver
	/tmp/workdir/gopath/src/golang.org/x/tools/go/packages/golist.go:155 +0x325

watchflakes

@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2023
@golang golang locked and limited conversation to collaborators Apr 9, 2024
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

4 participants