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

Closed
bradfitz opened this issue Dec 18, 2017 · 9 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Milestone

Comments

@bradfitz
Copy link
Contributor

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 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows labels Dec 18, 2017
@bradfitz bradfitz added this to the Unplanned milestone Dec 18, 2017
@odeke-em odeke-em changed the title windows: failed to remove file (Access is denied) after child process cmd/go: failed to remove file (Access is denied) after child process on Windows in TestLocalImportsEasySub Dec 18, 2017
@alexbrainman
Copy link
Member

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

Looks very likely the same problem to me.

Alex

@aclements
Copy link
Member

@bradfitz
Copy link
Contributor Author

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
Copy link
Contributor

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
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 <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
@bcmills
Copy link
Contributor

bcmills commented Jan 18, 2019

our general os.Process.Wait woes on Windows?

Is that #19491?

@alexbrainman
Copy link
Member

Is that #19491?

Yes. And, probably, many others - for example #25965 (comment)

Alex

@youngjuning
Copy link

same issues

@bcmills
Copy link
Contributor

bcmills commented Dec 8, 2021

TestLocalImportsEasySub no longer exists, and the other cmd/go tests should have been fixed with #30789. Closing this issue.

The underlying Access is denied failure still exists, and is tracked in #25965 and #50051.

@bcmills
Copy link
Contributor

bcmills commented Dec 8, 2021

Duplicate of #30789

@bcmills bcmills marked this as a duplicate of #30789 Dec 8, 2021
@bcmills bcmills closed this as completed Dec 8, 2021
@golang golang locked and limited conversation to collaborators Dec 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Projects
None yet
Development

No branches or pull requests

6 participants