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

7.0.0-pre.20221123.2 and 7.0.0-pre.20221204.2 instacrash #16982

Closed
aaronmondal opened this issue Dec 11, 2022 · 1 comment
Closed

7.0.0-pre.20221123.2 and 7.0.0-pre.20221204.2 instacrash #16982

aaronmondal opened this issue Dec 11, 2022 · 1 comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website team-Rules-Java Issues for Java rules type: bug

Comments

@aaronmondal
Copy link

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

@fmeum
Copy link
Collaborator

fmeum commented Dec 11, 2022

The embedded JDK was updated to 17 in 66c22f4, 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).

@sgowroji sgowroji added team-Rules-Java Issues for Java rules team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged type: bug labels Dec 11, 2022
benjaminp added a commit to benjaminp/bazel that referenced this issue Dec 15, 2022
Pick up the latest JDK 17 bugfixes for remotejdk users.

Fixes bazelbuild#16982.
@Wyverald Wyverald added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website team-Rules-Java Issues for Java rules type: bug
Projects
None yet
Development

No branches or pull requests

5 participants