I’m running my build with the --no-daemon command line option but a daemon process seems to start anyway and doesn’t quit at the end of the build.
$ ./gradlew --no-daemon -Penv=test clean war
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/1.9/userguide/gradle_daemon.html.
.. snip
Running
./gradlew --stop
says no daemons are running but I can see the process running:
Being OS specific makes it harder to track something like this down. None of the developers are using FreeBSD and we don’t have any CI coverage for it.
The daemon log might provide some insight. Would you mind providing it?
Unless you’ve set GRADLE_USER_HOME, it will be in ~/.gradle/daemon/1.9 and the name will have the pid in it.
2014-01-27 05:35:34
Full thread dump OpenJDK 64-Bit Server VM (23.21-b01 mixed mode):
"Attach Listener" daemon prio=5 tid=0x00000008b246e000 nid=0x8a7169800 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"File lock request listener" prio=5 tid=0x00000008a7324800 nid=0x8a716a400 runnable [0x00007ffffe6e8000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
- locked <0x000000082715b398> (a java.net.PlainDatagramSocketImpl)
at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:145)
- locked <0x000000082715b398> (a java.net.PlainDatagramSocketImpl)
at java.net.DatagramSocket.receive(DatagramSocket.java:786)
- locked <0x000000082691cbc0> (a java.net.DatagramPacket)
- locked <0x0000000826b86d68> (a java.net.DatagramSocket)
at org.gradle.cache.internal.FileLockCommunicator.receive(FileLockCommunicator.java:60)
at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler$1.doRun(DefaultFileLockContentionHandler.java:66)
at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler$1.run(DefaultFileLockContentionHandler.java:53)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
"Incoming local TCP Connector on port 26883" prio=5 tid=0x000000080115b000 nid=0x8010fbc00 runnable [0x00007ffffeaec000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:241)
- locked <0x000000082715af18> (a java.lang.Object)
at org.gradle.messaging.remote.internal.inet.TcpIncomingConnector$Receiver.run(TcpIncomingConnector.java:110)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
"Service Thread" daemon prio=5 tid=0x0000000801156800 nid=0x801047400 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" daemon prio=5 tid=0x0000000801155800 nid=0x801046800 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" daemon prio=5 tid=0x0000000801155000 nid=0x801045c00 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=5 tid=0x0000000801154000 nid=0x801045000 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=5 tid=0x0000000801153800 nid=0x801043c00 in Object.wait() [0x00007fffff0f2000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000826852050> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
- locked <0x0000000826852050> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:189)
"Reference Handler" daemon prio=5 tid=0x0000000801152800 nid=0x801043000 in Object.wait() [0x00007fffff1f3000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000008268f6ff8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
- locked <0x00000008268f6ff8> (a java.lang.ref.Reference$Lock)
"main" prio=5 tid=0x0000000801152000 nid=0x801007800 waiting on condition [0x00007fffffbfc000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for
<0x000000082715b2d0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2082)
at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1468)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl.stop(DefaultExecutorFactory.java:93)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl.stop(DefaultExecutorFactory.java:83)
at org.gradle.messaging.remote.internal.inet.TcpIncomingConnector$1.stop(TcpIncomingConnector.java:88)
at org.gradle.internal.CompositeStoppable.stop(CompositeStoppable.java:122)
at org.gradle.launcher.daemon.server.DaemonTcpServerConnector.stop(DaemonTcpServerConnector.java:87)
at org.gradle.internal.CompositeStoppable.stop(CompositeStoppable.java:122)
at org.gradle.launcher.daemon.server.Daemon.stop(Daemon.java:164)
at org.gradle.launcher.daemon.bootstrap.DaemonMain.doAction(DaemonMain.java:120)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.daemon.bootstrap.DaemonMain.main(DaemonMain.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.daemon.bootstrap.GradleDaemon.main(GradleDaemon.java:22)
"VM Thread" prio=5 tid=0x000000080128b800 nid=0x801042400 runnable
"GC task thread#0 (ParallelGC)" prio=5 tid=0x0000000801285800 nid=0x80103bc00 runnable
"GC task thread#1 (ParallelGC)" prio=5 tid=0x0000000801286800 nid=0x80103c800 runnable
"GC task thread#2 (ParallelGC)" prio=5 tid=0x0000000801287000 nid=0x80103d400 runnable
"GC task thread#3 (ParallelGC)" prio=5 tid=0x0000000801287800 nid=0x80103e000 runnable
"GC task thread#4 (ParallelGC)" prio=5 tid=0x0000000801288000 nid=0x80103ec00 runnable
"GC task thread#5 (ParallelGC)" prio=5 tid=0x0000000801289000 nid=0x80103f800 runnable
"GC task thread#6 (ParallelGC)" prio=5 tid=0x0000000801289800 nid=0x801040400 runnable
"GC task thread#7 (ParallelGC)" prio=5 tid=0x000000080128a000 nid=0x801041000 runnable
"VM Periodic Task Thread" prio=5 tid=0x000000080128c000 nid=0x801048000 waiting on condition
JNI global references: 281