IllegalArgumentException in internal Gradle classes

One of my builds just failed with the following stack trace with Gradle 2.11:

Unexpected exception thrown.
org.gradle.messaging.remote.internal.MessageIOException: Could not read message from '/0:0:0:0:0:0:0:1:52698'.
    at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:84)
    at org.gradle.messaging.remote.internal.hub.MessageHub$ConnectionReceive.run(MessageHub.java:235)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException
    at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:71)
    at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:52)
    at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:77)
    ... 6 more
:sulky-junit:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sulky-junit:test'.
> Unable to connect to the child process 'Gradle Test Executor 10'.
  It is likely that the child process have crashed - please find the stack trace in the build log.
  This exception might occur when the build machine is extremely loaded.
  The connection attempt hit a timeout after 120.0 seconds (last known process state: STARTED, running: true).

Unfortunately, I can’t reproduce the problem. Neither can it be related to OutOfMemory as suggested in this topic.

Just wanted to mention it…

The test VM can crash for a number of reasons, most often OOM or someone calling System.exit() :slightly_smiling:

It’s gonna be hard to tell what caused the child process to crash without seeing its logs.

It just happened. Never happened before or after. That’s why I decided to drop the message anyway just to document that something might be fishy… but it could as well just be a random JVM crash.

Argh. Now it did happen again. Not reproducible. While I tested 1.12-rc-1.

I chalk this one up on Murphy and won’t say “never” again. :stuck_out_tongue: