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

all: failures on Windows with The process cannot access the file because it is being used by another process. #66099

Closed
gopherbot opened this issue Mar 4, 2024 · 17 comments
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done. OS-Windows release-blocker
Milestone

Comments

@gopherbot
Copy link
Contributor

gopherbot commented Mar 4, 2024

#!watchflakes
post <- goos == "windows" && log ~ `The process cannot access the file because it is being used by another process\.` && date > "2024-02-15"

Issue created automatically to collect these failures.

Example (log):

serve.go:441: debug server listening at http://localhost:49779
serve.go:441: debug server listening at http://localhost:49780
goroutine profile: total 9
2 @ 0x14004468e 0x14003b637 0x140075ea5 0x1400f2691 0x1400f483a 0x1400fc1f8 0x1400fc88b 0x1403b2e05 0x1403d936e 0x1403d7525 0x140abe1f2 0x140e0176d 0x140e0176e 0x14007cc21
#	0x140075ea4	internal/poll.runtime_pollWait+0x84					C:/workdir/go/src/runtime/netpoll.go:345
#	0x1400f2690	internal/poll.(*pollDesc).wait+0xb0					C:/workdir/go/src/internal/poll/fd_poll_runtime.go:84
#	0x1400f4839	internal/poll.execIO+0x279						C:/workdir/go/src/internal/poll/fd_windows.go:177
#	0x1400fc1f7	internal/poll.(*FD).acceptOne+0xf7					C:/workdir/go/src/internal/poll/fd_windows.go:946
#	0x1400fc88a	internal/poll.(*FD).Accept+0x3ca					C:/workdir/go/src/internal/poll/fd_windows.go:980
#	0x1403b2e04	net.(*netFD).accept+0x84						C:/workdir/go/src/net/fd_windows.go:182
...
1 @ 0x14004468e 0x140057345 0x1403f8f9c 0x14007cc21
#	0x1403f8f9b	golang.org/x/tools/internal/jsonrpc2.Serve+0x5bb	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x14004468e 0x14007933a 0x1406cd1fc 0x14007cc21
#	0x140079339	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x1406cd1fb	golang.org/x/tools/gopls/internal/filecache.gc+0x31b	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestGoToTypeDefinition_Issue60544 (7.44s)
    --- FAIL: TestGoToTypeDefinition_Issue60544/default (7.44s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-4177046821\TestGoToTypeDefinition_Issue60544\default\work: 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 Mar 4, 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 == "TestGoToTypeDefinition_Issue60544"
2024-02-29 21:45 windows-amd64-race tools@5bf7d005 go@7986e26a x/tools/gopls/internal/test/integration/misc.TestGoToTypeDefinition_Issue60544 (log)
serve.go:441: debug server listening at http://localhost:49779
serve.go:441: debug server listening at http://localhost:49780
goroutine profile: total 9
2 @ 0x14004468e 0x14003b637 0x140075ea5 0x1400f2691 0x1400f483a 0x1400fc1f8 0x1400fc88b 0x1403b2e05 0x1403d936e 0x1403d7525 0x140abe1f2 0x140e0176d 0x140e0176e 0x14007cc21
#	0x140075ea4	internal/poll.runtime_pollWait+0x84					C:/workdir/go/src/runtime/netpoll.go:345
#	0x1400f2690	internal/poll.(*pollDesc).wait+0xb0					C:/workdir/go/src/internal/poll/fd_poll_runtime.go:84
#	0x1400f4839	internal/poll.execIO+0x279						C:/workdir/go/src/internal/poll/fd_windows.go:177
#	0x1400fc1f7	internal/poll.(*FD).acceptOne+0xf7					C:/workdir/go/src/internal/poll/fd_windows.go:946
#	0x1400fc88a	internal/poll.(*FD).Accept+0x3ca					C:/workdir/go/src/internal/poll/fd_windows.go:980
#	0x1403b2e04	net.(*netFD).accept+0x84						C:/workdir/go/src/net/fd_windows.go:182
...
1 @ 0x14004468e 0x140057345 0x1403f8f9c 0x14007cc21
#	0x1403f8f9b	golang.org/x/tools/internal/jsonrpc2.Serve+0x5bb	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x14004468e 0x14007933a 0x1406cd1fc 0x14007cc21
#	0x140079339	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x1406cd1fb	golang.org/x/tools/gopls/internal/filecache.gc+0x31b	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestGoToTypeDefinition_Issue60544 (7.44s)
    --- FAIL: TestGoToTypeDefinition_Issue60544/default (7.44s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-4177046821\TestGoToTypeDefinition_Issue60544\default\work: 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 Mar 4, 2024
@gopherbot gopherbot added this to the Unreleased milestone Mar 4, 2024
@bcmills bcmills changed the title x/tools/gopls/internal/test/integration/misc: TestGoToTypeDefinition_Issue60544 failures all: failures on Windows with The process cannot access the file because it is being used by another process. Mar 4, 2024
@bcmills bcmills added OS-Windows and removed gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Mar 4, 2024
@bcmills
Copy link
Contributor

bcmills commented Mar 4, 2024

(attn @golang/windows)

Note that some of these duplicates were on legacy builders and some were on LUCI builders, so it doesn't seem to be caused by a builder configuration change.

@golang golang deleted a comment from gopherbot Mar 4, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "windows" && log ~ `The process cannot access the file because it is being used by another process\.` && date > "2024-02-15"
2024-02-29 21:45 windows-386-2016 tools@5bf7d005 go@5dcc04ae x/tools/gopls/internal/test/marker.TestNoMod (log)
goroutine profile: total 6
1 @ 0x99810d 0x9d52e7 0xb50ed0 0xb50cf8 0xb4d33b 0x12271ae 0x1226cf0 0xaad523 0x9dabf1
#	0x9d52e6	runtime/pprof.runtime_goroutineProfileWithLabels+0x46				C:/workdir/go/src/runtime/mprof.go:1079
#	0xb50ecf	runtime/pprof.writeRuntimeProfile+0xbf						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0xb50cf7	runtime/pprof.writeGoroutine+0x77						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0xb4d33a	runtime/pprof.(*Profile).WriteTo+0xea						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x12271ad	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x8d	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x1226cef	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xcbf	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0xaad522	testing.tRunner+0x122								C:/workdir/go/src/testing/testing.go:1689

...
#	0xcff07a	golang.org/x/tools/gopls/internal/protocol.LogEvent.func1.1+0x4a	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/protocol/context.go:47

1 @ 0x9a4ffd 0x9d89f4 0xd0fb92 0x9dabf1
#	0x9d89f3	time.Sleep+0x123					C:/workdir/go/src/runtime/time.go:214
#	0xd0fb91	golang.org/x/tools/gopls/internal/filecache.gc+0x271	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestNoMod (18.51s)
    --- FAIL: TestNoMod/without_workspace_module (5.87s)
        --- FAIL: TestNoMod/without_workspace_module/default (5.80s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-1658247355\TestNoMod\without_workspace_module\default\work: The process cannot access the file because it is being used by another process.
2024-02-29 21:45 windows-386-2016 tools@5bf7d005 go@5dcc04ae x/tools/gopls/internal/test/marker.Test (log)
--- FAIL: Test (1.21s)
    --- FAIL: Test/completion\issue62676.txt (7.70s)
        marker_test.go:303: foo/foo.go:5:12 (completion\issue62676.txt:21:12): Completion(...) did not return an item labeled "Open"
2024-02-29 21:45 windows-amd64-longtest tools@5bf7d005 go@b09ac10b x/tools/gopls/internal/test/integration/template.TestDisablingCodeLens (log)
goroutine profile: total 8
1 @ 0x10c6991 0x110237d 0x128ebf1 0x128ea25 0x128b84b 0x1aca490 0x1aca014 0x11df41b 0x1109441
#	0x110237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x128ebf0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x128ea24	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x128b84a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x1aca48f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x1aca013	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x11df41a	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...
#	0x13173b0	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x10d30ae 0x1105bba 0x18254ca 0x1109441
#	0x1105bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x18254c9	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestDisablingCodeLens (34.12s)
    --- FAIL: TestDisablingCodeLens/generate_disabled (19.08s)
        --- FAIL: TestDisablingCodeLens/generate_disabled/default (10.13s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-988760894\TestDisablingCodeLens\generate_disabled\default\work: The process cannot access the file because it is being used by another process.
2024-02-29 21:45 windows-amd64-longtest tools@5bf7d005 go@b09ac10b x/tools/gopls/internal/test/integration/template.TestModFileModification (log)
goroutine profile: total 7
1 @ 0xf46991 0xf8237d 0x110ebf1 0x110ea25 0x110b84b 0x194b7b0 0x194b334 0x105f41b 0xf89441
#	0xf8237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x110ebf0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x110ea24	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x110b84a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x194b7af	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x194b333	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x105f41a	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...

1 @ 0xf530ae 0xf85bba 0x16df36a 0xf89441
#	0xf85bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x16df369	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestModFileModification (66.03s)
    --- FAIL: TestModFileModification/basic (44.15s)
        --- FAIL: TestModFileModification/basic/default (32.84s)
            --- FAIL: TestModFileModification/basic/default/default (14.54s)
                runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-277782551\TestModFileModification\basic\default\default\work: The process cannot access the file because it is being used by another process.
2024-02-29 21:45 windows-amd64-longtest tools@5bf7d005 go@b09ac10b x/tools/gopls/internal/test/integration/template.TestTemplatesFromExtensions (log)
goroutine profile: total 6
1 @ 0x12e6991 0x132237d 0x14aebf1 0x14aea25 0x14ab84b 0x1ce9f90 0x1ce9b14 0x13ff41b 0x1329441
#	0x132237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x14aebf0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x14aea24	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x14ab84a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x1ce9f8f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x1ce9b13	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x13ff41a	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...
#	0x15265dd	net.(*TCPListener).accept+0x1d				C:/workdir/go/src/net/tcpsock_posix.go:159
#	0x15256af	net.(*TCPListener).Accept+0x2f				C:/workdir/go/src/net/tcpsock.go:367
#	0x1537d3a	golang.org/x/tools/internal/jsonrpc2.Serve.func1+0x9a	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:76

1 @ 0x12f30ae 0x13048a5 0x15373b1 0x1329441
#	0x15373b0	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

--- FAIL: TestTemplatesFromExtensions (16.75s)
    --- FAIL: TestTemplatesFromExtensions/default (6.84s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-3692199073\TestTemplatesFromExtensions\default\work: The process cannot access the file because it is being used by another process.
2024-02-29 21:45 windows-amd64-longtest tools@5bf7d005 go@2b22fc10 x/tools/gopls/internal/test/integration/inlayhints.TestDisablingCodeLens (log)
goroutine profile: total 8
1 @ 0xca6991 0xce237d 0xe6eb51 0xe6e985 0xe6b7ab 0x16aa3f0 0x16a9f74 0xdbf37b 0xce9441
#	0xce237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0xe6eb50	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0xe6e984	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0xe6b7aa	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x16aa3ef	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x16a9f73	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0xdbf37a	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...

1 @ 0xcb30ae 0xce5bba 0x140542a 0xce9441
#	0xce5bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x1405429	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestDisablingCodeLens (29.41s)
    --- FAIL: TestDisablingCodeLens/generate_disabled (16.18s)
        --- FAIL: TestDisablingCodeLens/generate_disabled/default (8.27s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-1722857689\TestDisablingCodeLens\generate_disabled\default\work: The process cannot access the file because it is being used by another process.
2024/03/04 20:34:15 error killing the Go command: TerminateProcess: Access is denied.
2024-02-29 21:45 windows-amd64-longtest tools@5bf7d005 go@2b22fc10 x/tools/gopls/internal/test/integration/inlayhints.TestEnablingInlayHints (log)
goroutine profile: total 8
1 @ 0x1376991 0x13b237d 0x153eb51 0x153e985 0x153b7ab 0x1d77d10 0x1d77894 0x148f37b 0x13b9441
#	0x13b237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x153eb50	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x153e984	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x153b7aa	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x1d77d0f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x1d77893	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x148f37a	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...
#	0x16c4030	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x13830ae 0x13b5bba 0x170750a 0x13b9441
#	0x13b5bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x1707509	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestEnablingInlayHints (35.63s)
    --- FAIL: TestEnablingInlayHints/default (18.35s)
        --- FAIL: TestEnablingInlayHints/default/experimental (8.24s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-3725305624\TestEnablingInlayHints\default\experimental\work: The process cannot access the file because it is being used by another process.
2024-02-29 21:45 windows-amd64-race tools@5bf7d005 go@5dcc04ae x/tools/gopls/internal/test/integration/modfile.TestMissingDependencyFixes (log)
goroutine profile: total 6
1 @ 0x140037f11 0x140075afd 0x1403128ea 0x1403126a6 0x14030dd94 0x14111ef18 0x14111e7eb 0x1401dcc1f 0x14007cc21
#	0x140075afc	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x1403128e9	runtime/pprof.writeRuntimeProfile+0xc9						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x1403126a5	runtime/pprof.writeGoroutine+0x85						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x14030dd93	runtime/pprof.(*Profile).WriteTo+0x1b3						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x14111ef17	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0xb7	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x14111e7ea	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0x16aa	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x1401dcc1e	testing.tRunner+0x21e								C:/workdir/go/src/testing/testing.go:1689

...
#	0x14045515d	golang.org/x/tools/gopls/internal/protocol.LogEvent.func1.1+0x5d	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/protocol/context.go:47

1 @ 0x14004468e 0x14007933a 0x140d0559c 0x14007cc21
#	0x140079339	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x140d0559b	golang.org/x/tools/gopls/internal/filecache.gc+0x31b	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestMissingDependencyFixes (13.54s)
    --- FAIL: TestMissingDependencyFixes/nested (10.72s)
        --- FAIL: TestMissingDependencyFixes/nested/default (10.72s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-255214701\TestMissingDependencyFixes\nested\default\work: The process cannot access the file because it is being used by another process.

watchflakes

@bcmills
Copy link
Contributor

bcmills commented Mar 5, 2024

@matloob, https://go.dev/cl/564555 seems like the most plausible recent change to have introduced this, but maybe it's worth bisecting on a gomote?

The first of these failures was at Go commit 2b22fc1, but that commit itself doesn't seem like a plausible root cause.

@bcmills
Copy link
Contributor

bcmills commented Mar 5, 2024

Oh, neat! x/exp has been failing consistently with this failure mode since exactly https://go.dev/cl/564555.

(@cherrymui, any idea why watchflakes isn't reporting those matches? Is this related to #58819?)

@bcmills bcmills modified the milestones: Unreleased, Go1.23 Mar 5, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "windows" && log ~ `The process cannot access the file because it is being used by another process\.` && date > "2024-02-15"
2024-03-05 18:10 windows-amd64-longtest tools@d10b068e go@afb10505 x/tools/gopls/internal/test/integration/modfile.TestModFileModification (log)
goroutine profile: total 7
1 @ 0xfc6991 0x100237d 0x118ebf1 0x118ea25 0x118b84b 0x19cc730 0x19cc2b4 0x10df41b 0x1009441
#	0x100237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x118ebf0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x118ea24	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x118b84a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x19cc72f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x19cc2b3	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x10df41a	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...
#	0x10df41a	testing.tRunner+0xfa										C:/workdir/go/src/testing/testing.go:1689

1 @ 0xfd30ae 0xf9aded 0xf9aa12 0x12502c7 0x1009441
#	0x12502c6	golang.org/x/tools/gopls/internal/protocol.LogEvent.func1.1+0x46	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/protocol/context.go:47

--- FAIL: TestModFileModification (59.75s)
    --- FAIL: TestModFileModification/basic (38.04s)
        --- FAIL: TestModFileModification/basic/default (25.47s)
            --- FAIL: TestModFileModification/basic/default/default (12.25s)
                runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-3497232632\TestModFileModification\basic\default\default\work: The process cannot access the file because it is being used by another process.

watchflakes

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/569217 mentions this issue: telemetry: in Start skip uploading in certain cases

@matloob
Copy link
Contributor

matloob commented Mar 5, 2024

golang.org/cl/569217 modifies telemetry.Start to avoid running uploads if the telemetry mode isn't "on". Since telemetry isn't enabled on the builders, when the go command starts telemetry, we will avoid running uploads and won't create the upload.token file, so it won't be there when the tests try to clear their temp directories.

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "windows" && log ~ `The process cannot access the file because it is being used by another process\.` && date > "2024-02-15"
2024-03-05 19:26 windows-amd64-longtest tools@029c4eaf go@9e3b1d53 x/tools/gopls/internal/test/integration/modfile.TestModFileModification (log)
goroutine profile: total 7
1 @ 0x176991 0x1b237d 0x33ebf1 0x33ea25 0x33b84b 0xb7ca10 0xb7c594 0x28f41b 0x1b9441
#	0x1b237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x33ebf0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x33ea24	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x33b84a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0xb7ca0f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0xb7c593	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x28f41a	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...

1 @ 0x1830ae 0x1b5bba 0x90fbaa 0x1b9441
#	0x1b5bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x90fba9	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestModFileModification (62.02s)
    --- FAIL: TestModFileModification/basic (41.46s)
        --- FAIL: TestModFileModification/basic/default (28.84s)
            --- FAIL: TestModFileModification/basic/default/default (11.63s)
                runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-616946909\TestModFileModification\basic\default\default\work: The process cannot access the file because it is being used by another process.

watchflakes

@bcmills
Copy link
Contributor

bcmills commented Mar 6, 2024

Since telemetry isn't enabled on the builders, when the go command starts telemetry, we will avoid running uploads and won't create the upload.token file, so it won't be there when the tests try to clear their temp directories.

I suspect that part of the failure mode here is that the telemetry upload process holds open its current working directory — we should try to ensure that the upload process doesn't do that for, say, users who invoke go commands in a temp directory in scripts. (Maybe we can set the uploader's working directory to the telemetry directory, or to someplace in GOROOT?)

@bcmills
Copy link
Contributor

bcmills commented Mar 6, 2024

Looks like telemetry.Start is missing a telemetry.Mode() check when config.Upload is set:
https://github.com/golang/telemetry/blob/15436e5232c88c9040792a6a27dbb52a71113586/start.go#L69

If os.UserConfigDir() returns an error, we leave telemetry.ModeFilePath and telemetry.LocalDir unset:
https://github.com/golang/telemetry/blob/15436e5232c88c9040792a6a27dbb52a71113586/internal/telemetry/mode.go#L35-L38

That's supposed to cause telemetry.Mode() to return "off":
https://github.com/golang/telemetry/blob/15436e5232c88c9040792a6a27dbb52a71113586/internal/telemetry/mode.go#L95-L98

The missing check causes the child process to be run, and the child process unconditionally creates a file in telemetry.LocalDir for rate-limiting:
https://github.com/golang/telemetry/blob/15436e5232c88c9040792a6a27dbb52a71113586/start.go#L161

@matloob
Copy link
Contributor

matloob commented Mar 6, 2024

that check is in CL 569217

gopherbot pushed a commit to golang/telemetry that referenced this issue Mar 6, 2024
It's possible for telemetry.LocalDir to not be set, which, depending
on the platform, could happen if there's no home or AppData
directory. Handle that case by skipping uploading so we don't end up
writing the upload.token file to the user's current directory. (There
would be no counters to upload anyway if there's no local directory).

Also, if telemetry.Mode() is "off" or "local" we don't do uploads, so
unless telemetry.Mode() is "on" don't attempt to do an upload.

Fixes golang/go#66111, golang/go#66099

Change-Id: I6b30835a1d3a147b2f94d97f13a2b793217b2639
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/569217
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
@matloob
Copy link
Contributor

matloob commented Mar 6, 2024

CL 569217 has been submitted. I'll prepare a CL to vendor the latest x/telemetry into cmd/

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/569421 mentions this issue: cmd: update telemetry to c0b710b

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/569420 mentions this issue: cmd: update to golang.org/x/sys@v0.18.0

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "windows" && log ~ `The process cannot access the file because it is being used by another process\.` && date > "2024-02-15"
2024-03-06 14:41 windows-amd64-longtest tools@ff00c7bd go@f0d1195e x/tools/gopls/internal/test/integration/watch.TestEnablingInlayHints (log)
goroutine profile: total 8
1 @ 0x10b6991 0x10f237d 0x127e5b1 0x127e3e5 0x127b20b 0x1ac28f0 0x1ac2474 0x11ceddb 0x10f9441
#	0x10f237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x127e5b0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x127e3e4	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x127b20a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x1ac28ef	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x1ac2473	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x11cedda	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...
#	0x1403c90	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x10c30ae 0x10f5bba 0x1446e4a 0x10f9441
#	0x10f5bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x1446e49	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestEnablingInlayHints (37.54s)
    --- FAIL: TestEnablingInlayHints/default (14.55s)
        --- FAIL: TestEnablingInlayHints/default/experimental (4.89s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-899015065\TestEnablingInlayHints\default\experimental\work: The process cannot access the file because it is being used by another process.
2024-03-06 14:41 windows-amd64-longtest tools@ff00c7bd go@f0d1195e x/tools/gopls/internal/test/integration/watch.TestCallHierarchy_Issue49125 (log)
goroutine profile: total 7
1 @ 0x11c6991 0x120237d 0x138e891 0x138e6c5 0x138b4eb 0x1a9f3f0 0x1a9ef74 0x12df0bb 0x1209441
#	0x120237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x138e890	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x138e6c4	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x138b4ea	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x1a9f3ef	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x1a9ef73	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x12df0ba	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...

1 @ 0x11d30ae 0x1205bba 0x15c328a 0x1209441
#	0x1205bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x15c3289	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestCallHierarchy_Issue49125 (20.03s)
    --- FAIL: TestCallHierarchy_Issue49125/forwarded (5.90s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-1371896749\TestCallHierarchy_Issue49125\forwarded\work: The process cannot access the file because it is being used by another process.
serve.go:441: debug server listening at http://localhost:49841
serve.go:441: debug server listening at http://localhost:49842
2024-03-06 14:41 windows-amd64-longtest tools@ff00c7bd go@f0d1195e x/tools/gopls/internal/test/integration/watch.TestSubdirWatchPatterns (log)
goroutine profile: total 8
1 @ 0x1146991 0x118237d 0x130e5b1 0x130e3e5 0x130b20b 0x1a044f0 0x1a04074 0x125eddb 0x1189441
#	0x118237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x130e5b0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x130e3e4	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x130b20a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x1a044ef	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x1a04073	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x125edda	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...
#	0x1396a70	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x11530ae 0x1185bba 0x152862a 0x1189441
#	0x1185bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x1528629	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestSubdirWatchPatterns (43.81s)
    --- FAIL: TestSubdirWatchPatterns/other_client_on (19.21s)
        --- FAIL: TestSubdirWatchPatterns/other_client_on/forwarded (7.71s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-1248632388\TestSubdirWatchPatterns\other_client_on\forwarded\work: The process cannot access the file because it is being used by another process.
2024-03-06 14:41 windows-amd64-longtest tools@ff00c7bd go@f048829d x/tools/gopls/internal/test/integration/watch.TestDisablingCodeLens (log)
goroutine profile: total 8
1 @ 0x8f6991 0x93237d 0xabe5b1 0xabe3e5 0xabb20b 0x1304fd0 0x1304b54 0xa0eddb 0x939441
#	0x93237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0xabe5b0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0xabe3e4	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0xabb20a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x1304fcf	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x1304b53	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0xa0edda	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...
#	0xb46a70	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

1 @ 0x9030ae 0x935bba 0x1054cea 0x939441
#	0x935bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0x1054ce9	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestDisablingCodeLens (31.98s)
    --- FAIL: TestDisablingCodeLens/generate_disabled (17.01s)
        --- FAIL: TestDisablingCodeLens/generate_disabled/default (8.12s)
            runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-787458827\TestDisablingCodeLens\generate_disabled\default\work: The process cannot access the file because it is being used by another process.
2024-03-06 14:41 windows-amd64-longtest tools@ff00c7bd go@f048829d x/tools/gopls/internal/test/integration/watch.TestCallHierarchy_Issue49125 (log)
goroutine profile: total 7
1 @ 0xb56991 0xb9237d 0xd1e891 0xd1e6c5 0xd1b4eb 0x142f3f0 0x142ef74 0xc6f0bb 0xb99441
#	0xb9237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0xd1e890	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0xd1e6c4	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0xd1b4ea	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x142f3ef	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x142ef73	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0xc6f0ba	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...

1 @ 0xb630ae 0xb95bba 0xf5328a 0xb99441
#	0xb95bb9	time.Sleep+0x119					C:/workdir/go/src/runtime/time.go:214
#	0xf53289	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/filecache/filecache.go:507

--- FAIL: TestCallHierarchy_Issue49125 (23.42s)
    --- FAIL: TestCallHierarchy_Issue49125/forwarded (7.29s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-1642194492\TestCallHierarchy_Issue49125\forwarded\work: The process cannot access the file because it is being used by another process.
serve.go:441: debug server listening at http://localhost:49845
serve.go:441: debug server listening at http://localhost:49846
2024-03-06 14:41 windows-amd64-longtest tools@ff00c7bd go@f048829d x/tools/gopls/internal/test/integration/watch.TestMultilineTokens (log)
goroutine profile: total 6
1 @ 0x8c6991 0x90237d 0xa8e5b1 0xa8e3e5 0xa8b20b 0x12d4ad0 0x12d4654 0x9deddb 0x909441
#	0x90237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0xa8e5b0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0xa8e3e4	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0xa8b20a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x12d4acf	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x12d4653	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x9dedda	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...
#	0xb05c9d	net.(*TCPListener).accept+0x1d				C:/workdir/go/src/net/tcpsock_posix.go:159
#	0xb04d6f	net.(*TCPListener).Accept+0x2f				C:/workdir/go/src/net/tcpsock.go:367
#	0xb173fa	golang.org/x/tools/internal/jsonrpc2.Serve.func1+0x9a	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:76

1 @ 0x8d30ae 0x8e48a5 0xb16a71 0x909441
#	0xb16a70	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

--- FAIL: TestMultilineTokens (13.03s)
    --- FAIL: TestMultilineTokens/experimental (3.96s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-1383462432\TestMultilineTokens\experimental\work: The process cannot access the file because it is being used by another process.
2024-03-06 17:08 windows-amd64-longtest tools@caf59401 go@f0d1195e x/tools/gopls/internal/test/integration/template.TestMultilineTokens (log)
goroutine profile: total 6
1 @ 0x12e6991 0x132237d 0x14ae5b1 0x14ae3e5 0x14ab20b 0x1cf4db0 0x1cf4934 0x13feddb 0x1329441
#	0x132237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/workdir/go/src/runtime/mprof.go:1079
#	0x14ae5b0	runtime/pprof.writeRuntimeProfile+0xb0						C:/workdir/go/src/runtime/pprof/pprof.go:775
#	0x14ae3e4	runtime/pprof.writeGoroutine+0x44						C:/workdir/go/src/runtime/pprof/pprof.go:734
#	0x14ab20a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/workdir/go/src/runtime/pprof/pprof.go:369
#	0x1cf4daf	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:207
#	0x1cf4933	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:255
#	0x13fedda	testing.tRunner+0xfa								C:/workdir/go/src/testing/testing.go:1689

...
#	0x1525c9d	net.(*TCPListener).accept+0x1d				C:/workdir/go/src/net/tcpsock_posix.go:159
#	0x1524d6f	net.(*TCPListener).Accept+0x2f				C:/workdir/go/src/net/tcpsock.go:367
#	0x15373fa	golang.org/x/tools/internal/jsonrpc2.Serve.func1+0x9a	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:76

1 @ 0x12f30ae 0x13048a5 0x1536a71 0x1329441
#	0x1536a70	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2/serve.go:112

--- FAIL: TestMultilineTokens (9.96s)
    --- FAIL: TestMultilineTokens/experimental (3.11s)
        runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-test-1378265896\TestMultilineTokens\experimental\work: The process cannot access the file because it is being used by another process.

watchflakes

gopherbot pushed a commit that referenced this issue Mar 7, 2024
This is a requirement of x/telemetry so update it before updating
telemetry.

Commands run (in both std and cmd):
	go get golang.org/x/sys@v0.18.0
	go mod tidy
	go mod vendor

For #66099

Change-Id: I636f0c0be89c05b9213c461b1a2eb2a4afb8a84b
Reviewed-on: https://go-review.googlesource.com/c/go/+/569420
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "windows" && log ~ `The process cannot access the file because it is being used by another process\.` && date > "2024-02-15"
2024-03-04 22:41 x_tools-gotip-windows-amd64-longtest tools@7656c4c6 go@5dcc04ae x/tools/gopls/internal/cmd.TestCheck (log)
=== RUN   TestCheck
=== PAUSE TestCheck
=== CONT  TestCheck
    testing.go:1231: TempDir RemoveAll cleanup: remove C:\b\s\w\ir\x\t\TestCheck988050826\001: The process cannot access the file because it is being used by another process.
--- FAIL: TestCheck (21.22s)
2024-03-04 22:41 x_tools-gotip-windows-amd64-longtest tools@7656c4c6 go@5dcc04ae x/tools/gopls/internal/test/integration/codelens.TestDisablingCodeLens/default/experimental (log)
=== RUN   TestDisablingCodeLens/default/experimental
goroutine profile: total 8
1 @ 0x5a6991 0x5e237d 0x76ebf1 0x76ea25 0x76b84b 0xfaa490 0xfaa014 0x6bf41b 0x5e9441
#	0x5e237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/b/s/w/ir/x/w/goroot/src/runtime/mprof.go:1079
#	0x76ebf0	runtime/pprof.writeRuntimeProfile+0xb0						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:775
#	0x76ea24	runtime/pprof.writeGoroutine+0x44						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:734
#	0x76b84a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:369
#	0xfaa48f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/b/s/w/ir/x/w/targetrepo2455241928/gopls/internal/test/integration/runner.go:207
#	0xfaa013	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/b/s/w/ir/x/w/targetrepo2455241928/gopls/internal/test/integration/runner.go:255
#	0x6bf41a	testing.tRunner+0xfa								C:/b/s/w/ir/x/w/goroot/src/testing/testing.go:1689
...

1 @ 0x5b30ae 0x5c48a5 0x7f73b1 0x5e9441
#	0x7f73b0	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/b/s/w/ir/x/w/targetrepo2455241928/internal/jsonrpc2/serve.go:112

1 @ 0x5b30ae 0x5e5bba 0xd054ca 0x5e9441
#	0x5e5bb9	time.Sleep+0x119					C:/b/s/w/ir/x/w/goroot/src/runtime/time.go:214
#	0xd054c9	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/b/s/w/ir/x/w/targetrepo2455241928/gopls/internal/filecache/filecache.go:507

    runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\b\s\w\ir\x\t\gopls-test-4285953149\TestDisablingCodeLens\default\experimental\work: The process cannot access the file because it is being used by another process.
--- FAIL: TestDisablingCodeLens/default/experimental (9.54s)
2024-03-04 22:41 x_tools-gotip-windows-amd64-longtest tools@7656c4c6 go@5dcc04ae x/tools/gopls/internal/test/integration/template.TestMultilineTokens/experimental (log)
=== RUN   TestMultilineTokens/experimental
goroutine profile: total 6
1 @ 0xd56991 0xd9237d 0xf1ebf1 0xf1ea25 0xf1b84b 0x1759f90 0x1759b14 0xe6f41b 0xd99441
#	0xd9237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/b/s/w/ir/x/w/goroot/src/runtime/mprof.go:1079
#	0xf1ebf0	runtime/pprof.writeRuntimeProfile+0xb0						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:775
#	0xf1ea24	runtime/pprof.writeGoroutine+0x44						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:734
#	0xf1b84a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:369
#	0x1759f8f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/b/s/w/ir/x/w/targetrepo2455241928/gopls/internal/test/integration/runner.go:207
#	0x1759b13	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/b/s/w/ir/x/w/targetrepo2455241928/gopls/internal/test/integration/runner.go:255
#	0xe6f41a	testing.tRunner+0xfa								C:/b/s/w/ir/x/w/goroot/src/testing/testing.go:1689
...
#	0xf7ff93	net.(*netFD).accept+0x53				C:/b/s/w/ir/x/w/goroot/src/net/fd_windows.go:182
#	0xf965dd	net.(*TCPListener).accept+0x1d				C:/b/s/w/ir/x/w/goroot/src/net/tcpsock_posix.go:159
#	0xf956af	net.(*TCPListener).Accept+0x2f				C:/b/s/w/ir/x/w/goroot/src/net/tcpsock.go:367
#	0xfa7d3a	golang.org/x/tools/internal/jsonrpc2.Serve.func1+0x9a	C:/b/s/w/ir/x/w/targetrepo2455241928/internal/jsonrpc2/serve.go:76

1 @ 0xd630ae 0xd748a5 0xfa73b1 0xd99441
#	0xfa73b0	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/b/s/w/ir/x/w/targetrepo2455241928/internal/jsonrpc2/serve.go:112

    runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\b\s\w\ir\x\t\gopls-test-3015458560\TestMultilineTokens\experimental\work: The process cannot access the file because it is being used by another process.
--- FAIL: TestMultilineTokens/experimental (6.06s)
2024-03-05 15:19 x_tools-gotip-windows-amd64-longtest tools@98c835c3 go@5dcc04ae x/tools/internal/refactor/inline.TestData/param-subst.txtar (log)
=== RUN   TestData/param-subst.txtar
=== PAUSE TestData/param-subst.txtar
=== CONT  TestData/param-subst.txtar
    callee.go:92: analyzeCallee func testdata/a.add(x int, y int) int @ C:\b\s\w\ir\x\t\TestDataparam-subst.txtar1264295654\001\a\a0.go:5:1
    callee.go:467: effects list = [0 1]
    falcon.go:180: falcon: emit type int۰0 int // "int"
    falcon.go:201: falcon: emit constraint int۰0(2) *
        
        	y
    falcon.go:201: falcon: emit constraint x + int۰0(2)*y
    inline.go:55: inline add(2, 1+1) @ C:\b\s\w\ir\x\t\TestDataparam-subst.txtar1264295654\001\a\a0.go:3:12
    inline.go:662: arg #0: 2 pure=true effects=false duplicable=true free=map[] type=untyped int
    inline.go:662: arg #1: 1 + 1 pure=true effects=false duplicable=false free=map[] type=untyped int
    inline.go:1409: falcon env: type int۰0 int
    inline.go:1424: falcon env: const x int۰0 = 2
    inline.go:1424: falcon env: const y int۰0 = 2
    inline.go:1452: falcon: constraint int۰0(2) *
        
        	y satisfied
    inline.go:1452: falcon: constraint x + int۰0(2)*y satisfied
    inline.go:1354: replacing parameter "x" by argument "2"
    inline.go:550: - replace id "x" @ #32 to "2"
    inline.go:1354: replacing parameter "y" by argument "1 + 1"
    inline.go:550: - replace id "y" @ #38 to "1 + 1"
    inline.go:1763: binding decl not needed: all parameters substituted
    inline.go:858: strategy: reduce expr-context call to { return expr }
    testing.go:1231: TempDir RemoveAll cleanup: remove C:\b\s\w\ir\x\t\TestDataparam-subst.txtar1264295654\001: The process cannot access the file because it is being used by another process.
--- FAIL: TestData/param-subst.txtar (6.93s)
2024-03-05 19:26 x_tools-gotip-windows-amd64-longtest tools@029c4eaf go@e8b5bc63 x/tools/gopls/internal/test/integration/inlayhints.TestEnablingInlayHints/default/forwarded (log)
=== RUN   TestEnablingInlayHints/default/forwarded
goroutine profile: total 8
1 @ 0x556991 0x59237d 0x71ebf1 0x71ea25 0x71b84b 0xf59730 0xf592b4 0x66f41b 0x599441
#	0x59237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/b/s/w/ir/x/w/goroot/src/runtime/mprof.go:1079
#	0x71ebf0	runtime/pprof.writeRuntimeProfile+0xb0						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:775
#	0x71ea24	runtime/pprof.writeGoroutine+0x44						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:734
#	0x71b84a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:369
#	0xf5972f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/b/s/w/ir/x/w/targetrepo777523994/gopls/internal/test/integration/runner.go:207
#	0xf592b3	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/b/s/w/ir/x/w/targetrepo777523994/gopls/internal/test/integration/runner.go:255
#	0x66f41a	testing.tRunner+0xfa								C:/b/s/w/ir/x/w/goroot/src/testing/testing.go:1689
...

1 @ 0x5630ae 0x5748a5 0x8a4811 0x599441
#	0x8a4810	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/b/s/w/ir/x/w/targetrepo777523994/internal/jsonrpc2/serve.go:112

1 @ 0x5630ae 0x595bba 0x8e7cea 0x599441
#	0x595bb9	time.Sleep+0x119					C:/b/s/w/ir/x/w/goroot/src/runtime/time.go:214
#	0x8e7ce9	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/b/s/w/ir/x/w/targetrepo777523994/gopls/internal/filecache/filecache.go:507

    runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\b\s\w\ir\x\t\gopls-test-2919773067\TestEnablingInlayHints\default\forwarded\work: The process cannot access the file because it is being used by another process.
--- FAIL: TestEnablingInlayHints/default/forwarded (7.36s)
2024-03-05 19:26 x_tools-gotip-windows-amd64-longtest tools@029c4eaf go@e8b5bc63 x/tools/gopls/internal/test/integration/template.TestTemplatesFromLangID/experimental (log)
=== RUN   TestTemplatesFromLangID/experimental
goroutine profile: total 6
1 @ 0x996991 0x9d237d 0xb5ebf1 0xb5ea25 0xb5b84b 0x139b910 0x139b494 0xaaf41b 0x9d9441
#	0x9d237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/b/s/w/ir/x/w/goroot/src/runtime/mprof.go:1079
#	0xb5ebf0	runtime/pprof.writeRuntimeProfile+0xb0						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:775
#	0xb5ea24	runtime/pprof.writeGoroutine+0x44						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:734
#	0xb5b84a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:369
#	0x139b90f	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/b/s/w/ir/x/w/targetrepo777523994/gopls/internal/test/integration/runner.go:207
#	0x139b493	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/b/s/w/ir/x/w/targetrepo777523994/gopls/internal/test/integration/runner.go:255
#	0xaaf41a	testing.tRunner+0xfa								C:/b/s/w/ir/x/w/goroot/src/testing/testing.go:1689
...
#	0xbbff93	net.(*netFD).accept+0x53				C:/b/s/w/ir/x/w/goroot/src/net/fd_windows.go:182
#	0xbd65dd	net.(*TCPListener).accept+0x1d				C:/b/s/w/ir/x/w/goroot/src/net/tcpsock_posix.go:159
#	0xbd56af	net.(*TCPListener).Accept+0x2f				C:/b/s/w/ir/x/w/goroot/src/net/tcpsock.go:367
#	0xbe7d3a	golang.org/x/tools/internal/jsonrpc2.Serve.func1+0x9a	C:/b/s/w/ir/x/w/targetrepo777523994/internal/jsonrpc2/serve.go:76

1 @ 0x9a30ae 0x9b48a5 0xbe73b1 0x9d9441
#	0xbe73b0	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/b/s/w/ir/x/w/targetrepo777523994/internal/jsonrpc2/serve.go:112

    runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\b\s\w\ir\x\t\gopls-test-1341198016\TestTemplatesFromLangID\experimental\work: The process cannot access the file because it is being used by another process.
--- FAIL: TestTemplatesFromLangID/experimental (3.54s)
2024-03-05 19:26 x_tools-gotip-windows-amd64-longtest tools@029c4eaf go@e8b5bc63 x/tools/gopls/internal/test/integration/workspace.TestAdhoc_Edits/experimental (log)
=== RUN   TestAdhoc_Edits/experimental
goroutine profile: total 7
1 @ 0x1030ae 0x1148a5 0x347691 0x139441
#	0x347690	golang.org/x/tools/internal/jsonrpc2.Serve+0x350	C:/b/s/w/ir/x/w/targetrepo777523994/internal/jsonrpc2/serve.go:112

1 @ 0x1030ae 0x135bba 0x4f3a0a 0x139441
#	0x135bb9	time.Sleep+0x119					C:/b/s/w/ir/x/w/goroot/src/runtime/time.go:214
#	0x4f3a09	golang.org/x/tools/gopls/internal/filecache.gc+0x249	C:/b/s/w/ir/x/w/targetrepo777523994/gopls/internal/filecache/filecache.go:507

1 @ 0x1030ae 0xcaded 0xca9f2 0x2105cb 0x212717 0x20f6fb 0x212605 0x21100b 0x9c4d49 0xb31c45 0xb31c31 0x102c8b 0x139441
...
#	0x13237c	runtime/pprof.runtime_goroutineProfileWithLabels+0x1c				C:/b/s/w/ir/x/w/goroot/src/runtime/mprof.go:1079
#	0x2beed0	runtime/pprof.writeRuntimeProfile+0xb0						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:775
#	0x2bed04	runtime/pprof.writeGoroutine+0x44						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:734
#	0x2bbb2a	runtime/pprof.(*Profile).WriteTo+0x14a						C:/b/s/w/ir/x/w/goroot/src/runtime/pprof/pprof.go:369
#	0x9c65ef	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1.1+0x6f	C:/b/s/w/ir/x/w/targetrepo777523994/gopls/internal/test/integration/runner.go:207
#	0x9c6173	golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run.func1+0xc93	C:/b/s/w/ir/x/w/targetrepo777523994/gopls/internal/test/integration/runner.go:255
#	0x20f6fa	testing.tRunner+0xfa								C:/b/s/w/ir/x/w/goroot/src/testing/testing.go:1689

    runner.go:208: closing the sandbox: error(s) cleaning sandbox: cleaning modcache: <nil>; removing files: remove C:\b\s\w\ir\x\t\gopls-test-283869155\TestAdhoc_Edits\experimental\work: The process cannot access the file because it is being used by another process.
--- FAIL: TestAdhoc_Edits/experimental (15.13s)
2024-03-06 19:14 gotip-windows-amd64 go@0e89b67e cmd/internal/testdir.Test/fixedbugs/issue49122.go (log)
=== RUN   Test/fixedbugs/issue49122.go
=== PAUSE Test/fixedbugs/issue49122.go
=== CONT  Test/fixedbugs/issue49122.go
    testing.go:1231: TempDir RemoveAll cleanup: remove C:\b\s\w\ir\x\t\Testfixedbugsissue49122.go1255218599\001: The process cannot access the file because it is being used by another process.
--- FAIL: Test/fixedbugs/issue49122.go (1.91s)
2024-03-06 19:15 gotip-windows-amd64 go@d463de61 cmd/internal/testdir.Test/fixedbugs/bug496.go (log)
=== RUN   Test/fixedbugs/bug496.go
=== PAUSE Test/fixedbugs/bug496.go
=== CONT  Test/fixedbugs/bug496.go
    testing.go:1231: TempDir RemoveAll cleanup: remove C:\b\s\w\ir\x\t\Testfixedbugsbug496.go940872187\001: The process cannot access the file because it is being used by another process.
--- FAIL: Test/fixedbugs/bug496.go (1.82s)

watchflakes

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. OS-Windows release-blocker
Projects
Archived in project
Development

No branches or pull requests

4 participants