Skip to content

internal error when using apple_support module #23111

@laurentlb

Description

@laurentlb

Description of the bug:

Repro:

$ cat BUILD
cc_binary(
  name = "cc",
  srcs = ["main.cc"],
)

$ cat MODULE.bazel
bazel_dep(name = "apple_support", version = "1.16.0", repo_name = "build_bazel_apple_support")

$ bazel info release
release 7.2.1


$ bazel build :cc
INFO: Invocation ID: a0fd3096-62f7-4866-813a-0507f46964e2
INFO: Analyzed target //:cc (84 packages loaded, 441 targets configured).
[1 / 1] checking cached actions
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'ActionLookupData0{actionLookupKey=ConfiguredTargetKey{label=//:cc, config=BuildConfigurationKey[c790c51cd204efcfc5fd8a11d0eb60ca464a606489367032bb6bb067b47d73fd]}, actionIndex=0}' (requested by nodes 'ActionLookupData2{actionLookupKey=ConfiguredTargetKey{label=//:cc, config=BuildConfigurationKey[c790c51cd204efcfc5fd8a11d0eb60ca464a606489367032bb6bb067b47d73fd]}, actionIndex=2}')
	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$RunnableExecuteAction.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.lang.IllegalArgumentException: com.google.devtools.build.lib.rules.apple.DottedVersion$InvalidDottedVersionException: Dotted version components must all start with the form \d+([a-z0-9]*?)?(\d+)? but got 'None'
	at com.google.devtools.build.lib.rules.apple.DottedVersion.fromStringUnchecked(DottedVersion.java:180)
	at com.google.devtools.build.lib.exec.local.XcodeLocalEnvProvider.rewriteLocalEnv(XcodeLocalEnvProvider.java:98)
	at com.google.devtools.build.lib.sandbox.DarwinSandboxedSpawnRunner.prepareSpawn(DarwinSandboxedSpawnRunner.java:218)
	at com.google.devtools.build.lib.sandbox.AbstractSandboxSpawnRunner.exec(AbstractSandboxSpawnRunner.java:111)
	at com.google.devtools.build.lib.sandbox.SandboxModule$SandboxFallbackSpawnRunner.exec(SandboxModule.java:474)
	at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:158)
	at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:118)
	at com.google.devtools.build.lib.exec.SpawnStrategyResolver.exec(SpawnStrategyResolver.java:45)
	at com.google.devtools.build.lib.rules.cpp.CppCompileAction.execute(CppCompileAction.java:1402)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.executeAction(SkyframeActionExecutor.java:1159)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:1076)
	at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:165)
	at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:94)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:573)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:859)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.computeInternal(ActionExecutionFunction.java:333)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:171)
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:461)
	... 7 more
Caused by: com.google.devtools.build.lib.rules.apple.DottedVersion$InvalidDottedVersionException: Dotted version components must all start with the form \d+([a-z0-9]*?)?(\d+)? but got 'None'
	at com.google.devtools.build.lib.rules.apple.DottedVersion.fromString(DottedVersion.java:202)
	at com.google.devtools.build.lib.rules.apple.DottedVersion.fromStringUnchecked(DottedVersion.java:178)
	... 24 more

The line in the MODULE file is copied from https://github.com/bazelbuild/apple_support/releases/tag/1.16.0. I report the bug against Bazel itself because it crashes with an internal error.

Which category does this issue belong to?

C++ Rules

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?

MacOS

What is the output of bazel info release?

7.2.1

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

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

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions