bazelbuild / bazelbuild/bazel

errorprone seems to hang the build

Open
#25,223 4 comments 0 reactions 1 assignee Claimed by @bigelephant29 View on GitHub
P2 team-Local-Exec team-Rules-Java type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

My builds seem to hang as I go through fixing errorprone bug fixes.
When I hit ctrl-c it dumps out a stack-trace:

```shell
> bazel build //...
INFO: Invocation ID: 4abeb897-dc62-42fd-92aa-9d5fcd99b61e
INFO: Analyzed 7909 targets (0 packages loaded, 0 targets configured).
[3,523 / 8,277] 12 actions, 11 running
Building clients/libclients-tests-test-lib-class.jar (102 source files, 1 source jar); 339s disk-cache, multiplex-worker
Building streams/libstreams-lib-class.jar (682 source files, 1 source jar); 339s disk-cache, multiplex-worker
ERROR: /Users/fzakaria/code/github.com/confluentinc/ce-kafka/clients/BUILD.bazel:330:21: Building clients/libclients-tests-test-lib-class.jar (102 source files, 1 source jar) failed: Worker process returned an unparseable WorkResponse!

Did you try to print something to stdout? Workers aren't allowed to do this, as it breaks the protocol between Bazel and the worker process.

---8<---8<--- Start of response ---8<---8<---
Not UTF-8, printing first 1024 bytes as hex
02 18 03 02 18 09 02 18 0A 02 18 05 02 18 0B 02 |........ ........|
18 0C 02 18 02 02 18 0D 02 18 0E 02 18 06 02 18 |........ ........|
11 02 18 12 02 18 13 02 18 08 02 18 15 02 18 16 |........ ........|
02 18 14 02 18 18 02 18 19 02 18 07 02 18 1B 02 |........ ........|
18 1C 02 18 1D 02 18 0F 02 18 1E AE 08 08 01 12 |........ ........|
A7 08 63 6C 69 65 6E 74 73 2F 73 72 63 2F 74 65 |..client s/src/te|
73 74 2F 6A 61 76 61 2F 6F 72 67 2F 61 70 61 63 |st/java/ org/apac|
68 65 2F 6B 61 66 6B 61 2F 63 6C 69 65 6E 74 73 |he/kafka /clients|
2F 63 6F 6E 73 75 6D 65 72 2F 69 6E 74 65 72 6E |/consume r/intern|
61 6C 73 2F 53 68 61 72 65 43 6F 6E 73 75 6D 65 |als/Shar eConsume|
52 65 71 75 65 73 74 4D 61 6E 61 67 65 72 54 65 |RequestM anagerTe|
73 74 2E 6A 61 76 61 3A 31 32 39 3A 20 65 72 72 |st.java: 129: err|
6F 72 3A 20 5B 44 6F 75 62 6C 65 42 72 61 63 65 |or: [Dou bleBrace|
49 6E 69 74 69 61 6C 69 7A 61 74 69 6F 6E 5D 20 |Initiali zation] |
50 72 65 66 65 72 20 63 6F 6C 6C 65 63 74 69 6F |Prefer c ollectio|
6E 20 66 61 63 74 6F 72 79 20 6D 65 74 68 6F 64 |n factor y method|
73 20 6F 72 20 62 75 69 6C 64 65 72 73 20 74 6F |s or bui lders to|
20 74 68 65 20 64 6F 75 62 6C 65 2D 62 72 61 63 | the dou ble-brac|
65 20 69 6E 69 74 69 61 6C 69 7A 61 74 69 6F 6E |e initia lization|
20 70 61 74 74 65 72 6E 2E 0A 20 20 20 20 70 72 | pattern .. pr|
69 76 61 74 65 20 66 69 6E 61 6C 20 4D 61 70 3C |ivate fi nal Map<|
53 74 72 69 6E 67 2C 20 55 75 69 64 3E 20 74 6F |String, Uuid> to|
70 69 63 49 64 73 20 3D 20 6E 65 77 20 48 61 73 |picIds = new Has|
68 4D 61 70 3C 3E 28 29 20 7B 0A 20 20 20 20 20 |hMap<>() {. |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 20 20 20 20 20 20 20 20 5E 0A 20 20 20 20 | ^. |
28 73 65 65 20 68 74 74 70 73 3A 2F 2F 65 72 72 |(see htt ps://err|
6F 72 70 72 6F 6E 65 2E 69 6E 66 6F 2F 62 75 67 |orprone. info/bug|
70 61 74 74 65 72 6E 2F 44 6F 75 62 6C 65 42 72 |pattern/ DoubleBr|
61 63 65 49 6E 69 74 69 61 6C 69 7A 61 74 69 6F |aceIniti alizatio|
6E 29 0A 20 20 44 69 64 20 79 6F 75 20 6D 65 61 |n). Did you mea|
6E 20 27 70 72 69 76 61 74 65 20 66 69 6E 61 6C |n 'priva te final|
20 4D 61 70 3C 53 74 72 69 6E 67 2C 20 55 75 69 | Map topic Ids = ne|
77 20 48 61 73 68 4D 61 70 3C 3E 28 49 6D 6D 75 |w HashMa p<>(Immu|
74 61 62 6C 65 4D 61 70 2E 6F 66 28 27 3F 0A 63 |tableMap .of('?.c|
6C 69 65 6E 74 73 2F 73 72 63 2F 74 65 73 74 2F |lients/s rc/test/|
6A 61 76 61 2F 6F 72 67 2F 61 70 61 63 68 65 2F |java/org /apache/|
6B 61 66 6B 61 2F 63 6C 69 65 6E 74 73 2F 63 6F |kafka/cl ients/co|
6E 73 75 6D 65 72 2F 69 6E 74 65 72 6E 61 6C 73 |nsumer/i nternals|
2F 53 68 61 72 65 43 6F 6E 73 75 6D 65 52 65 71 |/ShareCo nsumeReq|
75 65 73 74 4D 61 6E 61 67 65 72 54 65 73 74 2E |uestMana gerTest.|
6A 61 76 61 3A 31 33 35 3A 20 65 72 72 6F 72 3A |java:135 : error:|
20 5B 44 6F 75 62 6C 65 42 72 61 63 65 49 6E 69 | [Double BraceIni|
74 69 61 6C 69 7A 61 74 69 6F 6E 5D 20 50 72 65 |tializat ion] Pre|
66 65 72 20 63 6F 6C 6C 65 63 74 69 6F 6E 20 66 |fer coll ection f|
61 63 74 6F 72 79 20 6D 65 74 68 6F 64 73 20 6F |actory m ethods o|
72 20 62 75 69 6C 64 65 72 73 20 74 6F 20 74 68 |r builde rs to th|
65 20 64 6F 75 62 6C 65 2D 62 72 61 63 65 20 69 |e double -brace i|
6E 69 74 69 61 6C 69 7A 61 74 69 6F 6E 20 70 61 |nitializ ation pa|
74 74 65 72 6E 2E 0A 20 20 20 20 70 72 69 76 61 |ttern.. priva|
74 65 20 66 69 6E 61 6C 20 4D 61 70 3C 53 74 72 |te final Map to|
70 69 63 50 61 72 74 69 74 69 6F 6E 43 6F 75 6E |picParti tionCoun|
74 73 20 3D 20 6E 65 77 20 48 61 73 68 4D 61 70 |ts = new HashMap|
3C 3E 28 29 20 7B 0A 20 20 20 20 20 20 20 20 20 |<>() {. |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
20 20 20 20 20 5E 0A 20 20 20 20 28 73 65 65 20 | ^. (see |
68 74 74 70 73 3A 2F 2F 65 72 72 6F 72 70 72 6F |https:// errorpro|
6E 65 2E 69 6E 66 6F 2F 62 75 67 70 61 74 74 65 |ne.info/ bugpatte|
72 6E 2F 44 6F 75 62 6C 65 42 72 61 63 65 49 6E |rn/Doubl eBraceIn|
---8<---8<--- End of response ---8<---8<---

---8<---8<--- Exception details ---8<---8<---
java.io.IOException: Worker process for Javac has died
at com.google.devtools.build.lib.worker.WorkerMultiplexer.getResponse(WorkerMultiplexer.java:329)
at com.google.devtools.build.lib.worker.WorkerProxy.getResponse(WorkerProxy.java:84)
at com.google.devtools.build.lib.worker.WorkerSpawnRunner.executeRequest(WorkerSpawnRunner.java:558)
at com.google.devtools.build.lib.worker.WorkerSpawnRunner.execInWorker(WorkerSpawnRunner.java:414)
at com.google.devtools.build.lib.worker.WorkerSpawnRunner.exec(WorkerSpawnRunner.java:199)
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.java.JavaCompileAction.execute(JavaCompileAction.java:430)
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:862)
at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.computeInternal(ActionExecutionFunction.java:334)
at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:172)
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:461)
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)
---8<---8<--- End of exception details ---8<---8<---

---8<---8<--- Start of log, file at /private/var/tmp/_bazel_fzakaria/ff9ce111b6ab17e6476d607385913f63/bazel-workers/multiplex-worker-113-Javac.log ---8<---8<---
(empty)
---8<---8<--- End of log ---8<---8<---
Use --verbose_failures to see the command lines of failed build steps.
```

Running `bazel shutdown` seems to fix the issue; so it's some weird in memory bug.

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

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

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