bazelbuild / bazelbuild/bazel

RepoContentsCache crash

Open
#27,329 4 comments 1 reaction 2 assignees Assigned to @Wyverald View on GitHub
help wanted P2 team-ExternalDeps type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

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` ?

```text

```

### 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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.