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/test: shutdown failures with "directory not empty" #64971

Closed
gopherbot opened this issue Jan 5, 2024 · 12 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
Contributor

gopherbot commented Jan 5, 2024

#!watchflakes
default <- pkg ~ `^golang.org/x/tools/gopls/internal/test` && `directory not empty`

Issue created automatically to collect these failures.

Example (log):

serve.go:443: debug server listening at http://localhost:49278
serve.go:443: debug server listening at http://localhost:49279
goroutine profile: total 10
2 @ 0x103cf4e 0x1036137 0x106a7a5 0x10a9387 0x10ae86c 0x10ae85a 0x1240c49 0x125537e 0x1254550 0x163bfe4 0x181b4a5 0x181b4a6 0x1070d21
#	0x106a7a4	internal/poll.runtime_pollWait+0x84					/tmp/buildlet/go/src/runtime/netpoll.go:343
#	0x10a9386	internal/poll.(*pollDesc).wait+0x26					/tmp/buildlet/go/src/internal/poll/fd_poll_runtime.go:84
#	0x10ae86b	internal/poll.(*pollDesc).waitRead+0x2ab				/tmp/buildlet/go/src/internal/poll/fd_poll_runtime.go:89
#	0x10ae859	internal/poll.(*FD).Accept+0x299					/tmp/buildlet/go/src/internal/poll/fd_unix.go:611
#	0x1240c48	net.(*netFD).accept+0x28						/tmp/buildlet/go/src/net/fd_unix.go:172
#	0x125537d	net.(*TCPListener).accept+0x1d						/tmp/buildlet/go/src/net/tcpsock_posix.go:152
...
1 @ 0x103cf4e 0x104d305 0x1264985 0x1070d21
#	0x1264984	golang.org/x/tools/internal/jsonrpc2.Serve+0x384	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x103cf4e 0x106d885 0x13d5b76 0x1070d21
#	0x106d884	time.Sleep+0x124					/tmp/buildlet/go/src/runtime/time.go:195
#	0x13d5b75	golang.org/x/tools/gopls/internal/filecache.gc+0x275	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestRenamePackage_NestedModule (3.61s)
    --- FAIL: TestRenamePackage_NestedModule/default (3.61s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: unlinkat /tmp/buildlet/tmp/gopls-test-4165152782/TestRenamePackage_NestedModule/default: directory not empty

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 Jan 5, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/integration/misc" && test == "TestRenamePackage_NestedModule"
2024-01-03 12:29 darwin-amd64-nocgo tools@a863a4fc go@f6b203c8 x/tools/gopls/internal/test/integration/misc.TestRenamePackage_NestedModule (log)
serve.go:443: debug server listening at http://localhost:49278
serve.go:443: debug server listening at http://localhost:49279
goroutine profile: total 10
2 @ 0x103cf4e 0x1036137 0x106a7a5 0x10a9387 0x10ae86c 0x10ae85a 0x1240c49 0x125537e 0x1254550 0x163bfe4 0x181b4a5 0x181b4a6 0x1070d21
#	0x106a7a4	internal/poll.runtime_pollWait+0x84					/tmp/buildlet/go/src/runtime/netpoll.go:343
#	0x10a9386	internal/poll.(*pollDesc).wait+0x26					/tmp/buildlet/go/src/internal/poll/fd_poll_runtime.go:84
#	0x10ae86b	internal/poll.(*pollDesc).waitRead+0x2ab				/tmp/buildlet/go/src/internal/poll/fd_poll_runtime.go:89
#	0x10ae859	internal/poll.(*FD).Accept+0x299					/tmp/buildlet/go/src/internal/poll/fd_unix.go:611
#	0x1240c48	net.(*netFD).accept+0x28						/tmp/buildlet/go/src/net/fd_unix.go:172
#	0x125537d	net.(*TCPListener).accept+0x1d						/tmp/buildlet/go/src/net/tcpsock_posix.go:152
...
1 @ 0x103cf4e 0x104d305 0x1264985 0x1070d21
#	0x1264984	golang.org/x/tools/internal/jsonrpc2.Serve+0x384	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x103cf4e 0x106d885 0x13d5b76 0x1070d21
#	0x106d884	time.Sleep+0x124					/tmp/buildlet/go/src/runtime/time.go:195
#	0x13d5b75	golang.org/x/tools/gopls/internal/filecache.gc+0x275	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestRenamePackage_NestedModule (3.61s)
    --- FAIL: TestRenamePackage_NestedModule/default (3.61s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: unlinkat /tmp/buildlet/tmp/gopls-test-4165152782/TestRenamePackage_NestedModule/default: directory not empty

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 Jan 5, 2024
@gopherbot gopherbot added this to the Unreleased milestone Jan 5, 2024
@findleyr findleyr changed the title x/tools/gopls/internal/test/integration/misc: TestRenamePackage_NestedModule failures x/tools/gopls/internal/test: shutdown failures with "directory not empty" Jan 6, 2024
@findleyr
Copy link
Member

findleyr commented Jan 6, 2024

This must be caused by https://go.dev/cl/549415: shutdown doesn't wait for outstanding work on the snapshot.

@gopherbot
Copy link
Contributor Author

Sorry, but there were parse errors in the watch flakes script.
The script I found was:

#!watchflakes
default <- pkg ~ "^golang.org/x/tools/gopls/internal/test" && "directory not empty"

And the problems were:

script:2.18: ~ requires backquoted regexp

See https://go.dev/wiki/Watchflakes for details.

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg ~ `^golang.org/x/tools/gopls/internal/test` && `directory not empty`
2024-01-03 12:29 darwin-amd64-12_0 tools@a863a4fc go@d2cb1401 x/tools/gopls/internal/test/integration/misc.TestThirdPartyPackageHighlight_Issue43511 (log)
serve.go:443: debug server listening at http://localhost:49277
serve.go:443: debug server listening at http://localhost:49278
goroutine profile: total 8
2 @ 0x103dbae 0x1036d97 0x106b545 0x10aa307 0x10af7ec 0x10af7da 0x1241ce9 0x125641e 0x12555f0 0x163d144 0x181c605 0x181c606 0x1071c41
#	0x106b544	internal/poll.runtime_pollWait+0x84					/tmp/buildlet/go/src/runtime/netpoll.go:343
#	0x10aa306	internal/poll.(*pollDesc).wait+0x26					/tmp/buildlet/go/src/internal/poll/fd_poll_runtime.go:84
#	0x10af7eb	internal/poll.(*pollDesc).waitRead+0x2ab				/tmp/buildlet/go/src/internal/poll/fd_poll_runtime.go:89
#	0x10af7d9	internal/poll.(*FD).Accept+0x299					/tmp/buildlet/go/src/internal/poll/fd_unix.go:611
#	0x1241ce8	net.(*netFD).accept+0x28						/tmp/buildlet/go/src/net/fd_unix.go:172
#	0x125641d	net.(*TCPListener).accept+0x1d						/tmp/buildlet/go/src/net/tcpsock_posix.go:152
...
#	0x1265a24	golang.org/x/tools/internal/jsonrpc2.Serve+0x384	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x103dbae 0x106e625 0x13d6c16 0x1071c41
#	0x106e624	time.Sleep+0x124					/tmp/buildlet/go/src/runtime/time.go:195
#	0x13d6c15	golang.org/x/tools/gopls/internal/filecache.gc+0x275	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestThirdPartyPackageHighlight_Issue43511 (3.14s)
    --- FAIL: TestThirdPartyPackageHighlight_Issue43511/default (3.14s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: go command failed (stdout: ) (stderr: go: unlinkat /tmp/buildlet/tmp/gopls-test-280049913/TestThirdPartyPackageHighlight_Issue43511/default/gopath/pkg/mod: directory not empty
            ): exit status 1; removing files: <nil>

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg ~ `^golang.org/x/tools/gopls/internal/test` && `directory not empty`
2023-12-18 18:59 darwin-amd64-nocgo tools@83bceaf2 go@8e3930f2 x/tools/gopls/internal/test/integration/completion.TestCompleteAllFields (log)
goroutine profile: total 11
1 @ 0x5dc8851 0x5e0483d 0x5f7ed71 0x5f7eba5 0x5f7b9cb 0x6687e70 0x66879f4 0x5ed055b 0x5e0b441
#	0x5e0483c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				/tmp/buildlet/go/src/runtime/mprof.go:1079
#	0x5f7ed70	runtime/pprof.writeRuntimeProfile+0xb0						/tmp/buildlet/go/src/runtime/pprof/pprof.go:774
#	0x5f7eba4	runtime/pprof.writeGoroutine+0x44						/tmp/buildlet/go/src/runtime/pprof/pprof.go:734
#	0x5f7b9ca	runtime/pprof.(*Profile).WriteTo+0x14a						/tmp/buildlet/go/src/runtime/pprof/pprof.go:369
#	0x6687e6f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x66879f3	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc53	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x5ed055a	testing.tRunner+0xfa								/tmp/buildlet/go/src/testing/testing.go:1689

...
#	0x649e685	golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).typeCheck+0x6e5	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/analysis.go:1031
#	0x649d3d7	golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).run+0x1d7		/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/analysis.go:810
#	0x649bd45	golang.org/x/tools/gopls/internal/lsp/cache.(*analysisNode).runCached+0x125	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/analysis.go:672
#	0x6499ea9	golang.org/x/tools/gopls/internal/lsp/cache.(*Snapshot).Analyze.func6.1+0xc9	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/analysis.go:398
#	0x6180135	golang.org/x/sync/errgroup.(*Group).Go.func1+0x55				/tmp/buildlet/gopath/pkg/mod/golang.org/x/sync@v0.5.0/errgroup/errgroup.go:75

--- FAIL: TestCompleteAllFields (11.61s)
    --- FAIL: TestCompleteAllFields/default (11.56s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: go command failed (stdout: ) (stderr: go: unlinkat /tmp/buildlet/tmp/gopls-test-1801426690/TestCompleteAllFields/default/gopath/pkg/mod/cache: directory not empty
            ): exit status 1; removing files: <nil>
2023-12-19 21:35 darwin-amd64-12_0 tools@b85cfba3 go@8cb86b5f x/tools/gopls/internal/test/integration/misc.TestImportTestVariant (log)
serve.go:443: debug server listening at http://localhost:49256
serve.go:443: debug server listening at http://localhost:49257
goroutine profile: total 19
2 @ 0x1039456 0x10323f7 0x1066bc9 0x10a6bd2 0x10ac4dd 0x10ac4cb 0x1243fd5 0x125a365 0x125947d 0x16577a5 0x1836c7b 0x1836c81 0x106d641
#	0x1066bc8	internal/poll.runtime_pollWait+0x88					/tmp/buildlet/go/src/runtime/netpoll.go:306
#	0x10a6bd1	internal/poll.(*pollDesc).wait+0x31					/tmp/buildlet/go/src/internal/poll/fd_poll_runtime.go:84
#	0x10ac4dc	internal/poll.(*pollDesc).waitRead+0x2bc				/tmp/buildlet/go/src/internal/poll/fd_poll_runtime.go:89
#	0x10ac4ca	internal/poll.(*FD).Accept+0x2aa					/tmp/buildlet/go/src/internal/poll/fd_unix.go:614
#	0x1243fd4	net.(*netFD).accept+0x34						/tmp/buildlet/go/src/net/fd_unix.go:172
#	0x125a364	net.(*TCPListener).accept+0x24						/tmp/buildlet/go/src/net/tcpsock_posix.go:148
...
#	0x107f607	syscall.wait4+0x47						/tmp/buildlet/go/src/syscall/zsyscall_darwin_amd64.go:43
#	0x107c42a	syscall.Wait4+0x2a						/tmp/buildlet/go/src/syscall/syscall_bsd.go:144
#	0x10b1b96	os.(*Process).wait+0x76						/tmp/buildlet/go/src/os/exec_unix.go:43
#	0x1176464	os.(*Process).Wait+0x44						/tmp/buildlet/go/src/os/exec.go:132
#	0x117645c	os/exec.(*Cmd).Wait+0x3c					/tmp/buildlet/go/src/os/exec/exec.go:890
#	0x12fd1e5	golang.org/x/tools/internal/gocommand.runCmdContext.func4+0x25	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:362

--- FAIL: TestImportTestVariant (3.86s)
    --- FAIL: TestImportTestVariant/default (3.86s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: unlinkat /tmp/buildlet/tmp/gopls-test-365943798/TestImportTestVariant/default: directory not empty
2024-01-05 17:34 darwin-amd64-13 tools@ba8672b5 go@8db13108 x/tools/gopls/internal/test/integration/workspace.TestReferences (log)
goroutine profile: total 7
1 @ 0x7ce64d1 0x7d2257d 0x7e9cc91 0x7e9cac5 0x7e998eb 0x85a9ab0 0x85a9634 0x7dee47b 0x7d29301
#	0x7d2257c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				/tmp/buildlet/go/src/runtime/mprof.go:1079
#	0x7e9cc90	runtime/pprof.writeRuntimeProfile+0xb0						/tmp/buildlet/go/src/runtime/pprof/pprof.go:774
#	0x7e9cac4	runtime/pprof.writeGoroutine+0x44						/tmp/buildlet/go/src/runtime/pprof/pprof.go:734
#	0x7e998ea	runtime/pprof.(*Profile).WriteTo+0x14a						/tmp/buildlet/go/src/runtime/pprof/pprof.go:369
#	0x85a9aaf	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x85a9633	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc53	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x7dee47a	testing.tRunner+0xfa								/tmp/buildlet/go/src/testing/testing.go:1689

...
#	0x83e1913	golang.org/x/tools/gopls/internal/lsp/cache.modTidyImpl+0x333			/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/mod_tidy.go:117
#	0x83e153d	golang.org/x/tools/gopls/internal/lsp/cache.(*Snapshot).ModTidy.func1+0x7d	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/cache/mod_tidy.go:80
#	0x81a535b	golang.org/x/tools/internal/memoize.(*Promise).run.func2.1+0x9b			/tmp/buildlet/gopath/src/golang.org/x/tools/internal/memoize/memoize.go:187
#	0x7ddce3c	runtime/trace.WithRegion+0xdc							/tmp/buildlet/go/src/runtime/trace/annotation.go:141
#	0x81a529a	golang.org/x/tools/internal/memoize.(*Promise).run.func2+0x13a			/tmp/buildlet/gopath/src/golang.org/x/tools/internal/memoize/memoize.go:180

--- FAIL: TestReferences (6.78s)
    --- FAIL: TestReferences/module_root (4.14s)
        --- FAIL: TestReferences/module_root/default (4.14s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: unlinkat /tmp/buildlet/tmp/gopls-test-3602940916/TestReferences/module_root/default: directory not empty

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg ~ `^golang.org/x/tools/gopls/internal/test` && `directory not empty`
2024-01-08 18:41 linux-ppc64le-power10osu tools@25a0e9d3 go@d2cb1401 x/tools/gopls/internal/test/integration/workspace.TestReferences (log)
goroutine profile: total 5
1 @ 0x49278 0x8715c 0x1fee0c 0x1febf4 0x1fbaec 0x8a5738 0x8a52ac 0x1596b4 0x8de94
#	0x8715b		runtime/pprof.runtime_goroutineProfileWithLabels+0x5b				/workdir/go/src/runtime/mprof.go:844
#	0x1fee0b	runtime/pprof.writeRuntimeProfile+0xeb						/workdir/go/src/runtime/pprof/pprof.go:734
#	0x1febf3	runtime/pprof.writeGoroutine+0x73						/workdir/go/src/runtime/pprof/pprof.go:694
#	0x1fbaeb	runtime/pprof.(*Profile).WriteTo+0x16b						/workdir/go/src/runtime/pprof/pprof.go:329
#	0x8a5737	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x77	/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x8a52ab	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xb2b	/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x1596b3	testing.tRunner+0x113								/workdir/go/src/testing/testing.go:1595

...

1 @ 0x55394 0x8a8ac 0x3ee6ac 0x8de94
#	0x8a8ab		time.Sleep+0x12b					/workdir/go/src/runtime/time.go:195
#	0x3ee6ab	golang.org/x/tools/gopls/internal/filecache.gc+0x1eb	/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestReferences (1.81s)
    --- FAIL: TestReferences/subdirectory (0.83s)
        --- FAIL: TestReferences/subdirectory/default (0.83s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: go command failed (stdout: ) (stderr: go: unlinkat /workdir/tmp/gopls-test-505201152/TestReferences/subdirectory/default/gopath/pkg/mod/cache/download: directory not empty
                ): exit status 1; removing files: <nil>

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg ~ `^golang.org/x/tools/gopls/internal/test` && `directory not empty`
2024-01-08 18:41 darwin-amd64-12_0 tools@25a0e9d3 go@d2cb1401 x/tools/gopls/internal/test/integration/workspace.TestReloadOnlyOnce (log)
goroutine profile: total 8
1 @ 0x10336b1 0x106b19d 0x11da0d1 0x11d9f05 0x11d69a6 0x18ca750 0x18ca2b6 0x11325df 0x1071c41
#	0x106b19c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				/tmp/buildlet/go/src/runtime/mprof.go:844
#	0x11da0d0	runtime/pprof.writeRuntimeProfile+0xb0						/tmp/buildlet/go/src/runtime/pprof/pprof.go:734
#	0x11d9f04	runtime/pprof.writeGoroutine+0x44						/tmp/buildlet/go/src/runtime/pprof/pprof.go:694
#	0x11d69a5	runtime/pprof.(*Profile).WriteTo+0x145						/tmp/buildlet/go/src/runtime/pprof/pprof.go:329
#	0x18ca74f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x18ca2b5	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc95	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x11325de	testing.tRunner+0xfe								/tmp/buildlet/go/src/testing/testing.go:1595

...
#	0x1081104	syscall.Wait4+0x24						/tmp/buildlet/go/src/syscall/syscall_bsd.go:144
#	0x10b4bcc	os.(*Process).wait+0x6c						/tmp/buildlet/go/src/os/exec_unix.go:43
#	0x1178404	os.(*Process).Wait+0x44						/tmp/buildlet/go/src/os/exec.go:134
#	0x11783fc	os/exec.(*Cmd).Wait+0x3c					/tmp/buildlet/go/src/os/exec/exec.go:890
#	0x12eebc4	golang.org/x/tools/internal/gocommand.runCmdContext.func4+0x24	/tmp/buildlet/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:362

--- FAIL: TestReloadOnlyOnce (4.54s)
    --- FAIL: TestReloadOnlyOnce/default (4.53s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: go command failed (stdout: ) (stderr: go: unlinkat /tmp/buildlet/tmp/gopls-test-182249352/TestReloadOnlyOnce/default/gopath/pkg/mod/cache: directory not empty
            ): exit status 1; removing files: <nil>

watchflakes

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/554996 mentions this issue: gopls/internal/lsp/cache: (re-)ensure clean shutdown

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg ~ `^golang.org/x/tools/gopls/internal/test` && `directory not empty`
2024-01-19 14:44 netbsd-386-9_3 tools@c467be36 go@66d34c7d x/tools/gopls/internal/test/integration/modfile.TestNewDepWithUnusedDep (log)
goroutine profile: total 8
1 @ 0x8080a19 0x80bcab3 0x821e92c 0x821e764 0x821ade7 0x8a0869a 0x8a081fb 0x8180cbf 0x80c1971
#	0x80bcab2	runtime/pprof.runtime_goroutineProfileWithLabels+0x42				/tmp/workdir/go/src/runtime/mprof.go:1079
#	0x821e92b	runtime/pprof.writeRuntimeProfile+0xbb						/tmp/workdir/go/src/runtime/pprof/pprof.go:774
#	0x821e763	runtime/pprof.writeGoroutine+0x73						/tmp/workdir/go/src/runtime/pprof/pprof.go:734
#	0x821ade6	runtime/pprof.(*Profile).WriteTo+0xe6						/tmp/workdir/go/src/runtime/pprof/pprof.go:369
#	0x8a08699	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x89	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x8a081fa	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc7a	/tmp/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x8180cbe	testing.tRunner+0x11e								/tmp/workdir/go/src/testing/testing.go:1689

...
#	0x8104eb7	os.(*Process).wait+0x27						/tmp/workdir/go/src/os/exec_unix.go:22
#	0x81c4365	os.(*Process).Wait+0x35						/tmp/workdir/go/src/os/exec.go:134
#	0x81c435d	os/exec.(*Cmd).Wait+0x2d					/tmp/workdir/go/src/os/exec/exec.go:897
#	0x84b22e0	golang.org/x/tools/internal/gocommand.runCmdContext.func4+0x20	/tmp/workdir/gopath/src/golang.org/x/tools/internal/gocommand/invoke.go:362

--- FAIL: TestNewDepWithUnusedDep (1.57s)
    --- FAIL: TestNewDepWithUnusedDep/default (0.76s)
        --- FAIL: TestNewDepWithUnusedDep/default/default (0.76s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: go command failed (stdout: ) (stderr: go: unlinkat /tmp/workdir/tmp/gopls-test-1614127748/TestNewDepWithUnusedDep/default/default/gopath/pkg/mod: directory not empty
                ): exit status 1; removing files: <nil>

watchflakes

@findleyr
Copy link
Member

This looks like a go/packages bug that I filed separately as #65180.

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg ~ `^golang.org/x/tools/gopls/internal/test` && `directory not empty`
2023-12-31 00:45 x_tools-go1.20-darwin-amd64-longtest tools@1f94566f release-branch.go1.20@8cb86b5f x/tools/gopls/internal/test/integration/workspace.TestReferences/module_root/default (log)
=== RUN   TestReferences/module_root/default
goroutine profile: total 11
1 @ 0x101368b 0x12fd8bd 0x12fc1a5 0x12fc04e 0x12fade5 0x12fa619 0x12fa1f0 0x12f9986 0x1719f68 0x1719b6c 0x14e3c49 0x1120003 0x14e3b85 0x106d641
#	0x12fd8bc	golang.org/x/tools/internal/gocommand.cmdDebugStr+0x45c				/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/internal/gocommand/invoke.go:464
#	0x12fc1a4	golang.org/x/tools/internal/gocommand.(*Invocation).run.func5+0x44		/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/internal/gocommand/invoke.go:268
#	0x12fc04d	golang.org/x/tools/internal/gocommand.(*Invocation).run+0x106d			/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/internal/gocommand/invoke.go:270
#	0x12fade4	golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError+0x64	/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/internal/gocommand/invoke.go:179
#	0x12fa618	golang.org/x/tools/internal/gocommand.(*Runner).runConcurrent+0x178		/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/internal/gocommand/invoke.go:121
#	0x12fa1ef	golang.org/x/tools/internal/gocommand.(*Runner).RunRaw+0x34f			/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/internal/gocommand/invoke.go:95
#	0x12f9985	golang.org/x/tools/internal/gocommand.(*Runner).Run+0x325			/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/internal/gocommand/invoke.go:71
...
#	0x1725125	golang.org/x/tools/gopls/internal/lsp/cache.(*Session).SnapshotOf+0xa5			/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/gopls/internal/lsp/cache/session.go:286
#	0x172970e	golang.org/x/tools/gopls/internal/lsp/cache.(*Session).OrphanedFileDiagnostics+0x14e	/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/gopls/internal/lsp/cache/session.go:986
#	0x189269c	golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews+0x55c		/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/gopls/internal/server/diagnostics.go:154
#	0x18aeb59	golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles.func2+0x39		/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/gopls/internal/server/text_synchronization.go:269

1 @ 0x189298d 0x106d641
#	0x189298c	golang.org/x/tools/gopls/internal/server.(*server).diagnoseChangedViews.func1+0x18c	/Volumes/Work/s/w/ir/x/w/targetrepo1581452789/gopls/internal/server/diagnostics.go:148

    runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: unlinkat /Volumes/Work/s/w/ir/x/t/gopls-test-1908698342/TestReferences/module_root/default: directory not empty
--- FAIL: TestReferences/module_root/default (0.72s)
2024-01-05 14:42 x_tools-go1.20-netbsd-arm64 tools@78257367 release-branch.go1.20@5c38c049 x/tools/gopls/internal/test/integration/misc.TestImportShortcut/Both/default (log)
=== RUN   TestImportShortcut/Both/default
goroutine profile: total 9
2 @ 0x48900 0x41d48 0x73b00 0xb0988 0xb5410 0xb5401 0x221148 0x235bd8 0x234ddc 0x5a08ac 0x746164 0x746165 0x7a134
#	0x73aff		internal/poll.runtime_pollWait+0x9f					/home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/netpoll.go:306
#	0xb0987		internal/poll.(*pollDesc).wait+0x27					/home/swarming/.swarming/w/ir/x/w/goroot/src/internal/poll/fd_poll_runtime.go:84
#	0xb540f		internal/poll.(*pollDesc).waitRead+0x24f				/home/swarming/.swarming/w/ir/x/w/goroot/src/internal/poll/fd_poll_runtime.go:89
#	0xb5400		internal/poll.(*FD).Accept+0x240					/home/swarming/.swarming/w/ir/x/w/goroot/src/internal/poll/fd_unix.go:614
#	0x221147	net.(*netFD).accept+0x27						/home/swarming/.swarming/w/ir/x/w/goroot/src/net/fd_unix.go:172
#	0x235bd7	net.(*TCPListener).accept+0x27						/home/swarming/.swarming/w/ir/x/w/goroot/src/net/tcpsock_posix.go:148
#	0x234ddb	net.(*TCPListener).Accept+0x2b						/home/swarming/.swarming/w/ir/x/w/goroot/src/net/tcpsock.go:297
...
#	0x113807	path/filepath.readDirNames+0x37				/home/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:595
#	0x112fbb	path/filepath.walk+0x4b					/home/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:476
#	0x113143	path/filepath.walk+0x1d3				/home/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:497
#	0x113143	path/filepath.walk+0x1d3				/home/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:497
#	0x11350b	path/filepath.Walk+0x6b					/home/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:564
#	0x38f24b	golang.org/x/tools/gopls/internal/filecache.gc+0x11b	/home/swarming/.swarming/w/ir/x/w/targetrepo3563838220/gopls/internal/filecache/filecache.go:451

    runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: go command failed (stdout: ) (stderr: go: unlinkat /home/swarming/.swarming/w/ir/x/t/gopls-test-1008194152/TestImportShortcut/Both/default/gopath/pkg/mod/cache: directory not empty
        ): exit status 1; removing files: <nil>
--- FAIL: TestImportShortcut/Both/default (1.89s)

watchflakes

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg ~ `^golang.org/x/tools/gopls/internal/test` && `directory not empty`
2023-12-22 23:44 x_tools-go1.21-darwin-amd64_12 tools@a6819f45 release-branch.go1.21@bbab863a x/tools/gopls/internal/test/integration/misc.TestGoToEmbedDefinition/default (log)
=== RUN   TestGoToEmbedDefinition/default
goroutine profile: total 10
2 @ 0x103db4e 0x1036d37 0x106b465 0x10aa227 0x10af70c 0x10af6fa 0x1241c09 0x125633e 0x1255510 0x163cf44 0x181b385 0x181b386 0x1071b61
#	0x106b464	internal/poll.runtime_pollWait+0x84					/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/netpoll.go:343
#	0x10aa226	internal/poll.(*pollDesc).wait+0x26					/Users/swarming/.swarming/w/ir/x/w/goroot/src/internal/poll/fd_poll_runtime.go:84
#	0x10af70b	internal/poll.(*pollDesc).waitRead+0x2ab				/Users/swarming/.swarming/w/ir/x/w/goroot/src/internal/poll/fd_poll_runtime.go:89
#	0x10af6f9	internal/poll.(*FD).Accept+0x299					/Users/swarming/.swarming/w/ir/x/w/goroot/src/internal/poll/fd_unix.go:611
#	0x1241c08	net.(*netFD).accept+0x28						/Users/swarming/.swarming/w/ir/x/w/goroot/src/net/fd_unix.go:172
#	0x125633d	net.(*TCPListener).accept+0x1d						/Users/swarming/.swarming/w/ir/x/w/goroot/src/net/tcpsock_posix.go:152
#	0x125550f	net.(*TCPListener).Accept+0x2f						/Users/swarming/.swarming/w/ir/x/w/goroot/src/net/tcpsock.go:315
...
#	0x13d7172	golang.org/x/tools/gopls/internal/filecache.gc.func1+0x2d2	/Users/swarming/.swarming/w/ir/x/w/targetrepo3201240721/gopls/internal/filecache/filecache.go:478
#	0x110fd5e	path/filepath.walk+0xfe						/Users/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:477
#	0x110feb6	path/filepath.walk+0x256					/Users/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:501
#	0x110feb6	path/filepath.walk+0x256					/Users/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:501
#	0x110feb6	path/filepath.walk+0x256					/Users/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:501
#	0x1110285	path/filepath.Walk+0x65						/Users/swarming/.swarming/w/ir/x/w/goroot/src/path/filepath/path.go:572
#	0x13d6a0d	golang.org/x/tools/gopls/internal/filecache.gc+0x1cd		/Users/swarming/.swarming/w/ir/x/w/targetrepo3201240721/gopls/internal/filecache/filecache.go:451

    runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: unlinkat /Users/swarming/.swarming/w/ir/x/t/gopls-test-3031274008/TestGoToEmbedDefinition/default: directory not empty
--- FAIL: TestGoToEmbedDefinition/default (0.44s)
2023-12-26 17:53 x_tools-go1.20-darwin-arm64_13 tools@025ebe62 release-branch.go1.20@8cb86b5f x/tools/gopls/internal/test/integration/workspace.TestReferences/module_root/default (log)
=== RUN   TestReferences/module_root/default
goroutine profile: total 9
1 @ 0x100cfcc7c 0x100fc2e28 0x100fc2994 0x100fc1970 0x100fc1438 0x100fc1164 0x100fc0bfc 0x1013596bc 0x1013593ec 0x101177790 0x100e0dd28 0x1011776e4 0x100d63ef4
#	0x100fc2e27	golang.org/x/tools/internal/gocommand.runCmdContext+0x247			/Volumes/Work/s/w/ir/x/w/targetrepo1142362864/internal/gocommand/invoke.go:360
#	0x100fc2993	golang.org/x/tools/internal/gocommand.(*Invocation).run+0xe53			/Volumes/Work/s/w/ir/x/w/targetrepo1142362864/internal/gocommand/invoke.go:270
#	0x100fc196f	golang.org/x/tools/internal/gocommand.(*Invocation).runWithFriendlyError+0x3f	/Volumes/Work/s/w/ir/x/w/targetrepo1142362864/internal/gocommand/invoke.go:179
#	0x100fc1437	golang.org/x/tools/internal/gocommand.(*Runner).runConcurrent+0xf7		/Volumes/Work/s/w/ir/x/w/targetrepo1142362864/internal/gocommand/invoke.go:121
#	0x100fc1163	golang.org/x/tools/internal/gocommand.(*Runner).RunRaw+0x233			/Volumes/Work/s/w/ir/x/w/targetrepo1142362864/internal/gocommand/invoke.go:95
#	0x100fc0bfb	golang.org/x/tools/internal/gocommand.(*Runner).Run+0x21b			/Volumes/Work/s/w/ir/x/w/targetrepo1142362864/internal/gocommand/invoke.go:71
#	0x1013596bb	golang.org/x/tools/gopls/internal/lsp/cache.modTidyImpl+0x23b			/Volumes/Work/s/w/ir/x/w/targetrepo1142362864/gopls/internal/lsp/cache/mod_tidy.go:126
...
#	0x100e00847	path/filepath.readDirNames+0x37				/Volumes/Work/s/w/ir/x/w/goroot/src/path/filepath/path.go:595
#	0x100dfffcb	path/filepath.walk+0x4b					/Volumes/Work/s/w/ir/x/w/goroot/src/path/filepath/path.go:476
#	0x100e00173	path/filepath.walk+0x1f3				/Volumes/Work/s/w/ir/x/w/goroot/src/path/filepath/path.go:497
#	0x100e00173	path/filepath.walk+0x1f3				/Volumes/Work/s/w/ir/x/w/goroot/src/path/filepath/path.go:497
#	0x100e0054b	path/filepath.Walk+0x6b					/Volumes/Work/s/w/ir/x/w/goroot/src/path/filepath/path.go:564
#	0x10108b5ff	golang.org/x/tools/gopls/internal/filecache.gc+0x11f	/Volumes/Work/s/w/ir/x/w/targetrepo1142362864/gopls/internal/filecache/filecache.go:451

    runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: go command failed (stdout: ) (stderr: go: unlinkat /Volumes/Work/s/w/ir/x/t/gopls-test-4265027355/TestReferences/module_root/default/gopath/pkg/mod: directory not empty
        ): exit status 1; removing files: <nil>
--- FAIL: TestReferences/module_root/default (0.48s)

watchflakes

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
Archived in project
Development

No branches or pull requests

2 participants