Skip to content

bazel fetch --configure crash in dev when testing bazel changes #27042

@keith

Description

@keith

Description of the bug:

$ bazel build src:bazel-dev
$ cd /tmp/project
$ path/to/bazel-dev fetch --configure

crashes with:

FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'REPO_DEFINITION:@@bazel_tools' (requested by nodes 'BAZEL_FETCH_ALL:true')
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:552)
        at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:435)
        at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1586)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1394)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1970)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.lang.NullPointerException: The bazel_tools override should never be inspected
        at java.base/java.util.Objects.requireNonNull(Objects.java:246)
        at com.google.devtools.build.lib.bazel.bzlmod.NonRegistryOverride.repoSpec(NonRegistryOverride.java:53)
        at com.google.devtools.build.lib.bazel.repository.RepoDefinitionFunction.checkRepoFromNonRegistryOverrides(RepoDefinitionFunction.java:135)
        at com.google.devtools.build.lib.bazel.repository.RepoDefinitionFunction.compute(RepoDefinitionFunction.java:81)
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:471)
        ... 6 more

I imagine this is a side effect of how things are bundled differently for dev (also repros with src:bazel) but it is sometimes useful to test with this command

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?

No response

What is the output of bazel info release?

906b91b

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?

No response

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

No response

Metadata

Metadata

Labels

P1I'll work on this now. (Assignee required)team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions