[BUG] Gradle daemon gone crazy

Hello,

I’m working on a project that is not that big for now. I’ve chosed gradle as my build tool – I do really like it very much,

However today it started acting like crazy… It freezing dying and hogging my CPU for good. On ANY task!

e.g.:

$ gradle tasks
Starting a Gradle Daemon, 2 busy and 3 stopped Daemons could not be reused, use --status for details

Configuring > 4/12 projects > :modulename1 > :

$ gradle --version


Gradle 3.4

Build time: 2017-02-20 14:49:26 UTC
Revision: 73f32d68824582945f5ac1810600e8d87794c3d4

Groovy: 2.4.7
Ant: Apache Ant™ version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_121 (Oracle Corporation 25.121-b13)
OS: Linux 4.4.0-21-generic amd64

–debug ends up with:

21:29:03.043 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :DataAccess - Registering model element ‘tasks.jarForTunneling’ (hidden = false)
21:29:03.051 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :DataAccess - Registering model element ‘tasks.jarForDataAccess’ (hidden = false)
21:29:03.072 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :DataAccess - Registering model element ‘tasks.warForConfigurator’ (hidden = false)
21:29:03.229 [DEBUG] [org.gradle.model.internal.registry.DefaultModelRegistry] Project :DataAccess - Registering model element ‘tasks.warForAuthenticator’ (hidden = false)
21:29:08.848 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 16682766336, Free: 2276675584}
21:29:08.848 [DEBUG] [org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 16682766336, Free: 2276675584}
21:29:08.848 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 954728448, Committed: 954728448}
21:29:12.266 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
21:29:12.266 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
21:29:12.266 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
21:29:12.267 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
21:29:12.267 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
21:29:12.267 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
21:29:12.267 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
21:29:14.486 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 16682766336, Free: 2029236224}
21:29:14.486 [DEBUG] [org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 16682766336, Free: 2029236224}
21:29:14.486 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 954728448, Committed: 899678208}
21:29:17.376 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 16682766336, Free: 2028650496}
21:29:17.376 [DEBUG] [org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 16682766336, Free: 2028650496}
21:29:17.376 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 954728448, Committed: 899678208}
21:29:22.071 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
21:29:22.071 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
21:29:22.071 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
21:29:22.071 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
21:29:22.071 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
21:29:22.072 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
21:29:22.072 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
21:29:23.708 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 16682766336, Free: 2027110400}
21:29:23.708 [DEBUG] [org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 16682766336, Free: 2027110400}
21:29:23.708 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 954728448, Committed: 899678208}
21:29:32.024 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running

Configuring > 4/12 projects > : > :
21:30:25.895 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Forwarding input to daemon: ‘\n’
21:30:25.896 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 18: dispatching class org.gradle.launcher.daemon.protocol.ForwardInput
Configuring > 4/12 projects > : > :
21:30:27.188 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Forwarding input to daemon: ‘\n’
21:30:27.189 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 18: dispatching class org.gradle.launcher.daemon.protocol.ForwardInput
21:30:08.407 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 16682766336, Free: 2027892736}
Configuring > 4/12 projects > : > :

If anyone responds within an hour or so I can give temporary teamviewer access to play arround and get whatever possible debug info one would need.

Okay, found the cause… I had defined

jar {
//…
with jar
}

custom task body. Commented it out and gradle seems to be back to normal.

A notification “do you really want to shoot your own foot?” would be nice still… :slight_smile:

1 Like