-
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
Cache eviction hangs action evaluation with remote execution #21777
Comments
and when it's missing, treat it as remote cache eviction. Also revert the workaround for bazelbuild#19513. Fixes bazelbuild#21777. Potential fix for bazelbuild#21626 and bazelbuild#21778. Closes bazelbuild#21825. PiperOrigin-RevId: 619877088 Change-Id: Ib1204de8440b780e5a6ee6a563a87da08f196ca5
@coeuvre Thanks for the fix, I could verify this works with the repro case! And could we also ask backporting this? Preferrably 7.0.3 |
and when it's missing, treat it as remote cache eviction. Also revert the workaround for #19513. Fixes #21777. Potential fix for #21626 and #21778. Closes #21825. PiperOrigin-RevId: 619877088 Change-Id: Ib1204de8440b780e5a6ee6a563a87da08f196ca5 Commit eda0fe4 Co-authored-by: Chi Wang <chiwang@google.com>
and when it's missing, treat it as remote cache eviction. Also revert the workaround for bazelbuild#19513. Fixes bazelbuild#21777. Potential fix for bazelbuild#21626 and bazelbuild#21778. Closes bazelbuild#21825. PiperOrigin-RevId: 619877088 Change-Id: Ib1204de8440b780e5a6ee6a563a87da08f196ca5
and when it's missing, treat it as remote cache eviction. Also revert the workaround for #19513. Fixes #21777. Potential fix for #21626 and #21778. Closes #21825. PiperOrigin-RevId: 619877088 Change-Id: Ib1204de8440b780e5a6ee6a563a87da08f196ca5 Commit eda0fe4 Co-authored-by: Chi Wang <chiwang@google.com>
A fix for this issue has been included in Bazel 7.1.2 RC1. Please test out the release candidate and report any issues as soon as possible. |
Description of the bug:
Setup:
Reproduction:
a. Do not delete any AC entries. These AC entries are now invalid.
b. At this point, FindMissingBlobs will return all CAS entries as missing.
In this scenario, we made all the AC entries invalid before the GetActionResult RPC returned them as found. However, in practice, the entry could become invalid immediately after the GetActionResult RPC returns. That’s just difficult to actually simulate.
Expected behavior:
Bazel crashes with exit code 39 since the AC entries for the prerequisite targets are invalid.
Expected logs, as shown when less than 8 input files were missing:
Actual behavior:
Logs from step 3 indicate both hang, one on download which times out, another afterwards:
Investigation:
The second hang after the build failure looks very similar to #21626, and we were able to prevent the hang by disabling
AsyncTaskCache
. However, when Bazel exits with timeout we don’t get the exit code 39, and we also don’t think Bazel should be timing out on input uploads.The download happens when uploadBlob() tries to set its input from a remote file. That contains a ByteStream/Read operation, in this case to a nonexistent blob, which eventually gets executed when the uploader tries to read from the Chunker. When
ByteStream/Read
returns an RPC error, Bazel doesn’t properly subscribe to that while trying to upload and it never gets the CacheNotFoundException becauseOnError()
is never called.We were able to get the
CacheNotFoundException
wrapped inExecutionException
when we forcefully executed the upload() call here by callingupload(committedSize).get()
, but we could not yet find a place to properly subscribe to the Exception while maintaining parallelism.We think this may not be just limited to BwoB issues. We suspect any multiple RPC failures from this path could hang the uploads, even if it’s not about missing cache entries, but we haven't yet tried reproducing it in other ways.
Which category does this issue belong to?
Remote Execution
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Check out https://github.com/hoj-stripe/cache-eviction-hang, run
./repro_hanging.sh
.Which operating system are you running Bazel on?
Ubuntu 20.04.6 LTS
What is the output of
bazel info release
?release 7.1.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
It was introduced in aafe123 (for 6.1.0)
But haven't yet bisected the last time it was fixed, since it used to hang before as well.
5.4.0 doesn’t hang and
5.3.2 hangs on
//:less_than_eight_files
.Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
cc @clintharrison @sushain97 @coeuvre
The text was updated successfully, but these errors were encountered: