Skip to content

x/tools/gopls/internal/cmd: TempDir RemoveAll cleanup fail #65317

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

Closed
gopherbot opened this issue Jan 26, 2024 · 6 comments
Closed

x/tools/gopls/internal/cmd: TempDir RemoveAll cleanup fail #65317

gopherbot opened this issue Jan 26, 2024 · 6 comments
Labels
FrozenDueToAge 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 26, 2024

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/cmd" && `TempDir RemoveAll cleanup: remove .*: The process cannot access the file because it is being used by another process`

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestPrepareRename
=== PAUSE TestPrepareRename
=== CONT  TestPrepareRename
    testing.go:1231: TempDir RemoveAll cleanup: remove C:\Users\swarming\.swarming\w\ir\x\t\TestPrepareRename1219571028\001: The process cannot access the file because it is being used by another process.
--- FAIL: TestPrepareRename (8.25s)

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 26, 2024
@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 26, 2024
@gopherbot gopherbot added this to the Unreleased milestone Jan 26, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/cmd" && test == "TestPrepareRename"
2024-01-05 15:29 x_tools-go1.22-windows-arm64 tools@3e8a0a3b release-branch.go1.22@fa72f3e0 x/tools/gopls/internal/cmd.TestPrepareRename (log)
=== RUN   TestPrepareRename
=== PAUSE TestPrepareRename
=== CONT  TestPrepareRename
    testing.go:1231: TempDir RemoveAll cleanup: remove C:\Users\swarming\.swarming\w\ir\x\t\TestPrepareRename1219571028\001: The process cannot access the file because it is being used by another process.
--- FAIL: TestPrepareRename (8.25s)

watchflakes

@cherrymui cherrymui changed the title x/tools/gopls/internal/cmd: TestPrepareRename failures x/tools/gopls/internal/cmd: TempDir RemoveAll cleanup fail Jan 26, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/cmd" && `TempDir RemoveAll cleanup: remove .*: The process cannot access the file because it is being used by another process`
2023-12-15 21:03 x_tools-go1.20-windows-amd64-longtest tools@e601fd80 release-branch.go1.20@8cb86b5f x/tools/gopls/internal/cmd.TestExecute (log)
=== RUN   TestExecute
=== PAUSE TestExecute
=== CONT  TestExecute
    testing.go:1206: TempDir RemoveAll cleanup: remove C:\b\s\w\ir\x\t\TestExecute2613003941\001: The process cannot access the file because it is being used by another process.
--- FAIL: TestExecute (25.59s)

watchflakes

@bcmills
Copy link
Contributor

bcmills commented Jan 29, 2024

This indicates either a very slow builder, or (probably more likely?) a file handle or subprocess leaked in the course of the test.

Perhaps the gopls process created by the test leaked a go list child process?

See previously:

@adonovan
Copy link
Member

Perhaps the gopls process created by the test leaked a go list child process?

From the lack of t.Errorf lines in the log, I think this test otherwise passed, which means gopls exited already, and I can't immediately see why it would leave a go list or any other child process behind.

@findleyr
Copy link
Member

findleyr commented Feb 1, 2024

This might be #65180.

@findleyr
Copy link
Member

findleyr commented Feb 2, 2024

I'm going to eagerly close this, hoping that it was fixed along with #65180.

@findleyr findleyr closed this as completed Feb 2, 2024
@golang golang locked and limited conversation to collaborators Feb 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge 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

4 participants