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/misc: flaky test timeouts due to go version stuckness on darwin (of course) #59892

Closed
gopherbot opened this issue Apr 29, 2023 · 5 comments
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. OS-Darwin Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Apr 29, 2023

#!watchflakes
post <- goos == "darwin" && pkg == "golang.org/x/tools/gopls/internal/regtest/misc" && test == "TestGovulncheckInfo" && date < "2023-07-07"

Issue created automatically to collect these failures.

Example (log):

serve.go:434: debug server listening at http://localhost:49249
serve.go:434: debug server listening at http://localhost:49250
#### Start Gopls Test Logs for "TestGovulncheckInfo/default"
[Trace - 18:27:42.709 PM] Sending request 'initialize - (1)'.
Params: {"processId":0,"clientInfo":{"name":"fakeclient","version":"v1.0.0"},"rootUri":"","capabilities":{"workspace":{"workspaceEdit":{"resourceOperations":["rename"]},"didChangeConfiguration":{},"didChangeWatchedFiles":{"dynamicRegistration":true},"configuration":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true,"tagSupport":{"valueSet":[1]}}},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"publishDiagnostics":{},"semanticTokens":{"requests":{"range":null,"full":true},"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":null}},"window":{"workDoneProgress":true}},"initializationOptions":{"codelenses":{"run_govulncheck":true},"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"/tmp/buildlet/tmp/gopls-regtest-3665685573/TestGovulncheckInfo/default/gopath","GOPROXY":"file:///tmp/buildlet/tmp/gopls-regtest-3665685573/TestGovulncheckInfo/default/proxy","GOSUMDB":"off","GOVULNDB":"file:///tmp/buildlet/tmp/vulndb-test1332952649","_GOPLS_TEST_BINARY_RUN_AS_GOPLS":"true","_GOPLS_TEST_VULNCHECK_GOVERSION":"go1.18"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///tmp/buildlet/tmp/gopls-regtest-3665685573/TestGovulncheckInfo/default/work","name":"work"}]}


[Trace - 18:27:42.709 PM] Received response 'initialize - (1)' in 0ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"renameProvider":true,"foldingRangeProvider":true,"selectionRangeProvider":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.apply_fix","gopls.check_upgrades","gopls.edit_go_directive","gopls.fetch_vulncheck_result","gopls.gc_details","gopls.generate","gopls.go_get_package","gopls.list_imports","gopls.list_known_packages","gopls.mem_stats","gopls.regenerate_cgo","gopls.remove_dependency","gopls.reset_go_mod_diagnostics","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor","gopls.workspace_stats"]},"callHierarchyProvider":true,"semanticTokensProvider":{"legend":{"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"]},"range":true,"full":true},"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"devel 0fd6ae548f550bdbee4a434285ff052fb9dc7417\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}

...
panic: test timed out after 10m0s
running tests:
	TestGovulncheckInfo (6m19s)
	TestGovulncheckInfo/default (6m19s)

testing.(*T).Run(0xc000ea0ea0, {0x100b8db6b?, 0x100baa8bb?}, 0xc0047c3a40)
	/tmp/buildlet/go/src/testing/testing.go:1649 +0x3c8
golang.org/x/tools/gopls/internal/lsp/regtest.(*Runner).Run(0xc0003d0f00, 0xc000ea0ea0, {0x100c06ded, 0x165}, 0x100d14df8, {0xc0021432f0, 0x3, 0x5ac?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/runner.go:169 +0x491
golang.org/x/tools/gopls/internal/lsp/regtest.configuredRunner.Run(...)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/regtest.go:66
golang.org/x/tools/gopls/internal/regtest/misc.TestGovulncheckInfo(0xc000ea0ea0)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/regtest/misc/vuln_test.go:797 +0x125
testing.tRunner(0xc000ea0ea0, 0x100d14998)

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 29, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/misc" && test == "TestGovulncheckInfo"
2023-04-28 19:55 darwin-amd64-12_0 tools@5283a017 go@0fd6ae54 x/tools/gopls/internal/regtest/misc.TestGovulncheckInfo (log)
serve.go:434: debug server listening at http://localhost:49249
serve.go:434: debug server listening at http://localhost:49250
#### Start Gopls Test Logs for "TestGovulncheckInfo/default"
[Trace - 18:27:42.709 PM] Sending request 'initialize - (1)'.
Params: {"processId":0,"clientInfo":{"name":"fakeclient","version":"v1.0.0"},"rootUri":"","capabilities":{"workspace":{"workspaceEdit":{"resourceOperations":["rename"]},"didChangeConfiguration":{},"didChangeWatchedFiles":{"dynamicRegistration":true},"configuration":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true,"tagSupport":{"valueSet":[1]}}},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"publishDiagnostics":{},"semanticTokens":{"requests":{"range":null,"full":true},"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":null}},"window":{"workDoneProgress":true}},"initializationOptions":{"codelenses":{"run_govulncheck":true},"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"/tmp/buildlet/tmp/gopls-regtest-3665685573/TestGovulncheckInfo/default/gopath","GOPROXY":"file:///tmp/buildlet/tmp/gopls-regtest-3665685573/TestGovulncheckInfo/default/proxy","GOSUMDB":"off","GOVULNDB":"file:///tmp/buildlet/tmp/vulndb-test1332952649","_GOPLS_TEST_BINARY_RUN_AS_GOPLS":"true","_GOPLS_TEST_VULNCHECK_GOVERSION":"go1.18"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///tmp/buildlet/tmp/gopls-regtest-3665685573/TestGovulncheckInfo/default/work","name":"work"}]}


[Trace - 18:27:42.709 PM] Received response 'initialize - (1)' in 0ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"renameProvider":true,"foldingRangeProvider":true,"selectionRangeProvider":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.apply_fix","gopls.check_upgrades","gopls.edit_go_directive","gopls.fetch_vulncheck_result","gopls.gc_details","gopls.generate","gopls.go_get_package","gopls.list_imports","gopls.list_known_packages","gopls.mem_stats","gopls.regenerate_cgo","gopls.remove_dependency","gopls.reset_go_mod_diagnostics","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor","gopls.workspace_stats"]},"callHierarchyProvider":true,"semanticTokensProvider":{"legend":{"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"]},"range":true,"full":true},"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"devel 0fd6ae548f550bdbee4a434285ff052fb9dc7417\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}

...
panic: test timed out after 10m0s
running tests:
	TestGovulncheckInfo (6m19s)
	TestGovulncheckInfo/default (6m19s)

testing.(*T).Run(0xc000ea0ea0, {0x100b8db6b?, 0x100baa8bb?}, 0xc0047c3a40)
	/tmp/buildlet/go/src/testing/testing.go:1649 +0x3c8
golang.org/x/tools/gopls/internal/lsp/regtest.(*Runner).Run(0xc0003d0f00, 0xc000ea0ea0, {0x100c06ded, 0x165}, 0x100d14df8, {0xc0021432f0, 0x3, 0x5ac?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/runner.go:169 +0x491
golang.org/x/tools/gopls/internal/lsp/regtest.configuredRunner.Run(...)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/regtest.go:66
golang.org/x/tools/gopls/internal/regtest/misc.TestGovulncheckInfo(0xc000ea0ea0)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/regtest/misc/vuln_test.go:797 +0x125
testing.tRunner(0xc000ea0ea0, 0x100d14998)

watchflakes

@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 Apr 29, 2023
@gopherbot gopherbot added this to the Unreleased milestone Apr 29, 2023
@adonovan
Copy link
Member

adonovan commented May 3, 2023

Looks like go version has been stuck for 6 minutes:

goroutine 54233 [syscall, 6 minutes]:
syscall.syscall(0xc000c439f0?, 0x100083509?, 0xc000c43aa8?, 0xc000891800?)
	/tmp/buildlet/go/src/runtime/sys_darwin.go:23 +0x70
syscall.readlen(0x10148a640?, 0x1014599a0?, 0x13?)
	/tmp/buildlet/go/src/syscall/syscall_darwin.go:242 +0x34
syscall.forkExec({0xc0035d92c0?, 0x4b?}, {0xc0052165b0, 0x7, 0x7}, 0xc0035d92c0?)
	/tmp/buildlet/go/src/syscall/exec_unix.go:221 +0x473
syscall.StartProcess(...)
	/tmp/buildlet/go/src/syscall/exec_unix.go:255
os.startProcess({0xc0035d92c0, 0x17}, {0xc0052165b0, 0x7, 0x7}, 0xc000c43d50)
	/tmp/buildlet/go/src/os/exec_posix.go:54 +0x315
os.StartProcess({0xc0035d92c0, 0x17}, {0xc0052165b0, 0x7, 0x7}, 0x100019448?)
	/tmp/buildlet/go/src/os/exec.go:109 +0x54
os/exec.(*Cmd).Start(0xc00bc8fb80)
	/tmp/buildlet/go/src/os/exec/exec.go:693 +0x5df
golang.org/x/tools/internal/gocommand.runCmdContext({0x100e3c070, 0xc0010fd8b0}, 0xc00bc8fb80)
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:328 +0x2a5
golang.org/x/tools/internal/gocommand.(*Invocation).run(0xc000c442f0, {0x100e3c070, 0xc0010fd8b0}, {0x100e33f60?, 0xc0016fb560}, {0x100e33f60?, 0xc0016fb590})
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:249 +0x102f
golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError(0xc000c442b8?, {0x100e3c070, 0xc0010fd8b0}, {0x100e33f60?, 0xc0016fb560?}, {0x100e33f60?, 0xc0016fb590?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:158 +0x59
golang.org/x/tools/internal/gocommand.(*Runner).runConcurrent(0xc004d280c0, {0x100e3c070, 0xc0010fd8b0}, {{0x100b889ec, 0x4}, {0xc0010fd950, 0x5, 0x5}, {0x0, 0x0, ...}, ...})
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:102 +0x165
golang.org/x/tools/internal/gocommand.(*Runner).RunRaw(0xc00446da10?, {0x100e3c070, 0xc0010fd8b0}, {{0x100b889ec, 0x4}, {0xc0010fd950, 0x5, 0x5}, {0x0, 0x0, ...}, ...})
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:77 +0x90
golang.org/x/tools/internal/gocommand.(*Runner).Run(...)
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:59
golang.org/x/tools/internal/gocommand.GoVersion({0x100e3c070, 0xc0010fd8b0}, {{0x100b889ec, 0x4}, {0xc0010fd950, 0x5, 0x5}, {0x0, 0x0, 0x0}, ...}, ...)
	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/version.go:31 +0x1d5
golang.org/x/tools/go/packages.(*golistState).getGoVersion.func1()
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/golist.go:761 +0x145
sync.(*Once).doSlow(0x10179d5b8?, 0x20?)
	/tmp/buildlet/go/src/sync/once.go:74 +0xbf
sync.(*Once).Do(...)
	/tmp/buildlet/go/src/sync/once.go:65
golang.org/x/tools/go/packages.(*golistState).getGoVersion(0xc0046714a0)
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/golist.go:760 +0x45
golang.org/x/tools/go/packages.(*golistState).createDriverResponse(0xc0046714a0, {0xc004d28740, 0x2, 0x2})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/golist.go:450 +0x45
golang.org/x/tools/go/packages.goListDriver(0xc000260008, {0xc004d284c0, 0x2, 0x1006bf382?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/golist.go:200 +0x7c5
golang.org/x/tools/go/packages.defaultDriver(0xc004d8bc30?, {0xc004d284c0, 0x2, 0x2})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages.go:278 +0x53
golang.org/x/tools/go/packages.Load(0xc0002cc000?, {0xc004d284c0, 0x2, 0x2})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages.go:261 +0x48
golang.org/x/tools/gopls/internal/lsp/cache.(*snapshot).load(0xc0002cc000, {0x100e3c070, 0xc0010bf270}, 0x1, {0xc004d28480, 0x2, 0x0?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/load.go:122 +0xc1c
golang.org/x/tools/gopls/internal/lsp/cache.(*snapshot).loadWorkspace(0xc0002cc000, {0x100e3c070, 0xc0010bf270}, 0x1)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/view.go:747 +0x25d
golang.org/x/tools/gopls/internal/lsp/cache.(*snapshot).initialize(0xc0002cc000, {0x100e3c070, 0xc0010bf270}, 0x0?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/view.go:661 +0x185
golang.org/x/tools/gopls/internal/lsp/cache.(*Session).createView.func3()
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/session.go:195 +0x45
created by golang.org/x/tools/gopls/internal/lsp/cache.(*Session).createView in goroutine 54244
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/session.go:193 +0xd4b

@adonovan adonovan changed the title x/tools/gopls/internal/regtest/misc: TestGovulncheckInfo failures x/tools/gopls/internal/regtest/misc: flaky test timeouts due to go version stuckness on darwin (of course) May 3, 2023
@bcmills
Copy link
Contributor

bcmills commented May 3, 2023

That stack trace is more or less consistent with the other macOS hangs that we saw in #54461.
Namely: a read blocked on a pipe somehow fails to unblock when the process on the other end of the pipe goes away.

In #54461 the blocked pipe was the one connected to the child process's stdout or stderr. In the above stack trace, it is the one created by syscall.forkExec for the child process to write errors up to and including the execve call.

@findleyr
Copy link
Contributor

findleyr commented May 5, 2023

I'm moving this to the gopls/v0.13.0 milestone. Unfortunately, I don't think it's actionable for us before v0.12.0.

@bcmills
Copy link
Contributor

bcmills commented Jun 30, 2023

Duplicate of #61080

@bcmills bcmills marked this as a duplicate of #61080 Jun 30, 2023
@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2023
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. OS-Darwin 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