NullPointerException with gradle 3.0 on solaris

issue-acknowledged
gradle-3539

(jim.gish) #1
bash-3.2$ gradle --status -i -S
Initialized native services in: /scratch/java_re/.gradle/native

FAILURE: Build failed with an exception.

* What went wrong:
java.lang.NullPointerException (no error message)

* Try:
Run with --debug option to get more log output.

* Exception is:
java.lang.NullPointerException
        at org.gradle.launcher.daemon.client.ReportDaemonStatusClient.listAll(ReportDaemonStatusClient.java:73)
        at org.gradle.launcher.cli.ReportDaemonStatusAction.run(ReportDaemonStatusAction.java:30)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:244)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:217)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:33)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:210)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:174)
        at org.gradle.launcher.Main.doAction(Main.java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)

Also gradle clean build --
java.lang.NullPointerException
	at org.gradle.launcher.daemon.client.DefaultDaemonConnector$CleanupOnStaleAddress.maybeStaleAddress(DefaultDaemonConnector.java:231)
	at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connectToDaemon(DefaultDaemonConnector.java:211)
	at org.gradle.launcher.daemon.client.DefaultDaemonConnector.findConnection(DefaultDaemonConnector.java:151)
	at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:106)
	at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:122)
	at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:80)
	at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
	at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
	at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:244)
	at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:217)
	at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:33)
	at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
	at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
	at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
	at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:210)
	at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:174)
	at org.gradle.launcher.Main.doAction(Main.java:33)
	at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
	at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:23)

Gradle Version:

Gradle 3.0
Build time: 2016-08-15 13:15:01 UTC
Revision: ad76ba00f59ecb287bd3c037bd25fc3df13ca558

Groovy: 2.4.7
Ant: Apache Ant™ version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_101 (Oracle Corporation 25.101-b13)

Operating System: OS:
SunOS 5.10 sparcv9
Is this a regression? If yes, which version of Gradle do you know it last worked for?
2.12


(Eric Wendelin) #2

Hi Jim,

A couple initial questions that would help me address this:

  • Is this failure consistent or sporadic on Gradle 3.0?
  • Are you able to reproduce this failure on a different OS? (ok if you aren’t able to test that, just curious if this is Solaris-specific)
  • Does this same failure occur on Gradle 2.14.1?

Cheers,
Eric


(jim.gish) #3

Hi Eric,

It appears to be Solaris-specific. I haven’t seen it on Linux, Windows or Mac.

It is reproduceable simply by issuing the gradle --stop or gradle --status commands (at least that one NPE). Also, I noticed that if you are (accidentally) in a directory without a build.gradle or settings.gradle, you can also get it.

We jumped from 2.12 to 3.0, so I don’t know about 2.14. Also, I never personally tried this on the solaris box until this problem arose, and I’m sure I would have heard about if it had been a problem.


(Eric Wendelin) #4

Thanks for the additional info, Jim.

I have raised https://issues.gradle.org/browse/GRADLE-3539 for us to look into soon. It seems like the Gradle Daemon isn’t really usable on Solaris until we fix this.