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

x/build/maintner, x/build/maintner/maintnerd/maintapi: (*netMutSource).syncSeg occasionally fails with "Access is denied." on Windows, as caught by TestGetRef failing on windows-amd64-longtest #36163

Open
bcmills opened this issue Dec 16, 2019 · 3 comments

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Dec 16, 2019

It appears that maintner is trying to install log segments using atomic renames:
https://github.com/golang/build/blob/0d536a3af5fb211db2c73a4499672e9c77ed06cb/maintner/netsource.go#L580-L582

Note that Windows does not actually ensure the success of atomic callso to os.Rename (see also #34681).

For cmd/go we have an internal workaround in cmd/go/internal/robustio, which retries errors suspected to be spurious, although at this point we're mostly switching over to explicit file-locking rather than renaming for synchronization (see also #33974).


2019-12-13T18:18:58-fba2c51/windows-amd64-longtest

--- FAIL: TestGetRef (9.50s)
    api_test.go:191: getting corpus: syncing segment 27: rename C:\Users\gopher\.cache\golang-maintner\tempseg028062994 C:\Users\gopher\.cache\golang-maintner\0027.5c4a6891e9788c963979597b118bc64d1571078489b05b69be0f53be.mutlog: Access is denied.

CC @dmitshur @toothrot @cagedmantis @bradfitz

@bcmills
Copy link
Member Author

@bcmills bcmills commented Feb 20, 2020

https://build.golang.org/log/0420d03897485cb745280248cb0e951b8a866917

--- FAIL: TestGetRef (11.13s)
    api_test.go:191: getting corpus: syncing segment 46: rename C:\Users\gopher\.cache\golang-maintner\tempseg000044895 C:\Users\gopher\.cache\golang-maintner\0046.bb5084c76340045b19e6d06755ef9be321888b1344474d24be5fe494.mutlog: Access is denied.
@toothrot
Copy link
Contributor

@toothrot toothrot commented Feb 20, 2020

Retrying, as robustio does, seems like a good solution.

@bcmills
Copy link
Member Author

@bcmills bcmills commented Feb 20, 2020

If you happen to decide to use explicit file-locking instead, see #33974.

@dmitshur dmitshur changed the title x/build/maintner: (*netMutSource).syncSeg occasionally fails with "Access is denied." on Windows x/build/maintner, x/build/maintner/maintnerd/maintapi: (*netMutSource).syncSeg occasionally fails with "Access is denied." on Windows, as caught by TestGetRef failing on windows-amd64-longtest Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants