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

Bazel fails build if Remote Cache returns AC but not CAS #12423

Closed
artem-zinnatullin opened this issue Nov 5, 2020 · 6 comments
Closed

Bazel fails build if Remote Cache returns AC but not CAS #12423

artem-zinnatullin opened this issue Nov 5, 2020 · 6 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug

Comments

@artem-zinnatullin
Copy link
Contributor

Description of the problem / feature request:

We have Remote Build Cache for Bazel that can't guarantee that between request for AC and CAS for a given key CAS won't be evicted from the cache.

It seems that this can result in Bazel build failing with following error:

ERROR: /a/b/c/BUILD:3:21: output 'a/b/c/lib_base_symbols/symbols.zip' was not created
ERROR: /a/b/c/BUILD:3:21: not all outputs were created or valid

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

I think the issue happens when Remote Cache returns AC (metadata) but by the time Bazel requests CAS, it's evicted from the remote cache so it returns 404 and Bazel fails because it doesn't have output for an action.

What operating system are you running Bazel on?

macOS, Linux.

What's the output of bazel info release?

release 3.6.0

Have you found anything relevant by searching the web?


My assumption might be wrong, but if it was right, I think Bazel should not expect CAS to be guaranteed if AC was returned and gracefully run the action locally to generate the output.

@coeuvre coeuvre self-assigned this Nov 6, 2020
@coeuvre coeuvre added the team-Remote-Exec Issues and PRs for the Execution (Remote) team label Nov 6, 2020
@artem-zinnatullin
Copy link
Contributor Author

Ah, I just noticed #8250, which is basically same issue

Please feel free to close this one as duplicate, if you think it is

@ulfjack
Copy link
Contributor

ulfjack commented Nov 11, 2020

What flags are you using for that build?

@coeuvre coeuvre added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Dec 9, 2020
@keith
Copy link
Member

keith commented Jan 15, 2021

@ulfjack which flags specifically are you wondering about?

@cocreature
Copy link

In case it’s a useful data point: We regularly (unfortunately) encounter the same error message on our Windows CI nodes during Haskell builds (and only there). I tried to verify that this is caused y this issue however, it seems like like deleting CAS outputs (or overwriting them with empty files) results in a BuilkTransferException for us and it gets rebuild locally gracefully and not the error mentioned above. We are not using remote builds without the bytes so in case this is really the same as #8250, it would explain why we see different behavior.

@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Apr 30, 2023
@coeuvre
Copy link
Member

coeuvre commented May 2, 2023

This bug has been fixed in recent releases.

@coeuvre coeuvre closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug
Projects
None yet
Development

No branches or pull requests

7 participants
@keith @philwo @artem-zinnatullin @cocreature @coeuvre @ulfjack and others