-
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
Bazel Windows Binary cannot run without embedded JDK #16613
Comments
I cannot reproduce #16159 (comment) building the windows Bazel nojdk binary on my windows machine. Also the nojdk Windows binary at @fmeum Did the rules_jni failure happen consistently after 902a0b5? |
I reran the release pipeline at the same commit for release-6.0.0rc1: Previous:
Now
The nojdk windows binary has significantly size difference, and the new one runs correctly. So there must be some infra problem while building the Windows binary. |
Maybe the https://cs.opensource.google/bazel/bazel/+/master:src/package-bazel.sh script is not hermetic enough, at least on Windows? 🧐 |
@meteorcloudy Yes, it kept happening consistently. Note that I am not using the nojdk build, it's just that the regular with-JDK build doesn't seem to be able to find its embedded JDK. |
@fmeum Can you provide a minimal reproduce case? |
@meteorcloudy I don't have a Windows machine I could minimize this on, but this is the workflow of which the Let me know if there is anything I could to help. |
@meteorcloudy I downloaded the Bazel binaries used in the runs: The former is 30MiB, the latter 45MiB, but the commit history doesn't explain that drastic change at all. Maybe the JDK is no longer bundled correctly? |
I can reproduce the failure with 902a0b5763dddc445f75637c08a1396de8395411 by setting JAVA_HOME to a JDK 17 installation, but not with it's parent commit or the latest last_green. I suspect this has something to do with bazelbuild/continuous-integration#1408, the temporary workaround is to rebuild the binaries at the same commit. But I'll need to dig deeper to investigate why the binaries are getting corrupted. |
@konste I have rebuilt and deployed Bazel binaries for 6.0.0rc1, the nojdk Windows binary seems to work now. |
@fmeum I also rebuild binaries for 902a0b5, the binaries look correct this time:
|
I'll close this one, but continue to investigate the issue in bazelbuild/continuous-integration#1408 |
@Wyverald and I debugged on this can find out the root cause is a a race condition in https://cs.opensource.google/bazel/bazel/+/master:src/package-bazel.sh, I'll send a fix now |
bazel build -c //src:bazel.exe //src:bazel_nojdk.exe sometimes output corrupted binaries on Windows. The reason is when we are executing the genrule for packaging the bazel zip files, we are writing a "file.list" file into the execroot, however there is no sandbox on Windows. So two actions are actually sharing the same path for the "file.list", this PR fixes the issue by writing the "file.list" file under the tmp dir. Fixes bazelbuild#16613
`bazel build -c //src:bazel.exe //src:bazel_nojdk.exe` sometimes output corrupted binaries on Windows. The reason is when we are executing the genrule for packaging the bazel zip files, we are writing a "file.list" file into the execroot, however there is no sandbox on Windows. So two actions are actually sharing the same path for the "file.list", this PR fixes the issue by writing the "file.list" file under the tmp dir. Fixes #16613 Closes #16614. PiperOrigin-RevId: 485578533 Change-Id: I74b69e58919a463d5cc40abaa6ae4ca36251cdac Co-authored-by: Yun Peng <pcloudy@google.com>
Description of the bug:
#16159 (comment)
#16159 (comment)
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Download https://releases.bazel.build/6.0.0/rc1/bazel_nojdk-6.0.0rc1-windows-x86_64.exe and run it on Windows
Which operating system are you running Bazel on?
Windows
What is the output of
bazel info release
?No response
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 master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: