Travis and EOF errors in Gradle


(Schalk Cronjé) #1

I am only seeing this at the moment with the Travis builds for GradleTest. I’ve turned on debug for the test task in one of the builds and the console output can be seen at https://travis-ci.org/ysb33r/gradleTest/builds/143713900.

Most significantly I’m seeing

14:38:36.862 [DEBUG] [org.gradle.internal.remote.internal.inet.SocketConnection] Discarding EOFException: java.io.EOFException
14:38:36.865 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'Gradle Test Executor 2' finished with exit value 137 (state: FAILED)
14:38:36.877 [DEBUG] [TestEventLogger] 

and stuff like

        Caused by:        org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle installation '/home/travis/.gradle/wrapper/dists/gradle-2.14-all/dmmpvfacc1g089abcvm42kj40/gradle-2.14'.            
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:55)            

at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)            
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)           
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)            
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)            
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)            
at org.gradle.tooling.internal.consumer.DefaultBuildLauncher.run(DefaultBuildLauncher.java:77)           
 at org.gradle.testkit.runner.internal.ToolingApiGradleExecutor.run(ToolingApiGradleExecutor.java:100)           
 ... 3 more            
Caused by: org.gradle.launcher.daemon.client.DaemonDisappearedException: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

I’m wondering is a Gradle dev could shed some light on this before I go off to bug the Travis folks


(Tunç Ikikardes) #2

I had exactly the same problem on a build (test) for a simple Android app. My system was a VM with 16.04 Ubuntu. The error used to come from different test cases, in a non-deterministic order. For some, from time-to-time for others over and over again…
After a long search, it turned to be that my VM’s 1GB RAM was simply not enough. After we increased it to 3GB, the problem disappeared completely. So please check your available memory, it might (and most probably will) be the reason.