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 binaries built with the latest MSVC version (14.40.33807) crash with older vcruntime #1967

Open
fmeum opened this issue Jun 6, 2024 · 17 comments · Fixed by #1968
Open
Assignees
Labels

Comments

@fmeum
Copy link
Contributor

fmeum commented Jun 6, 2024

Description of the bug:

In GitHub Actions on a Windows runner, Bazelisk fails to launch Bazel 7.2.0rc3, while 7.2.0rc2 on Windows and 7.2.0rc3 on other OSes work just fine (see fmeum/buildozer#15).

The log output from the runner:

2024-06-06T07:15:48.7574869Z ##[group]Run bazelisk run //:run_buildozer
2024-06-06T07:15:48.7575484Z �[36;1mbazelisk run //:run_buildozer�[0m
2024-06-06T07:15:48.7575868Z �[36;1mbazelisk test //...�[0m
2024-06-06T07:15:48.7611914Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2024-06-06T07:15:48.7612417Z env:
2024-06-06T07:15:48.7612670Z   USE_BAZEL_VERSION: 7.2.0rc3
2024-06-06T07:15:48.7613019Z ##[endgroup]
2024-06-06T07:15:59.3619476Z 2024/06/06 07:15:59 Downloading https://releases.bazel.build/7.2.0/rc3/bazel-7.2.0rc3-windows-x86_64.exe...
2024-06-06T07:16:00.9729834Z ##[error]Process completed with exit code 1.

Which category does this issue belong to?

No response

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

No response

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development 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 HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

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

@fmeum
Copy link
Contributor Author

fmeum commented Jun 6, 2024

@meteorcloudy

@fmeum
Copy link
Contributor Author

fmeum commented Jun 6, 2024

last_green fails in a similar way.

@meteorcloudy
Copy link
Member

Let me take a look now

@meteorcloudy
Copy link
Member

Wow, turned out to be bazelbuild/bazel@759fe7d

@meteorcloudy
Copy link
Member

Not sure why it's not caught in presubmit

@meteorcloudy
Copy link
Member

OK, we also did a windows VM update around the same time, maybe that's the real cause.

@fmeum
Copy link
Contributor Author

fmeum commented Jun 6, 2024

If bazelbuild/bazel@759fe7d turns out to be the culprit, I'll never consider any change safe for cherry-picking anymore :-D

@meteorcloudy
Copy link
Member

The binary runs fine on the same VM image where it was built:

C:\Users\pcloudy\workdir>set USE_BAZEL_VERSION=7.2.0rc3

C:\Users\pcloudy\workdir>bazel
2024/06/06 09:04:06 Downloading https://releases.bazel.build/7.2.0/rc3/bazel-7.2.0rc3-windows-x86_64.exe...
Downloading: 63 MB out of 63 MB (100%)
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
                                                        [bazel release 7.2.0rc3]
Usage: bazel <command> <options> ...

Available commands:

@meteorcloudy
Copy link
Member

I can confirm building with MSVC 2022 14.40.33807 causes this problem, but not when I switch to MSVC 2019.

@meteorcloudy
Copy link
Member

I still haven't figured out a fix, but I can revert the Windows VM image first.

However, this would revert #1962
/cc @ahumesky @tomrenn

@meteorcloudy
Copy link
Member

I've rebuilt Bazel binaries at HEAD, and hopefully that solves the issue.

@keertk We need to rerun the release pipeline for rc3, too.

@meteorcloudy
Copy link
Member

meteorcloudy commented Jun 6, 2024

OK, rc3 release have been refreshed, also fixed last_green. I'll trigger builds to fix commits on master and release-7.2.0 retrospectively.

@meteorcloudy meteorcloudy added P1 and removed P0 labels Jun 6, 2024
@fmeum
Copy link
Contributor Author

fmeum commented Jun 6, 2024

Could be related to actions/runner-images#10004 (comment)

@meteorcloudy meteorcloudy transferred this issue from bazelbuild/bazel Jun 7, 2024
@meteorcloudy meteorcloudy changed the title Bazelisk fails to launch Bazel 7.2.0rc3 on Windows Bazel binaries built with the latest MSVC version (14.40.33807) doesn't run on some older Windows machines. Jun 7, 2024
@meteorcloudy meteorcloudy changed the title Bazel binaries built with the latest MSVC version (14.40.33807) doesn't run on some older Windows machines. Bazel binaries built with the latest MSVC version (14.40.33807) crash on older Windows machines. Jun 7, 2024
meteorcloudy added a commit that referenced this issue Jun 7, 2024
Fixes #1967

There is no way to prevent installing the latest version, so we remove
it manually.
@meteorcloudy meteorcloudy reopened this Jun 7, 2024
@meteorcloudy meteorcloudy added P2 and removed P1 labels Jun 7, 2024
@benjaminp
Copy link

Could 8.0.0-pre.20240530.1 be refreshed, too? It seems to have been afflicted.

@meteorcloudy
Copy link
Member

@benjaminp 8.0.0-pre.20240530.1 should be fixed now, can you verify?

@meteorcloudy meteorcloudy changed the title Bazel binaries built with the latest MSVC version (14.40.33807) crash on older Windows machines. Bazel binaries built with the latest MSVC version (14.40.33807) crash with older vcruntime Jun 10, 2024
@benjaminp
Copy link

https://releases.bazel.build/8.0.0/rolling/8.0.0-pre.20240530.1/bazel-8.0.0-pre.20240530.1-windows-x86_64.exe still seems affected. (The download server reports "June 6" as the last modified time.)

@meteorcloudy
Copy link
Member

I see, I only refreshed 3e2aec2fdefea213cde0c0fc41eb40221995d1ca. Now reran the release pipeline, should be fixed now.

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

Successfully merging a pull request may close this issue.

6 participants