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/modfile: TestModFileModification failures #57165

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

gopherbot commented Dec 8, 2022

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/modfile" && test == "TestModFileModification" && date < "2023-01-01"

Issue created automatically to collect these failures.

Example (log):

#### Start Gopls Test Logs for "TestModFileModification/delete_main.go/nested/default"
[Trace - 02:16:00.700 AM] 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,"commitCharactersSupport":false,"documentationFormat":null,"deprecatedSupport":false,"preselectSupport":false,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":false,"resolveSupport":{"properties":null},"insertTextModeSupport":{"valueSet":null},"labelDetailsSupport":false}},"hover":{},"documentSymbol":{},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"rename":{},"foldingRange":{},"publishDiagnostics":{},"semanticTokens":{"requests":{"range":false,"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":"C:\\Users\\gopher\\AppData\\Local\\Temp\\gopls-regtest-4069107217\\TestModFileModification\\delete_main.go\\nested\\default\\gopath","GOPROXY":"file:///C:/Users/gopher/AppData/Local/Temp/gopls-regtest-4069107217/TestModFileModification/delete_main.go/nested/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///C:/Users/gopher/AppData/Local/Temp/gopls-regtest-4069107217/TestModFileModification/delete_main.go/nested/default/work","name":"work"}]}


[Trace - 02:16:00.708 AM] Received response 'initialize - (1)' in 8ms.
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,"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.generate_gopls_mod","gopls.go_get_package","gopls.list_imports","gopls.list_known_packages","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"]},"callHierarchyProvider":true,"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"},"fileOperations":{}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.19.4\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}


[Trace - 02:16:00.710 AM] Sending notification 'initialized'.
...
[Trace - 02:16:02.977 AM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2022/12/08 02:16:02 tidy: diagnosing file:///C:/Users/gopher/AppData/Local/Temp/gopls-regtest-4069107217/TestModFileModification/delete_main.go/nested/default/work/a/go.mod: err: exit status 1: stderr: go: finding module for package example.com/blah\nmod.com imports\n\texample.com/blah: cannot find module providing package example.com/blah: module lookup disabled by GOPROXY=off\n\n"}


#### End Gopls Test Logs for "TestModFileModification/delete_main.go/nested/default"
--- FAIL: TestModFileModification (14.33s)
    --- FAIL: TestModFileModification/delete_main.go (5.78s)
        --- FAIL: TestModFileModification/delete_main.go/nested (2.86s)
            --- FAIL: TestModFileModification/delete_main.go/nested/default (2.86s)
                modfile_test.go:137: removing "a/main.go": remove C:\Users\gopher\AppData\Local\Temp\gopls-regtest-4069107217\TestModFileModification\delete_main.go\nested\default\work\a\main.go: The process cannot access the file because it is being used by another process.

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 Dec 8, 2022
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/modfile" && test == "TestModFileModification"
2022-12-08 02:58 windows-arm64-10 tools@c5343a6a go@dc04f3ba x/tools/gopls/internal/regtest/modfile.TestModFileModification (log)
#### Start Gopls Test Logs for "TestModFileModification/delete_main.go/nested/default"
[Trace - 02:16:00.700 AM] 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,"commitCharactersSupport":false,"documentationFormat":null,"deprecatedSupport":false,"preselectSupport":false,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":false,"resolveSupport":{"properties":null},"insertTextModeSupport":{"valueSet":null},"labelDetailsSupport":false}},"hover":{},"documentSymbol":{},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"rename":{},"foldingRange":{},"publishDiagnostics":{},"semanticTokens":{"requests":{"range":false,"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":"C:\\Users\\gopher\\AppData\\Local\\Temp\\gopls-regtest-4069107217\\TestModFileModification\\delete_main.go\\nested\\default\\gopath","GOPROXY":"file:///C:/Users/gopher/AppData/Local/Temp/gopls-regtest-4069107217/TestModFileModification/delete_main.go/nested/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///C:/Users/gopher/AppData/Local/Temp/gopls-regtest-4069107217/TestModFileModification/delete_main.go/nested/default/work","name":"work"}]}


[Trace - 02:16:00.708 AM] Received response 'initialize - (1)' in 8ms.
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,"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.generate_gopls_mod","gopls.go_get_package","gopls.list_imports","gopls.list_known_packages","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"]},"callHierarchyProvider":true,"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"},"fileOperations":{}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.19.4\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}


[Trace - 02:16:00.710 AM] Sending notification 'initialized'.
...
[Trace - 02:16:02.977 AM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2022/12/08 02:16:02 tidy: diagnosing file:///C:/Users/gopher/AppData/Local/Temp/gopls-regtest-4069107217/TestModFileModification/delete_main.go/nested/default/work/a/go.mod: err: exit status 1: stderr: go: finding module for package example.com/blah\nmod.com imports\n\texample.com/blah: cannot find module providing package example.com/blah: module lookup disabled by GOPROXY=off\n\n"}


#### End Gopls Test Logs for "TestModFileModification/delete_main.go/nested/default"
--- FAIL: TestModFileModification (14.33s)
    --- FAIL: TestModFileModification/delete_main.go (5.78s)
        --- FAIL: TestModFileModification/delete_main.go/nested (2.86s)
            --- FAIL: TestModFileModification/delete_main.go/nested/default (2.86s)
                modfile_test.go:137: removing "a/main.go": remove C:\Users\gopher\AppData\Local\Temp\gopls-regtest-4069107217\TestModFileModification\delete_main.go\nested\default\work\a\main.go: The process cannot access the file because it is being used by another process.

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 Dec 8, 2022
@gopherbot gopherbot added this to the Unreleased milestone Dec 8, 2022
@bcmills bcmills self-assigned this Dec 8, 2022
@gopherbot
Copy link
Author

Change https://go.dev/cl/456119 mentions this issue: gopls/internal/lsp/fake: use robustio.RemoveAll in (*Workdir).RemoveFile

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/modfile" && test == "TestModFileModification"
2023-06-16 16:38 openbsd-amd64-72 tools@a4ed05f1 go@606a5a60 x/tools/gopls/internal/regtest/modfile.TestModFileModification (log)
goroutine profile: total 6
1 @ 0x430f36 0x466765 0x5c1fd5 0x5c1ded 0x5bed4b 0xd8c95d 0xd8c5b0 0x51ebcb 0x46cf81
#	0x466764	runtime/pprof.runtime_goroutineProfileWithLabels+0x24				/tmp/workdir/go/src/runtime/mprof.go:846
#	0x5c1fd4	runtime/pprof.writeRuntimeProfile+0xb4						/tmp/workdir/go/src/runtime/pprof/pprof.go:723
#	0x5c1dec	runtime/pprof.writeGoroutine+0x4c						/tmp/workdir/go/src/runtime/pprof/pprof.go:683
#	0x5bed4a	runtime/pprof.(*Profile).WriteTo+0x14a						/tmp/workdir/go/src/runtime/pprof/pprof.go:330
#	0xd8c95c	golang.org/x/tools/gopls/internal/lsp/regtest.(*Runner).Run.func1.1+0x7c	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/runner.go:209
#	0xd8c5af	golang.org/x/tools/gopls/internal/lsp/regtest.(*Runner).Run.func1+0xc8f		/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/runner.go:257
#	0x51ebca	testing.tRunner+0x10a								/tmp/workdir/go/src/testing/testing.go:1446

...

1 @ 0x43b2d6 0x4697a5 0xc388fd 0x46cf81
#	0x4697a4	time.Sleep+0x124						/tmp/workdir/go/src/runtime/time.go:195
#	0xc388fc	golang.org/x/tools/gopls/internal/lsp/filecache.gc+0x27c	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/lsp/filecache/filecache.go:492

--- FAIL: TestModFileModification (10.46s)
    --- FAIL: TestModFileModification/basic (4.79s)
        --- FAIL: TestModFileModification/basic/nested (2.16s)
            --- FAIL: TestModFileModification/basic/nested/default (2.16s)
                runner.go:210: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: unlinkat /tmp/workdir/tmp/gopls-regtest-2389196202/TestModFileModification/basic/nested/default/proxy/random.org: operation not permitted

watchflakes

@bcmills bcmills closed this as completed 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. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Status: Done
Development

No branches or pull requests

2 participants