-
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
4.1.0rc1 regression: Extraneous cache misses with --remote_download_toplevel #13262
Labels
P1
I'll work on this now. (Assignee required)
team-Remote-Exec
Issues and PRs for the Execution (Remote) team
type: bug
Comments
oquenchil
added
team-Remote-Exec
Issues and PRs for the Execution (Remote) team
type: bug
untriaged
labels
Mar 24, 2021
coeuvre
added
P1
I'll work on this now. (Assignee required)
and removed
untriaged
labels
Mar 25, 2021
Thanks for reporting! I can reproduce this bug locally. Just need more time to investigate the root cause. |
coeuvre
added a commit
to coeuvre/bazel
that referenced
this issue
Mar 29, 2021
… is different. bazelbuild#13262 bazelbuild#12820 changed to set executable bit of input files based on its real value. However, this causes cache misses in --remote_download_toplevel mode since executable bit is changed after action execution by ActionMetadataHandler#getMetadata. This change effectively rolls back bazelbuild#12820.
The root cause is that the executable bit of an output file is changed after action execution by Repro:
Explain:
We can't use the real executable bit until the behavior of ActionMetadataHandler is changed. #13276 rolls back the change. |
coeuvre
added a commit
to coeuvre/bazel
that referenced
this issue
Mar 31, 2021
… is different. bazelbuild#13262 bazelbuild#12820 changed to set executable bit of input files based on its real value. However, this causes cache misses in --remote_download_toplevel mode since executable bit is changed after action execution by ActionMetadataHandler#getMetadata. This change effectively rolls back bazelbuild#12820.
coeuvre
added a commit
to coeuvre/bazel
that referenced
this issue
Mar 31, 2021
… is different. bazelbuild#13262 bazelbuild#12820 changed to set executable bit of input files based on its real value. However, this causes cache misses in --remote_download_toplevel mode since executable bit is changed after action execution by ActionMetadataHandler#getMetadata. This change effectively rolls back bazelbuild#12820.
philwo
pushed a commit
that referenced
this issue
Apr 19, 2021
… is changed Fixes #13262. #12820 changed to set executable bit of input files based on its real value. However, this causes cache misses in `--remote_download_toplevel` mode since executable bit is changed after action execution by `ActionMetadataHandler#getMetadata`. This change effectively rolls back #12820. Closes #13276. PiperOrigin-RevId: 367009617
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P1
I'll work on this now. (Assignee required)
team-Remote-Exec
Issues and PRs for the Execution (Remote) team
type: bug
Description of the problem / feature request:
When building with --remote_download_toplevel, some actions that are definitely in the cache are missed.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
The second build should have 100% hit rate, but does not. At the end of this is a build log diff [1] showing a rebuild where all the actions are identical.
Anecdotally, the hit rate increases on each iteration of clean+build. On the second build, maybe 10% of actions are missed, and it seems like they are fairly deep in the action graph - usually library linking and the like. On the third, it will be far fewer. It seems like actions that have inputs which are present only in the cache (vs locally present) end up generating different hashes
What operating system are you running Bazel on?
OSX 10.14 + Xcode 11.3.1
What's the output of
bazel info release
?The issue does not occur with
release 4.0.0
but does occur withrelease 4.1.0rc1
(#13099) as well as with master.Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
[1] https://gist.github.com/jlaxson/aec2813d19a8494b237e15093e0359a3
This is a side by side diff (left is first build when cache is totally empty, right is clean+rebuild) with two actions excerpted. First one was a cache hit and shows no actual_outputs in the event, second is a lib made from that object, and was a cache miss despite all inputs being the same
--announce_rc output:
The text was updated successfully, but these errors were encountered: