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

cmd/go: test tmpdir failure #55260

Open
gopherbot opened this issue Sep 20, 2022 · 6 comments
Open

cmd/go: test tmpdir failure #55260

gopherbot opened this issue Sep 20, 2022 · 6 comments
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Sep 20, 2022

#!watchflakes
post <- pkg == "cmd/go" && test == "" && `unexpected files left in tmpdir` && `vcstest\d+`

Bug automatically created to track these flakes.

— 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 Sep 20, 2022
@gopherbot
Copy link
Author

gopherbot commented Sep 20, 2022

Found new matching flaky dashboard failures for:

#!watchflakes
post <- pkg == "cmd/go" && test == "" && !`panic: test timed out`
2022-08-16 01:54 windows-amd64-2012 go@5e7697b6 cmd/go (log)
go test proxy running at GOPROXY=http://127.0.0.1:51191/mod
PASS
2022/08/16 02:13:18 unexpected files left in tmpdir: [go-build2656576543]

watchflakes

@rsc rsc changed the title cmd/go: flaky test crash cmd/go: test tmpdir failure Sep 20, 2022
@bcmills
Copy link
Contributor

bcmills commented Sep 20, 2022

Duplicate of #30789

@bcmills bcmills marked this as a duplicate of #30789 Sep 20, 2022
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2022
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "cmd/go" && test == "" && `unexpected files left in tmpdir`
2023-03-22 17:41 linux-amd64-longtest go@b52a6963 cmd/go (log)
vcs-test.golang.org rerouted to http://127.0.0.1:34315
https://vcs-test.golang.org rerouted to https://127.0.0.1:34747
go test proxy running at GOPROXY=http://127.0.0.1:39473/mod
2023/03/22 18:11:43 http: TLS handshake error from 127.0.0.1:45120: read tcp 127.0.0.1:34747->127.0.0.1:45120: read: connection reset by peer
2023/03/22 18:11:43 http: TLS handshake error from 127.0.0.1:45146: EOF
2023/03/22 18:11:44 http: TLS handshake error from 127.0.0.1:45170: read tcp 127.0.0.1:34747->127.0.0.1:45170: read: connection reset by peer
2023/03/22 18:11:44 http: TLS handshake error from 127.0.0.1:45190: EOF
2023/03/22 18:11:44 http: TLS handshake error from 127.0.0.1:45196: read tcp 127.0.0.1:34747->127.0.0.1:45196: read: connection reset by peer
2023/03/22 18:11:44 http: TLS handshake error from 127.0.0.1:45212: EOF
2023/03/22 18:11:44 http: TLS handshake error from 127.0.0.1:45228: EOF
2023/03/22 18:12:08 http: TLS handshake error from 127.0.0.1:45852: EOF
FAIL
2023/03/22 18:14:03 unexpected files left in tmpdir: [vcstest1984193402]

watchflakes

@gopherbot gopherbot reopened this Mar 23, 2023
@bcmills
Copy link
Contributor

bcmills commented Mar 23, 2023

@bcmills bcmills self-assigned this Mar 23, 2023
@bcmills bcmills added this to the Go1.21 milestone Mar 23, 2023
@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. GoCommand cmd/go labels Mar 23, 2023
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 23, 2023
@bcmills bcmills removed their assignment Mar 23, 2023
@bcmills bcmills removed the Testing An issue that has been verified to require only test changes, not just a test failure. label Mar 23, 2023
@bcmills bcmills modified the milestones: Go1.21, Backlog Mar 23, 2023
@bcmills
Copy link
Contributor

bcmills commented Mar 23, 2023

I don't see how this error is possible.
srv.WorkDir is removed here:
https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/vcweb/vcstest/vcstest.go;l=129-131;drc=8749d12bb76db77cdf37d47d666a5962b8a5928b

If the RemoveAll call fails, it logs to the output of TestScript:
https://cs.opensource.google/go/go/+/master:src/cmd/go/script_test.go;l=48-50;drc=ebb572d82f97d19d0016a49956eb1fddc658eb76

It might be possible for a racing vcweb handler to recreate the directory after the test cleanup occurs, but the handlers are all supposed to be stopped before the directory is removed:
https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/vcweb/vcstest/vcstest.go;l=126-128;drc=8749d12bb76db77cdf37d47d666a5962b8a5928b

Probably this needs more logging to figure out which exact files still exist.

@gopherbot
Copy link
Author

Change https://go.dev/cl/479055 mentions this issue: cmd/go: log more information about leaked temp files

gopherbot pushed a commit that referenced this issue May 18, 2023
Previously, we were only logging the top-level names of leaked
directories, which doesn't provide much information for debugging.

For #55260.

Change-Id: I845d158135d67b5d7fdeb16ab7031a061535e643
Reviewed-on: https://go-review.googlesource.com/c/go/+/479055
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: Done
Development

No branches or pull requests

3 participants