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: failed to remove file (Access is denied) after child process on Windows in TestLocalImportsEasySub #23171

Open
bradfitz opened this Issue Dec 18, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@bradfitz
Member

bradfitz commented Dec 18, 2017

Windows XP test flake:

https://build.golang.org/log/9f8d95ce0a594f5634d30e4f9b842decdd39ed3e

--- FAIL: TestLocalImportsEasySub (0.50s)
	go_test.go:1146: running testgo [build -o ./easysub.exe testdata\local\easysub\main.go]
	go_test.go:1147: remove ./easysub.exe: Access is denied.
FAIL
FAIL	cmd/go	90.989s

I looked at the test and it seems fine. It should wait for any child process to finish before it cleans up, so I don't see how windows would return an access error on the delete.

Maybe related to our general os.Process.Wait woes on Windows?

/cc @johnsonj @alexbrainman

@bradfitz bradfitz added this to the Unplanned milestone Dec 18, 2017

@odeke-em odeke-em changed the title from windows: failed to remove file (Access is denied) after child process to cmd/go: failed to remove file (Access is denied) after child process on Windows in TestLocalImportsEasySub Dec 18, 2017

@alexbrainman

This comment has been minimized.

Member

alexbrainman commented Dec 25, 2017

Maybe related to our general os.Process.Wait woes on Windows?

Looks very likely the same problem to me.

Alex

@bradfitz

This comment has been minimized.

Member

bradfitz commented Nov 9, 2018

@aclements, we removed (in 5c35973, https://go-review.googlesource.com/c/145221) a 5ms sleep in the Windows exec wait path, hoping it was only needed on Windows XP, but apparently not. (Bug: #25965)

We're clearly doing something wrong on Windows if we need a 5ms sleep to work around it.

@gopherbot

This comment has been minimized.

gopherbot commented Nov 9, 2018

Change https://golang.org/cl/148957 mentions this issue: Revert "os: remove sleep in windows Process.Wait"

gopherbot pushed a commit that referenced this issue Nov 9, 2018

Revert "os: remove sleep in windows Process.Wait"
This reverts CL 145221 (commit 5c35973)

Reason for revert: breaks the build occasionally.

Updates #23171
Updates #25965

Change-Id: Ie1e3c76ab9bcd8d28b6118440b5f80c76f9b1852
Reviewed-on: https://go-review.googlesource.com/c/148957
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment