Gradle 2.14 daemon doesn't work with IBM Java 8

issue-resolved
gradle-3500

(Thomas Pohl) #1

To reproduce this:

set JAVA_HOME on a linux environment to an IBM JDK8:

create an java library project
`gradle init --type java-library

add jvm args to force using the daemon
`echo “org.gradle.jvmargs=-Xmx1g” > gradle.properties

run the build
` ./gradlew build

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.

FAILURE: Build failed with an exception.

* What went wrong:
Timeout waiting to connect to the Gradle daemon.
Daemon uid: 36193a98-4011-4858-812c-6ada019ab9bd with diagnostics:
Daemon pid: 4758
  log file: /.gradle/daemon/2.14/daemon-4758.out.log
----- Last  20 lines from daemon log file - daemon-4758.out.log -----
15:41:12.810 [DEBUG] [org.gradle.launcher.daemon.server.DomainRegistryUpdater] Removing our presence to clients, eg. removing this address from the registry: [e72b76b8-a0be-4cd8-9392-977a43999c99 port:43450, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]]
15:41:12.811 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Removing daemon address: [e72b76b8-a0be-4cd8-9392-977a43999c99 port:43450, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]]
15:41:12.811 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
15:41:12.811 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
15:41:12.816 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
15:41:12.818 [DEBUG] [org.gradle.launcher.daemon.server.DomainRegistryUpdater] Address removed from registry.
15:41:12.825 [ERROR] [system.err] 
15:41:12.825 [ERROR] [system.err] FAILURE: Build failed with an exception.
15:41:12.826 [ERROR] [system.err] 
15:41:12.826 [ERROR] [system.err] * What went wrong:
15:41:12.826 [ERROR] [system.err] object is not an instance of declaring class
15:41:12.827 [ERROR] [system.err] 
15:41:12.827 [ERROR] [system.err] * Try:
15:41:12.827 [ERROR] [system.err] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
15:41:12.829 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Removing daemon address: [e72b76b8-a0be-4cd8-9392-977a43999c99 port:43450, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]]
15:41:12.830 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
15:41:12.830 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process. I was unable to read on which port the owner listens for lock access requests.
Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.
15:41:13.031 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
15:41:13.033 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
----- End of the daemon log -----

Gradle Version: 2.14
Operating System: Ubuntu 14.04
Is this a regression? No

Another option is to just start the build with --daemon and this will result in a long loop “Starting the Daemon” that finally times out.

I could reproduce this on JDK 8 SR1 and SR3. Any help to further investigate this would be highly appreciated.


(Eric Wendelin) #2

Thank you for the report, Thomas.

I’ve filed GRADLE-3500 for us to pursue shortly.

Cheers,
Eric


(Gary Hale) #3

I’ve found the problem here and implemented a fix for 3.0.


(Thomas Pohl) #4

Thank you very much Gary!

Is there a chance to get a fix for 2.14?
Thomas


(Gary Hale) #5

Sorry, no, it didn’t make it in to 2.14.1.