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

8.1.0: Unrecognized VM option 'UseAllWindowsProcessorGroups' #25312

Closed
rbeasley-avgo opened this issue Feb 18, 2025 · 6 comments
Closed

8.1.0: Unrecognized VM option 'UseAllWindowsProcessorGroups' #25312

rbeasley-avgo opened this issue Feb 18, 2025 · 6 comments
Labels
platform: windows team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged

Comments

@rbeasley-avgo
Copy link

Description of the bug:

When invoked on Windows w/ BellSoft Liberica 21.0.4, Bazel 8.1.0 chokes w/ the following:

Unrecognized VM option 'UseAllWindowsProcessorGroups'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

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?

Windows Server 2022

What is the output of bazel info release?

release 8.1.0-vmware

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 ?

Our baseline is 7e086c215c3cbaea66a1b795c5393311fea74bd6.

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

12a3fc0

Have you found anything relevant by searching the web?

No response

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

Enclosing -XX:+UseAllWindowsProcessorGroups in -XX:+IgnoreUnrecognizedVMOptions and -XX:-IgnoreUnrecognizedVMOptions doesn't appear to work as intended w/ BellSoft Liberica OpenJDK 21.0.4. It looks like IgnoreUnrecognizedVMOptions is processed out of band such that the -XX:+Ignore... is immediately negated by -XX:-Ignore.... (I only skimmed, but IIUC, the JVM launcher takes a separate pass over argv to look for IgnoreUnrecognizedVMOptions and toggle a flag variable.)

https://github.com/openjdk/jdk21u/blob/master/src/hotspot/share/runtime/arguments.cpp#L3620-L3692

@fmeum
Copy link
Collaborator

fmeum commented Feb 18, 2025

@meteorcloudy Looks like the compatibility trick doesn't work. We could require the latest patch version of the JDK or always ignore unknown VM options on Windows, not sure what's better.

@fmeum
Copy link
Collaborator

fmeum commented Feb 18, 2025

@bazel-io fork 8.1.1

@iancha1992
Copy link
Member

@bazel-io fork 8.2.0

@meteorcloudy
Copy link
Member

We could require the latest patch version of the JDK or always ignore unknown VM options on Windows

Requiring latest patch version of the JDK will break users running bazel_nojdk? I'm fine with always ignore unknown VM options on Windows

@hvadehra hvadehra added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website and removed team-Rules-Java Issues for Java rules labels Feb 20, 2025
bazel-io pushed a commit to bazel-io/bazel that referenced this issue Feb 20, 2025
`-XX:-IgnoreUnrecognizedVMOptions` is always evaluated at the beginning of argument parsing and thus can't be used to disable the feature before consuming `--host_jvm_args`.

Fixes bazelbuild#25312

Closes bazelbuild#25342.

PiperOrigin-RevId: 729186918
Change-Id: Iafe65a6ad8774dcb5605bdfe0adeb17547291b4c
bazel-io pushed a commit to bazel-io/bazel that referenced this issue Feb 20, 2025
`-XX:-IgnoreUnrecognizedVMOptions` is always evaluated at the beginning of argument parsing and thus can't be used to disable the feature before consuming `--host_jvm_args`.

Fixes bazelbuild#25312

Closes bazelbuild#25342.

PiperOrigin-RevId: 729186918
Change-Id: Iafe65a6ad8774dcb5605bdfe0adeb17547291b4c
iancha1992 pushed a commit that referenced this issue Feb 21, 2025
`-XX:-IgnoreUnrecognizedVMOptions` is always evaluated at the beginning
of argument parsing and thus can't be used to disable the feature before
consuming `--host_jvm_args`.

Fixes #25312

Closes #25342.

PiperOrigin-RevId: 729186918
Change-Id: Iafe65a6ad8774dcb5605bdfe0adeb17547291b4c

Commit
6d64e2e

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@iancha1992
Copy link
Member

A fix for this issue has been included in Bazel 8.1.1 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=8.1.1rc1. Thanks!

@rbeasley-avgo
Copy link
Author

A fix for this issue has been included in Bazel 8.1.1 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=8.1.1rc1. Thanks!

Confirmed. Thanks!

PS C:\work> $env:USE_BAZEL_VERSION="8.1.0"
PS C:\work> bazelisk version
Bazelisk version: v1.25.0
Starting local Bazel server (8.1.0) and connecting to it...
INFO: Reading 'startup' options from c:\work\.bazelrc: --windows_enable_symlinks --unlimit_coredumps --local_startup_timeout_secs=600 --host_jvm_args=-XX:+UseG1GC --host_jvm_args=-XX:+UseStringDeduplication
Server crashed during startup. Now printing c:\...\jvm.out
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Unrecognized VM option 'UseAllWindowsProcessorGroups'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
PS C:\work> $env:USE_BAZEL_VERSION="8.1.1rc1"
PS C:\work> bazelisk version
Bazelisk version: v1.25.0
Starting local Bazel server (8.1.1rc1) and connecting to it...
Build label: 8.1.1rc1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Fri Feb 21 16:53:38 2025 (1740156818)
Build timestamp: 1740156818
Build timestamp as int: 1740156818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: windows team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants