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(
    at org.gradle.messaging.remote.internal.hub.MessageHub$
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(
    at org.gradle.internal.concurrent.StoppableExecutorImpl$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.IllegalArgumentException
    at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$
    at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$
    at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(
    ... 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: