-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Figure out why bazel behaves weirdly (not recognizing changes to image after it is installed) #8915
Comments
Assigning to current sherrif. |
Undo #8914 when this is fixed please. |
Same error in #8909 |
Same temporary fix as https://github.com/google/oss-fuzz/actions/runs/3396815368/jobs/5648300142. Seems to be affected by google#8915 per failures in https://github.com/google/oss-fuzz/actions/runs/3396815368/jobs/5648300142
I think this is affecting protobuf-python project as well. Adding same temporary fix as upb to protobuf-python/Dockerfile in #8930, but actually it looks like the sha256 isn't valid for gcr.io/oss-fuzz-base/base-builder-python. @jonathanmetzman can you assist here? |
Same temporary fix as #8914 Seems to be affected by #8915 per failures in https://github.com/google/oss-fuzz/actions/runs/3396815368/jobs/5648300142 Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>
Have you had a chance to look into this at all Navid? |
Unfortunately I did not find time to investigate this. |
CC @stefanbucur who worked on the bazel integration and may have ideas. |
Hmm, this is weird. I'll try to take a look tomorrow (after GUAC workshop ends today) |
Sorry for the latency, will also take a look today or tomorrow unless Mihai beats me to it. |
So I think the issue is partially due to bazelbuild/bazel#8685. Testing with protobuf, the error is from a bazel action trying to execute
Paradoxically, running Looking deeper at the failing rule:
This is probably because the exec env gets empty:
But why? I don't know yet. The specific build command that crashes is
|
I think I found the issue: On the good build (with #8914):
On the broken one (with #8914 removed):
Bazel executes commands in an empty environment using Turns out, in the working environment
The non working environment only searches
The 2 Pythons are also different:
|
I have a fix in #9507 |
The issue in #8915 is that the environment no longer has a leftover `python3` binary in `/bin/python3`. This uncovers a bug in the `upb` and `jwt-verify-lib` Dockerfiles where `python2` was installed (or no Python was installed). The issue seems to show up on Bazel projects only due to the way Bazel executes commands: it uses `env -` to run them in a clear environment, meaning that even `$PATH` is altered. Before bc02fd0 the issues in the Dockerfiles were hidden by the fact that the environment contained multiple versions of Python and one happened to be matched by this search path. This fixes #8915, reverting #8914 and #8909 tweaks to #8915. I did not do a similar thing for #8930 as maybe that can be fixed by changing the base python image? Tested: Tested that I can build the `upb` fuzzers with this change. Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com> Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>
The issue in google#8915 is that the environment no longer has a leftover `python3` binary in `/bin/python3`. This uncovers a bug in the `upb` and `jwt-verify-lib` Dockerfiles where `python2` was installed (or no Python was installed). The issue seems to show up on Bazel projects only due to the way Bazel executes commands: it uses `env -` to run them in a clear environment, meaning that even `$PATH` is altered. Before bc02fd0 the issues in the Dockerfiles were hidden by the fact that the environment contained multiple versions of Python and one happened to be matched by this search path. This fixes google#8915, reverting google#8914 and google#8909 tweaks to google#8915. I did not do a similar thing for google#8930 as maybe that can be fixed by changing the base python image? Tested: Tested that I can build the `upb` fuzzers with this change. Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com> Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>
Bazel for some reason doesn't know about changes to the images after it is installed. So in bc02fd0 when I stopped installing tons of unneeded pacakges, python3 stopped getting installed in base-builder. This ended up breaking upb (not sure why trial builds missed this) even though upb installs python3 in its own dockerfile, bazel couldn't find it.
The text was updated successfully, but these errors were encountered: