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

RBE Action Failures Don't show Error Message #15206

Closed
jlaxson opened this issue Apr 10, 2022 · 5 comments
Closed

RBE Action Failures Don't show Error Message #15206

jlaxson opened this issue Apr 10, 2022 · 5 comments

Comments

@jlaxson
Copy link
Contributor

jlaxson commented Apr 10, 2022

Description of the bug:

In Bazel 5.0.0, when an action fails, its stdout/stderr is shown in the terminal. In Bazel 5.1.0, there is an error message instead: Invalid action cache entry c0a87968c7fcdb0db0f4eadbf63f2b2162b9591e18dc1891360bef4a9e77c7fa: expected output <file> does not exist.

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

BUILD:

genrule(name="failing_rule", outs=["file.txt"], cmd="echo show me the error!; exit 1")

bazel build //package:failing_rule

Under 5.0.0:

ERROR: /package/BUILD:21:8: Executing genrule :failing_rule failed: (Exit 1): bash failed: error executing command /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; echo show me the error!; exit 1'
show me the error!

Under 5.1.0:

ERROR: /package/BUILD:21:8: Executing genrule :failing_rule failed: (Exit 34): Invalid action cache entry 97e40eca0142883a7bf97974103e483299bcfd11ebd717a8ffecdc89c834bbc1: expected output libs/android/file.txt does not exist.

Which operating system are you running Bazel on?

darwin arm64

What is the output of bazel info release?

release 5.1.0

Any other information, logs, or outputs that you want to share?

#15085 seems to have modified the code generating the error message in RemoteExecutionService.java:1027. The comments on that method imply that this should only happen in --remote_download_minimal, however it happens for me in any of --remote_download_outputs={all/toplevel/minimal}. Even if intended, this makes debugging failed actions very tedious.

cc @brentleyjones

@brentleyjones
Copy link
Contributor

cc: @coeuvre

Is this fixed in 5.1.1?

@jlaxson
Copy link
Contributor Author

jlaxson commented Apr 10, 2022

You're right... I missed the boat that 5.1.1 was latest. All good.

@jlaxson jlaxson closed this as completed Apr 10, 2022
@kjlubick
Copy link
Contributor

I am still observing the missing error messages in 5.2.0

@Ryang20718
Copy link

Ryang20718 commented Jan 10, 2023

I am also observing this missing error in 5.3.1

E.g

Invalid action cache entry c8646de7fe84bfd6bb6ff4d68dfe02bcfd02975447e105b069ff1afc90a186a6: expected output external/zlib/zlib/include/crc32.h does not exist.

@coeuvre
Copy link
Member

coeuvre commented Jan 12, 2023

Printing the missing error is expected if the declared outputs are not created.

The problem for this issue was the underlying error message from the action's stdout/stderr didn't get printed. In this case show me the error!. I believe this issue was fixed in 5.1.1 and onwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants