MessageIOException: Could not read message from


(Ethan Hall) #1

I’m seeing an issue where while a build is executing there seems to be an exception that gets generated from the client that looks bad but doesn’t effect the build. Here is an example stack trace with some context around it.

:ubiquity:factories:assemble
:ubiquity:factories:build
:ubiquity:ubiquity-backend-war:generate-app-def
:ubiquity:ubiquity-backend-war:warUnexpected exception thrown.
org.gradle.messaging.remote.internal.MessageIOException: Could not read message from ‘/0:0:0:0:0:0:0:1:46717’.
at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:79)
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.NullPointerException
at java.lang.Throwable.setStackTrace(Throwable.java:864)
at org.gradle.messaging.remote.internal.Message$ExceptionPlaceholder.read(Message.java:173)
at org.gradle.messaging.remote.internal.Message$ExceptionReplacingObjectInputStream.resolveObject(Message.java:215)
at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1399)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at org.gradle.messaging.remote.internal.Message.receive(Message.java:57)
at org.gradle.api.internal.tasks.testing.worker.TestEventSerializer$ThrowableSerializer.read(TestEventSerializer.java:94)
at org.gradle.api.internal.tasks.testing.worker.TestEventSerializer$ThrowableSerializer.read(TestEventSerializer.java:92)
at org.gradle.internal.serialize.DefaultSerializerRegistry$TaggedTypeSerializer.read(DefaultSerializerRegistry.java:72)
at org.gradle.api.internal.tasks.testing.worker.TestEventSerializer$1.read(TestEventSerializer.java:52)
at org.gradle.api.internal.tasks.testing.worker.TestEventSerializer$1.read(TestEventSerializer.java:47)
at org.gradle.messaging.remote.internal.hub.MethodInvocationSerializer$MethodInvocationReader.readArguments(MethodInvocationSerializer.java:113)
at org.gradle.messaging.remote.internal.hub.MethodInvocationSerializer$MethodInvocationReader.read(MethodInvocationSerializer.java:108)
at org.gradle.messaging.remote.internal.hub.MethodInvocationSerializer$MethodInvocationReader.read(MethodInvocationSerializer.java:88)
at org.gradle.internal.serialize.kryo.TypeSafeSerializer$1.read(TypeSafeSerializer.java:37)
at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:72)
at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:58)
at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:74)
… 6 more

:rest-impl – Executed 0 tests: 0 succeeded, 0 failed, 0 skipped.
:ubiquity:ubiquity-backend-war:ivyForArchives
:ubiquity:ubiquity-backend-war:thinWarContentManifest
:ubiquity:rest-impl:check

Like I said, this doesn’t cause a build failure but just looks nasty. Any ideas on how to debug what’s causing it?


(Lari Hotari) #2

Hi Ethan,

Gradle test runner does not mark junit test case as failed if exception is encountered missing stack trace was just reported and I created https://issues.gradle.org/browse/GRADLE-3556 for that.

-Lari