Skip to content

Bazel crash during toolchain resolution #28019

@dzbarsky

Description

@dzbarsky

Description of the bug:

FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'ToolchainContextKey{configurationKey=BuildConfigurationKey[5894a7a21ed2b54b0aece2c526dccb30f26db11cae1e55e3a06e974b455b1465], toolchainTypes=[ToolchainTypeRequirement[toolchainType=@@tar.bzl++toolchains+bsd_tar_toolchains//:resolved_toolchain, mandatory=false, ignoreIfInvalid=true]], execConstraintLabels=[], forceExecutionPlatform=Optional.empty, debugTarget=false}' (requested by nodes 'ConfiguredTargetKey{label=//cases/uv-deps-650/crossbuild:app_amd64_layers_listing, config=BuildConfigurationKey[5894a7a21ed2b54b0aece2c526dccb30f26db11cae1e55e3a06e974b455b1465]}', 'ConfiguredTargetKey{label=//cases/uv-deps-650/crossbuild:app_arm64_layers_listing, config=BuildConfigurationKey[5894a7a21ed2b54b0aece2c526dccb30f26db11cae1e55e3a06e974b455b1465]}')
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:547)
	at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:435)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask$InterruptibleTask.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.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Optional.ifPresent(java.util.function.Consumer)" because "toolchainTypeInfo" is null
	at com.google.devtools.build.lib.skyframe.toolchains.ToolchainTypeLookupUtil.resolveToolchainTypes(ToolchainTypeLookupUtil.java:74)
	at com.google.devtools.build.lib.skyframe.toolchains.ToolchainResolutionFunction.loadToolchainTypeInfos(ToolchainResolutionFunction.java:172)
	at com.google.devtools.build.lib.skyframe.toolchains.ToolchainResolutionFunction.compute(ToolchainResolutionFunction.java:106)
	at com.google.devtools.build.lib.skyframe.toolchains.ToolchainResolutionFunction.compute(ToolchainResolutionFunction.java:61)
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:467)

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.

  1. pull down repro bazel crash aspect-build/rules_py#756
  2. cd e2e && bazel test //... -k

Which operating system are you running Bazel on?

Linux, Mac

What is the output of bazel info release?

8.5.0

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?

cc @fmeum :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions