bazel
bazel copied to clipboard
7.0.0-pre.20221123.2 and 7.0.0-pre.20221204.2 instacrash
Description of the bug:
The prereleases
7.0.0-pre.20221123.2
7.0.0-pre.20221204.2
instantly crash with error
Server crashed during startup. Now printing /home/aaron/.cache/bazel/_bazel_aaron/57c173f35bd67c0c2e50f3183aeb3e4c/server/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.
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.ExceptionInInitializerError
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.<clinit>(SkyframeExecutor.java:381)
at com.google.devtools.build.lib.skyframe.BazelSkyframeExecutorConstants.newBazelSkyframeExecutorBuilder(BazelSkyframeExecutorConstants.java:62)
at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutorFactory.create(SequencedSkyframeExecutorFactory.java:43)
at com.google.devtools.build.lib.runtime.WorkspaceBuilder.build(WorkspaceBuilder.java:114)
at com.google.devtools.build.lib.runtime.BlazeRuntime.initWorkspace(BlazeRuntime.java:265)
at com.google.devtools.build.lib.runtime.BlazeRuntime.newRuntime(BlazeRuntime.java:1319)
at com.google.devtools.build.lib.runtime.BlazeRuntime.serverMain(BlazeRuntime.java:1027)
at com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:772)
at com.google.devtools.build.lib.bazel.Bazel.main(Bazel.java:93)
Caused by: java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "<parameter1>" is null
at java.base/jdk.internal.platform.cgroupv2.CgroupV2Subsystem.getInstance(Unknown Source)
at java.base/jdk.internal.platform.CgroupSubsystemFactory.create(Unknown Source)
at java.base/jdk.internal.platform.CgroupMetrics.getInstance(Unknown Source)
at java.base/jdk.internal.platform.SystemMetrics.instance(Unknown Source)
at java.base/jdk.internal.platform.Metrics.systemMetrics(Unknown Source)
at java.base/jdk.internal.platform.Container.metrics(Unknown Source)
at jdk.management/com.sun.management.internal.OperatingSystemImpl.<init>(Unknown Source)
at jdk.management/com.sun.management.internal.PlatformMBeanProviderImpl.getOperatingSystemMXBean(Unknown Source)
at jdk.management/com.sun.management.internal.PlatformMBeanProviderImpl$3.nameToMBeanMap(Unknown Source)
at java.management/sun.management.spi.PlatformMBeanProvider$PlatformComponent.getMBeans(Unknown Source)
at java.management/java.lang.management.ManagementFactory.getPlatformMXBean(Unknown Source)
at java.management/java.lang.management.ManagementFactory.getOperatingSystemMXBean(Unknown Source)
at com.google.devtools.build.lib.util.ResourceUsage.<clinit>(ResourceUsage.java:42)
... 9 more
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I used bazelisk with an empty .bazelrc and .bazelversion set to one of the above mentioned ones. Invoking bazel --version works, but bazel info and any other command that start the server, like build/run commands instantly crash.
Versions before that work fine.
Which operating system are you running Bazel on?
Gentoo X86_64 with clang profile, Kernel 6.0.0
What is the output of bazel info release?
Unobtainable. Instant crash.
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 master; git rev-parse HEAD ?
No response
Have you found anything relevant by searching the web?
Only this bug from a few years ago: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8287073 .
I'm surprised the error message mentions JDK 13. Maybe this is too old? My system JDK is 17 but as far as I understand Bazel uses a bundled JDK. The error also mentions CGroups. Maybe some new kernel settings are required? Seems strange though, as my setup works fine with docker and all previous Bazel releases.
Any other information, logs, or outputs that you want to share?
No response
The embedded JDK was updated to 17 in https://github.com/bazelbuild/bazel/commit/66c22f46618b45b55b1b7778e53f1c33802ec041, but isn't on 17.0.5 yet, which according to https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8287073 has the fix.
https://github.com/bazelbuild/bazel/pull/16816/files is already approved, but doesn't seem to update all architectures to 17.0.5 (but all the common ones).