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.2.0rc1 crashes on startup: Unrecoverable Error #22489

Closed
kolloch opened this issue May 22, 2024 · 2 comments
Closed

7.2.0rc1 crashes on startup: Unrecoverable Error #22489

kolloch opened this issue May 22, 2024 · 2 comments
Assignees
Labels
P1 I'll work on this now. (Assignee required) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug

Comments

@kolloch
Copy link

kolloch commented May 22, 2024

Description of the bug:

When I update our internal Bazel repo from 7.1.2 to 7.2.0rc1, I get the following error on startup:

2024/05/22 09:47:04 Downloading https://releases.bazel.build/7.2.0/rc1/bazel-7.2.0rc1-linux-x86_64...
2024/05/22 09:47:04 Skipping basic authentication for releases.bazel.build because no credentials found in /home/peter/.netrc
Downloading: 68 MB out of 68 MB (100%) 
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Computing main repo mapping: 
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'Key{moduleKey=<root>, override=null}' (requested by nodes 'com.google.devtools.build.lib.bazel.bzlmod.BazelModuleResolutionValue$$Lambda/0x00000008004c51e0@f40784e')
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:550)
        at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:414)
        at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(Unknown Source)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
        at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.util.NoSuchElementException
        at java.base/java.util.List.getFirst(Unknown Source)
        at com.google.devtools.build.lib.bazel.bzlmod.ModuleFileFunction.evaluateRootModuleFile(ModuleFileFunction.java:443)
        at com.google.devtools.build.lib.bazel.bzlmod.ModuleFileFunction.computeForRootModule(ModuleFileFunction.java:280)
        at com.google.devtools.build.lib.bazel.bzlmod.ModuleFileFunction.compute(ModuleFileFunction.java:141)
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:461)
        ... 7 more

Which category does this issue belong to?

Core

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

Locally, in this repo, even bazel info crashes.

# MODULE.bazel
module(
    name = "nx0",
    version = "0.1",
)

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# .bazelversion
7.2.0rc1

Which operating system are you running Bazel on?

Ubuntu 22.04.4 LTS (jammy) amd64

What is the output of bazel info release?

release 7.2.0rc1

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.

first bad commit is 298d3d6

Have you found anything relevant by searching the web?

No response

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

I happy to, just let me know!

@github-actions github-actions bot added the team-Core Skyframe, bazel query, BEP, options parsing, bazelrc label May 22, 2024
@kolloch
Copy link
Author

kolloch commented May 22, 2024

Ok, funnily enough, we don't even need that http_archive repo rule :) But maybe it is an interesting edge case and at least the error message could be better.

@fmeum fmeum self-assigned this May 22, 2024
@fmeum fmeum added P1 I'll work on this now. (Assignee required) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. and removed untriaged team-Core Skyframe, bazel query, BEP, options parsing, bazelrc labels May 22, 2024
@fmeum
Copy link
Collaborator

fmeum commented May 22, 2024

@bazel-io fork 7.2.0

iancha1992 pushed a commit to iancha1992/bazel that referenced this issue May 22, 2024
Fixes bazelbuild#22489

Closes bazelbuild#22493.

PiperOrigin-RevId: 636310898
Change-Id: If2fb41fd8d51f15aa1047cb62d55035e81187e41
github-merge-queue bot pushed a commit that referenced this issue May 23, 2024
Fixes #22489

Closes #22493.

PiperOrigin-RevId: 636310898
Change-Id: If2fb41fd8d51f15aa1047cb62d55035e81187e41

Commit
792d17c

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants