-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Windows, CI: getting "Failed to delete output files after incomplete download" #6890
Comments
This is blocking a Bazel release: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/695#e741bbc1-151b-479b-8af0-72bf7388150d I'm not even able to test downstream projects with the Bazel candidate, so this can hide unrelated bugs. |
If it can be fixed or worked around on Monday, we still have a chance of release Bazel before the holiday. |
Is that what we want? Will we be around to push a patch release if the main release turns out to be bad? |
If downloading a remotely cached action's outErr failed, the AbstractRemoteActionCache deletes the files underlying the outErr. For this deletion to succeed on Windows, the files must be closed. This commit implements that. Fixes bazelbuild#6890 Change-Id: Ib15c4a255eb9029d5fd442617a9b7472f31e8f76
I have a repro: #6945 (comment) |
I'll start bisecting. Apparently this is a regression in 0.20.0, because I cannot repro the bug with 0.19.0 |
The good news is, I found the culprit: d2920e3 The bad news is, it was a rollback of 1a95502, which caused problems. So we cannot be with or without this feature, i.e. of opening files with deletion-sharing on Windows. The principled fix would be for the AbstractRemoteActionCache to close files before it tries to delete them. |
FYI @philwo |
Wow, thanks for debugging! |
Note to self: Mark Google bug b/121159713 as fixed, when we fixed this to let my colleagues know when this is working again. Discussions and progress tracking should happen here. |
Previously, outerF.setExeception was set before closing the output stream of the download file when download fails. This was causing a permission error when trying to delete the file on Windows. Fixes #6890 RELNOTES: None PiperOrigin-RevId: 228138102
Previously, outerF.setExeception was set before closing the output stream of the download file when download fails. This was causing a permission error when trying to delete the file on Windows. Fixes #6890 RELNOTES: None PiperOrigin-RevId: 228138102
Previously, outerF.setExeception was set before closing the output stream of the download file when download fails. This was causing a permission error when trying to delete the file on Windows. Fixes #6890 RELNOTES: None PiperOrigin-RevId: 228138102
Previously, outerF.setExeception was set before closing the output stream of the download file when download fails. This was causing a permission error when trying to delete the file on Windows. Fixes bazelbuild/bazel#6890 RELNOTES: None PiperOrigin-RevId: 228138102
Description of the problem / feature request:
On Bazel CI, I'm repeatedly getting the following error:
(https://buildkite.com/bazel/google-bazel-presubmit/builds/12883#61fdc327-7d64-4979-a3b4-9d35f2c729a2)
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I don't know. I saw the error on CI for my change https://bazel-review.googlesource.com/c/bazel/+/84151.
Retrying the job doesn't seem to help.
Looks like this is where the error comes from:
bazel/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java
Lines 280 to 284 in b3f28d3
And I suppose the reason is that
outErr
has open streams for stdout and stderr, and those streams should be closed before attempting to delete the files here:bazel/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java
Lines 273 to 274 in b3f28d3
What operating system are you running Bazel on?
What's the output of
bazel info release
?0.20.0
The text was updated successfully, but these errors were encountered: