bazelbuild/bazel

RepoContentsCache crash

Open

#27329 opened on Oct 17, 2025

View on GitHub
 (4 comments) (1 reaction) (2 assignees)Java (25,384 stars) (4,465 forks)batch import
P2help wantedteam-ExternalDepstype: bug

Description

Description of the bug:

Another command (pid=19909) is running. Waiting for it to complete on the server (server_pid=19966)...
Server terminated abruptly (error code: 14, error message: 'recvmsg:Connection reset by peer', log file: '/private/var/tmp/_bazel_USER/95c35b04bfcb2dcca23aa9d357ad21b5/rules_xcodeproj.noindex/build_output_base/server/jvm.out')

and then

$ cat /private/var/tmp/_bazel_USER/95c35b04bfcb2dcca23aa9d357ad21b5/rules_xcodeproj.noindex/build_output_base/server/jvm.out
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.IllegalStateException
	at com.google.common.base.Preconditions.checkState(Preconditions.java:497)
	at com.google.devtools.build.lib.bazel.repository.cache.RepoContentsCache.releaseSharedLock(RepoContentsCache.java:213)
	at com.google.devtools.build.lib.bazel.BazelRepositoryModule.afterCommand(BazelRepositoryModule.java:687)
	at com.google.devtools.build.lib.runtime.BlazeRuntime.afterCommand(BlazeRuntime.java:734)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:743)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:257)
	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)

We have --repo_contents_cache enabled. We have two output bases, but in this case we also have two builds in the same output base, with a "background" build (19909 in this example) running with --preemptible.

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?

macOS

What is the output of bazel info release?

release 8.4.2

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

Contributor guide