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/completion: TestPackageCompletion failures #61442

Closed
gopherbot opened this issue Jul 19, 2023 · 3 comments
Closed
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
default <- pkg == "golang.org/x/tools/gopls/internal/regtest/completion" && test == "TestPackageCompletion"

Issue created automatically to collect these failures.

Example (log):

#### Start Gopls Test Logs for "TestPackageCompletion/package_completion_for_empty_file/default"
[Trace - 20:06:23.684 PM] Sending request 'initialize - (1)'.
Params: {"processId":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":{"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"/tmp/buildlet/tmp/gopls-regtest-649311811/TestPackageCompletion/package_completion_for_empty_file/default/gopath","GOPROXY":"file:///tmp/buildlet/tmp/gopls-regtest-649311811/TestPackageCompletion/package_completion_for_empty_file/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///tmp/buildlet/tmp/gopls-regtest-649311811/TestPackageCompletion/package_completion_for_empty_file/default/work","name":"work"}]}


[Trace - 20:06:23.684 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_go_work_command","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.start_profile","gopls.stop_profile","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 700727151fe3772ecc2315af101d2e5d93269c0c\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}


[Trace - 20:06:23.686 PM] Sending notification 'initialized'.
...
--- FAIL: TestPackageCompletion (12.80s)
    --- FAIL: TestPackageCompletion/package_completion_for_empty_file (1.30s)
        --- FAIL: TestPackageCompletion/package_completion_for_empty_file/default (1.30s)
            completion_test.go:207: completion item mismatch (-want +got):
                  []string(
                - 	{
                - 		"package apple", "package apple_test", "package fruits", "package fruits_test",
                - 		"package main",
                - 	},
                + 	nil,
                  )

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 Jul 19, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/regtest/completion" && test == "TestPackageCompletion"
2023-07-18 23:25 darwin-amd64-12_0 tools@84f829e2 go@70072715 x/tools/gopls/internal/regtest/completion.TestPackageCompletion (log)
#### Start Gopls Test Logs for "TestPackageCompletion/package_completion_for_empty_file/default"
[Trace - 20:06:23.684 PM] Sending request 'initialize - (1)'.
Params: {"processId":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":{"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"/tmp/buildlet/tmp/gopls-regtest-649311811/TestPackageCompletion/package_completion_for_empty_file/default/gopath","GOPROXY":"file:///tmp/buildlet/tmp/gopls-regtest-649311811/TestPackageCompletion/package_completion_for_empty_file/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///tmp/buildlet/tmp/gopls-regtest-649311811/TestPackageCompletion/package_completion_for_empty_file/default/work","name":"work"}]}


[Trace - 20:06:23.684 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_go_work_command","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.start_profile","gopls.stop_profile","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 700727151fe3772ecc2315af101d2e5d93269c0c\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}


[Trace - 20:06:23.686 PM] Sending notification 'initialized'.
...
--- FAIL: TestPackageCompletion (12.80s)
    --- FAIL: TestPackageCompletion/package_completion_for_empty_file (1.30s)
        --- FAIL: TestPackageCompletion/package_completion_for_empty_file/default (1.30s)
            completion_test.go:207: completion item mismatch (-want +got):
                  []string(
                - 	{
                - 		"package apple", "package apple_test", "package fruits", "package fruits_test",
                - 		"package main",
                - 	},
                + 	nil,
                  )

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 Jul 19, 2023
@gopherbot gopherbot added this to the Unreleased milestone Jul 19, 2023
@jamalc jamalc modified the milestones: Unreleased, gopls/v0.12.5 Jul 20, 2023
@adonovan
Copy link
Member

The log indicates that the go command had a fatal error due to a deadlock:

packages.Load error: err: exit status 2: stderr: fatal error: all goroutines are asleep - deadlock!

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc0002868d0?)
	runtime/sema.go:62 +0x25
sync.(*WaitGroup).Wait(0x0?)
	sync/waitgroup.go:116 +0x48
cmd/go/internal/work.(*Builder).Do(0xc000094370, {0x178ab90, 0x1b2dbe0}, 0xc00028c2c0)
	cmd/go/internal/work/exec.go:228 +0x4b5
cmd/go/internal/list.runList({0x178ab90?, 0x1b2dbe0}, 0x1af1b00?, {0xc0000221c0?, 0x2, 0x2})
	cmd/go/internal/list/list.go:736 +0x118d
main.invoke(0x1af1b00, {0xc000022100, 0xe, 0xe})
	cmd/go/main.go:264 +0x5f1
main.main()
	cmd/go/main.go:182 +0x778

goroutine 16 [select]:
cmd/go/internal/work.(*Builder).Do.func4()
	cmd/go/internal/work/exec.go:209 +0x108
created by cmd/go/internal/work.(*Builder).Do in goroutine 1
	cmd/go/internal/work/exec.go:205 +0x405

goroutine 17 [select]:
cmd/go/internal/work.(*Builder).Do.func4()
	cmd/go/internal/work/exec.go:209 +0x108
created by cmd/go/internal/work.(*Builder).Do in goroutine 1
	cmd/go/internal/work/exec.go:205 +0x405

goroutine 15 [chan receive]:
os/exec.(*Cmd).awaitGoroutines(0xc00023a160, 0x0)
	os/exec/exec.go:941 +0x211
os/exec.(*Cmd).Wait(0xc00023a160)
	os/exec/exec.go:908 +0x16c
os/exec.(*Cmd).Run(0xc000236060?)
	os/exec/exec.go:590 +0x2d
cmd/go/internal/work.(*Builder).toolID(0xc000094370, {0x167beb5, 0x7})
	cmd/go/internal/work/buildid.go:167 +0x350
cmd/go/internal/work.(*Builder).buildActionID(0xc000094370, 0xc00028c6e0)
	cmd/go/internal/work/exec.go:329 +0xdee
cmd/go/internal/work.(*Builder).build(0xc000094370, {0x178ab90?, 0x1b2dbe0?}, 0xc00028c6e0)
	cmd/go/internal/work/exec.go:465 +0x195
cmd/go/internal/work.ActorFunc.Act(0x178ab90?, 0x1b2dbe0?, {0x178ab90?, 0x1b2dbe0?}, 0x0?)
	cmd/go/internal/work/action.go:78 +0x2d
cmd/go/internal/work.(*Builder).Do.func3({0x178ab90, 0x1b2dbe0}, 0xc00028c6e0)
	cmd/go/internal/work/exec.go:151 +0x7e4
cmd/go/internal/work.(*Builder).Do.func4()
	cmd/go/internal/work/exec.go:219 +0xa8
created by cmd/go/internal/work.(*Builder).Do in goroutine 1
	cmd/go/internal/work/exec.go:205 +0x405

goroutine 18 [select]:
cmd/go/internal/work.(*Builder).Do.func4()
	cmd/go/internal/work/exec.go:209 +0x108
created by cmd/go/internal/work.(*Builder).Do in goroutine 1
	cmd/go/internal/work/exec.go:205 +0x405

goroutine 19 [select]:
cmd/go/internal/work.(*Builder).Do.func4()
	cmd/go/internal/work/exec.go:209 +0x108
created by cmd/go/internal/work.(*Builder).Do in goroutine 1
	cmd/go/internal/work/exec.go:205 +0x405

goroutine 20 [select]:
cmd/go/internal/work.(*Builder).Do.func4()
	cmd/go/internal/work/exec.go:209 +0x108
created by cmd/go/internal/work.(*Builder).Do in goroutine 1
	cmd/go/internal/work/exec.go:205 +0x405

goroutine 33 [IO wait]:
internal/poll.runtime_pollWait(0x212bab8, 0x72)
	runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xc000302000?, 0xc00024e000?, 0x1)
	internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000302000, {0xc00024e000, 0x8000, 0x8000})
	internal/poll/fd_unix.go:164 +0x27a
os.(*File).read(...)
	os/file_posix.go:29
os.(*File).Read(0xc000300000, {0xc00024e000?, 0x9b?, 0x0?})
	os/file.go:118 +0x52
io.copyBuffer({0x1785340, 0xc000216120}, {0x17852c0, 0xc000300000}, {0x0, 0x0, 0x0})
	io/io.go:430 +0x1a6
io.Copy(...)
	io/io.go:389
os/exec.(*Cmd).writerDescriptor.func1()
	os/exec/exec.go:560 +0x34
os/exec.(*Cmd).Start.func2(0x0?)
	os/exec/exec.go:717 +0x2c
created by os/exec.(*Cmd).Start in goroutine 15
	os/exec/exec.go:716 +0xa0a

@bcmills

@bcmills
Copy link
Contributor

bcmills commented Jul 25, 2023

Duplicate of #61454

@bcmills bcmills marked this as a duplicate of #61454 Jul 25, 2023
@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 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. 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