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

bazel info crashes due to Bzlmod errors #24671

Closed
fmeum opened this issue Dec 12, 2024 · 3 comments
Closed

bazel info crashes due to Bzlmod errors #24671

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

Comments

@fmeum
Copy link
Collaborator

fmeum commented Dec 12, 2024

Description of the bug:

bazel info doesn't properly handle errors encountered while computing the main repo mapping required to load the Starlark exec transition while injecting the precomputed baseline config.

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.

USE_BAZEL_VERSION=last_green bazel info --registry=foobarbaz

Starting local Bazel server (no_version) and connecting to it...
INFO: Invocation ID: 08cc1fa4-e410-4558-8875-2d04b9a75d4d
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.NullPointerException: Cannot invoke "java.util.Optional.orElse(Object)" because the return value of "com.google.devtools.build.lib.analysis.config.StarlarkExecTransitionLoader.loadStarlarkExecTransition(com.google.devtools.build.lib.analysis.config.BuildOptions, com.google.devtools.build.lib.analysis.config.StarlarkExecTransitionLoader$BzlFileLoader)" is null
	at com.google.devtools.build.lib.skyframe.SkyframeExecutor.getStarlarkExecTransition(SkyframeExecutor.java:2096)
	at com.google.devtools.build.lib.skyframe.SkyframeExecutor.adjustForExec(SkyframeExecutor.java:1431)
	at com.google.devtools.build.lib.skyframe.SkyframeExecutor.setBaselineConfiguration(SkyframeExecutor.java:1424)
	at com.google.devtools.build.lib.runtime.commands.InfoCommand.lambda$exec$0(InfoCommand.java:156)
	at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:186)
	at com.google.devtools.build.lib.runtime.commands.InfoCommand.exec(InfoCommand.java:219)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:697)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:253)
	at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:607)
	at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$0(GrpcServerImpl.java:677)
	at io.grpc.Context$1.run(Context.java:566)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

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

@fmeum
Copy link
Collaborator Author

fmeum commented Dec 12, 2024

@meteorcloudy @susinmotion

@iancha1992 iancha1992 added the team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. label Dec 12, 2024
@meteorcloudy
Copy link
Member

Is this only at HEAD or also in 8.0?

@fmeum
Copy link
Collaborator Author

fmeum commented Dec 13, 2024

Only at HEAD, I think that 37d733f causes this.

katre added a commit to katre/bazel that referenced this issue Jan 7, 2025
@katre katre self-assigned this Jan 7, 2025
@katre katre added P1 I'll work on this now. (Assignee required) and removed untriaged labels Jan 7, 2025
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.

6 participants