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

Fix race condition in package-bazel.sh #16614

Closed
wants to merge 1 commit into from

Conversation

meteorcloudy
Copy link
Member

@meteorcloudy meteorcloudy commented Oct 31, 2022

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

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
@meteorcloudy
Copy link
Member Author

@bazel-io fork 6.0.0

@sgowroji sgowroji added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website awaiting-review PR is awaiting review from an assigned reviewer labels Oct 31, 2022
@copybara-service copybara-service bot closed this in bddb191 Nov 2, 2022
ShreeM01 added a commit that referenced this pull request Nov 2, 2022
`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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review PR is awaiting review from an assigned reviewer team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bazel Windows Binary cannot run without embedded JDK
2 participants