[GRADLE-1753] Repeated EOFException during comunication with daemon Created: 19/Aug/11  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-4
Fix Version/s: None

Type: Bug
Reporter: gabriele garuglieri Assignee: Unassigned
Resolution: Won't Fix Votes: 0


 Description   

Some times it looks there's a race condition comunicating with the daemon that cause the following repeated exception and termination of the daemon itself:

:testReading Object
java.io.EOFException
	at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
	at org.gradle.foundation.ipc.basic.ObjectSocketWrapper.readObject(ObjectSocketWrapper.java:53)
	at org.gradle.foundation.ipc.basic.Server.processCommunications(Server.java:199)
	at org.gradle.foundation.ipc.basic.Server.listenForConnections(Server.java:166)
	at org.gradle.foundation.ipc.basic.Server.access$000(Server.java:33)
	at org.gradle.foundation.ipc.basic.Server$1.run(Server.java:116)
	at java.lang.Thread.run(Thread.java:662)

Some times, but not always, those exceptions are followed by NPE:

java.lang.NullPointerException
	at org.gradle.logging.internal.OutputEventRenderer.onOutput(OutputEventRenderer.java:157)
	at org.gradle.launcher.DaemonClient.run(DaemonClient.java:96)
	at org.gradle.launcher.DaemonClient.execute(DaemonClient.java:79)
	at org.gradle.launcher.DaemonBuildAction.run(DaemonBuildAction.java:45)
	at org.gradle.launcher.CommandLineActionFactory$ActionAdapter.execute(CommandLineActionFactory.java:199)
	at org.gradle.launcher.CommandLineActionFactory$ActionAdapter.execute(CommandLineActionFactory.java:191)
	at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)
	at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:219)
	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:203)
	at org.gradle.launcher.Main.execute(Main.java:55)
	at org.gradle.launcher.Main.main(Main.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:49)
	at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:31)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:24)

I talk about race condition because the behavior is different depending on how the daemon is run (in order of increasing frequency of reproduction):

#running builds from within eclipse with STS Gradle tooling, i've never been able to reproduce
#running builds from command line or from gradle gui with -d, very difficult to reproduce
#running builds from command line, it happens but not very often
#running builds from gradle gui it happens very often

To reproduce i simply used the check task from the application sample that comes with distribution.



 Comments   
Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 12:03:29 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.