-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Description of the bug:
When java_binaries are run as part of the build, warnings are emitted on large windows servers. This is most easy to replicate using rules_jvm_external and some maven dependencies:
INFO: From Creating compile jar for @@rules_jvm_external++maven+maven//:org_eclipse_platform_org_eclipse_equinox_http_service_api:
OpenJDK 64-Bit Server VM warning: The Windows job object has enabled multiple processor groups (2) but the UseAllWindowsProcessorGroups flag is off. Some processors might not be used.
INFO: From Stamping the manifest of @@rules_jvm_external++maven+maven//:org_eclipse_platform_org_eclipse_sirius_ui:
OpenJDK 64-Bit Server VM warning: The Windows job object has enabled multiple processor groups (2) but the UseAllWindowsProcessorGroups flag is off. Some processors might not be used.
These particular rules are defined as java_binary: https://github.com/bazel-contrib/rules_jvm_external/blob/ff03b5759d01c22e16585f2acd1f063d871b9dad/private/tools/java/com/github/bazelbuild/rules_jvm_external/jar/BUILD#L5
Could java_binary add these two options to jvm_args in the launcher by default on Windows? -XX:+IgnoreUnrecognizedVMOptions -XX:+UseAllWindowsProcessorGroups
Or is there some other way to define default jvm args for all java rules?
I can wrap java_binary for my own purposes but cannot do so in all the rulesets (mainly rules_jvm_external) that defines their own java_binaries.
Tried, does not help:
common --repo_env=COURSIER_OPTS=-XX:+UseAllWindowsProcessorGroups
common --repo_env=JDK_JAVA_OPTIONS=-XX:+UseAllWindowsProcessorGroups
common --repo_env=_JAVA_OPTIONS=-XX:+UseAllWindowsProcessorGroups
common --action_env=JDK_JAVA_OPTIONS=-XX:+UseAllWindowsProcessorGroups
common --action_env=_JAVA_OPTIONS=-XX:+UseAllWindowsProcessorGroups
Note: not sure if this should be here or rules_java. Since the code is here, I have raised the issue here.
Which category does this issue belong to?
Java Rules
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
What is the output of bazel info release?
8.4.1
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 ?
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
Any other information, logs, or outputs that you want to share?
No response