[GRADLE-1594] Tooling API spawning 'runaway' daemon? Created: 06/Jun/11 Updated: 10/Feb/17 Resolved: 10/Feb/17 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.0-milestone-3 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Kris De Volder | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 3 |
Description |
When I run some Gradle action/command (doesn't really matter what) from STS (uses the Gradle tooling API milestone-3) it starts an external process (I'm assuming this is a gradle daemon). Sometimes this process gets busy with a very long running operation. If I try to exit Eclipse/STS it won't let me until this operation is finished. It is then very tempting to forcibly kill Eclipse/STS. Unfortunately, when you do that the Daemon is left running and I don't think there's a way for me to shut it down (except kill it using a kill command on in the os commandline) "kill -9 <process-id>" I also tried running "gradle --stop" on the commandline but the process was left running (and it is telling me the Daemon isn't running). |
Comments |
Comment by Kris De Volder [ 06/Jun/11 ] |
I also noticed that, if the process is busy (possibly stuck or hung) for a long time, and you restart Eclipse, trying to execute another operation, you can't because it is (presumbaly) waiting for the stuck daemon to process the command. Specifically, what I tried to do is import the spring-data-mapping. Which got me "stuck". I killed Eclipse. I had to forcibly kill and restart Eclipse and kill the daemon on the commandline to get out of this state. I've also seen similar problems when running multiple instances of Eclipse which I guess are sharing the daemon. What happens is, I am doing some long action in one Eclipse instance and it locks up both instances. Perhaps it isn't a good idea to share daemons between Eclipse instances, or leave them running after Eclipse exited. |
Comment by Adam Murdoch [ 23/Jun/11 ] |
You get the same sort of behaviour when you use the daemon from the command-line. We'll probably change things so that the daemon is not shared, or at the very least, that we don't block waiting for the shared daemon to become available when it is busy doing something. |
Comment by Kris De Volder [ 28/Jun/11 ] |
Perhaps my description wasn't very clear (realize that now I re-read it). And my second comment muddied the waters by distracting attention from the issue I first reported. So let me try to clarify the original issue, which is different from potential issues created by sharing the deamone. With 'runaway' I meant there was seemingly a Daemon process left 'running' which was completely unresponsive and couldn't be stopped except by hard OS 'kill' command. It could not be stopped with the Gradle command to stop the daemon. And it appears, that, if you call the tooling API again, it will spawn a new daemon, because it thinks there isn't one, for some reason. I found myself in a situation where my machine ground to halt and when I went looking why, I found 10 'defunct' deamon processes sitting there. But when I ran the gradle command to stop the daemon, it told me, the daemon was not running... Hence 'runaway daemon'. I think this happened because I killed Eclipse when I got tired of waiting. Then restarted Eclipse. Doing this a few times over a longer period of time, I had accumulated these 'dead daemons'. Anyhow not sure what to do about this, but I think there needs to be mechanisms to control the daemon process. Maybe API needs to be provided for that and its something the IDE needs to do (I'm fine with that, though, I guess I couldn't really guarantee the daemon would be shutdown properly if the IDE crashed). So it would also be good if the daemon has some safety/self-destruct mechanisms to guarantee 'dead/stuck/unused deamons' quietly go away. |
Comment by Adam Murdoch [ 28/Jun/11 ] |
The daemon already has a basic self-destruct mechanism. It seems like this issue is about making that mechanism more robust. I've also added |
Comment by Kris De Volder [ 05/Aug/11 ] |
Indeed, please make it more robust. I find that playing around with the STS Gradle tooling my machine tends to get horribly bogged down. When I go look at what's up I typically find this kind of thing: kdvolder 9119 1 0 11:35 ? 00:02:28 /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Xmx1024m -XX:MaxPermSize=256m -cp /home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jsch-0.1.42.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/slf4j-api-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/logback-core-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jzlib-1.0.7.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-wrapper-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/asm-all-3.3.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/dom4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-core-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-launcher-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jaxen-1.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jcl-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-lang-2.6.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/log4j-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/groovy-all-1.7.10.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-tooling-api-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/ivy-2.2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/plugins:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-httpclient-3.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/ant-launcher-1.8.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-codec-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-ui-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/guava-r08.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jna-posix-1.0.3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-collections-3.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jna-3.2.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/webdavlib-2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-open-api-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-io-1.4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jansi-1.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/logback-classic-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jul-to-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/core-impl:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-cli-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/ant-1.8.2.jar org.gradle.launcher.GradleDaemon -g /home/kdvolder/.gradle kdvolder 11627 1 2 12:56 ? 00:07:30 /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Xmx1024m -XX:MaxPermSize=256m -cp /home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jsch-0.1.42.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/slf4j-api-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-core-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jzlib-1.0.7.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/asm-all-3.3.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/dom4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jaxen-1.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jcl-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-lang-2.6.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/log4j-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/groovy-all-1.7.10.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-wrapper-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-core-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ivy-2.2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/plugins:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-httpclient-3.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-launcher-1.8.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-tooling-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-codec-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/guava-r08.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-posix-1.0.3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-open-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-collections-3.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-ui-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-3.2.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/webdavlib-2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-io-1.4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jansi-1.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-launcher-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-classic-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jul-to-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/core-impl:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-cli-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-1.8.2.jar org.gradle.launcher.GradleDaemon -g /home/kdvolder/.gradle kdvolder 18650 1 0 15:22 ? 00:00:48 /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Xmx1024m -XX:MaxPermSize=256m -cp /home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jsch-0.1.42.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/slf4j-api-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-core-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jzlib-1.0.7.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/asm-all-3.3.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/dom4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jaxen-1.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jcl-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-lang-2.6.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/log4j-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/groovy-all-1.7.10.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-wrapper-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-core-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ivy-2.2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/plugins:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-httpclient-3.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-launcher-1.8.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-tooling-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-codec-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/guava-r08.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-posix-1.0.3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-open-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-collections-3.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-ui-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-3.2.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/webdavlib-2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-io-1.4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jansi-1.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-launcher-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-classic-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jul-to-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/core-impl:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-cli-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-1.8.2.jar org.gradle.launcher.GradleDaemon -g /home/kdvolder/.gradle kdvolder 18822 1 0 15:25 ? 00:00:20 /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Xmx1024m -XX:MaxPermSize=256m -cp /home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jsch-0.1.42.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/slf4j-api-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-core-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jzlib-1.0.7.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/asm-all-3.3.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/dom4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jaxen-1.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jcl-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-lang-2.6.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/log4j-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/groovy-all-1.7.10.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-wrapper-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-core-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ivy-2.2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/plugins:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-httpclient-3.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-launcher-1.8.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-tooling-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-codec-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/guava-r08.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-posix-1.0.3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-open-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-collections-3.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-ui-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-3.2.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/webdavlib-2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-io-1.4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jansi-1.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-launcher-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-classic-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jul-to-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/core-impl:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-cli-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-1.8.2.jar org.gradle.launcher.GradleDaemon -g /home/kdvolder/.gradle kdvolder 18884 1 2 15:28 ? 00:03:01 /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Xmx1024m -XX:MaxPermSize=256m -cp /home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jsch-0.1.42.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/slf4j-api-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-core-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jzlib-1.0.7.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/asm-all-3.3.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/dom4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jaxen-1.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jcl-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-lang-2.6.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/log4j-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/groovy-all-1.7.10.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-wrapper-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-core-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ivy-2.2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/plugins:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-httpclient-3.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-launcher-1.8.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-tooling-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-codec-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/guava-r08.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-posix-1.0.3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-open-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-collections-3.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-ui-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-3.2.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/webdavlib-2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-io-1.4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jansi-1.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-launcher-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-classic-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jul-to-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/core-impl:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-cli-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-1.8.2.jar org.gradle.launcher.GradleDaemon -g /home/kdvolder/.gradle kdvolder 21306 1 1 15:55 ? 00:01:26 /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Xmx1024m -XX:MaxPermSize=256m -cp /home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jsch-0.1.42.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/slf4j-api-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-core-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jzlib-1.0.7.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/asm-all-3.3.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/dom4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jaxen-1.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jcl-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-lang-2.6.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/log4j-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/groovy-all-1.7.10.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-wrapper-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-core-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ivy-2.2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/plugins:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-httpclient-3.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-launcher-1.8.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-tooling-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-codec-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/guava-r08.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-posix-1.0.3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-open-api-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-collections-3.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-ui-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jna-3.2.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/webdavlib-2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-io-1.4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jansi-1.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/gradle-launcher-1.0-milestone-4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/logback-classic-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/jul-to-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/core-impl:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/commons-cli-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-4/lib/ant-1.8.2.jar org.gradle.launcher.GradleDaemon -g /home/kdvolder/.gradle kdvolder 21338 1 1 15:58 ? 00:00:57 /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Xmx1024m -XX:MaxPermSize=256m -cp /home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jsch-0.1.42.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/slf4j-api-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/logback-core-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jzlib-1.0.7.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-wrapper-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/asm-all-3.3.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/dom4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-core-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-launcher-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jaxen-1.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jcl-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-lang-2.6.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/log4j-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/groovy-all-1.7.10.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-tooling-api-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/ivy-2.2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/plugins:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-httpclient-3.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/ant-launcher-1.8.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-codec-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-ui-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/guava-r08.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jna-posix-1.0.3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-collections-3.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jna-3.2.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/webdavlib-2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-open-api-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-io-1.4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jansi-1.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/logback-classic-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jul-to-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/core-impl:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-cli-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/ant-1.8.2.jar org.gradle.launcher.GradleDaemon -g /home/kdvolder/.gradle kdvolder 21727 1 3 16:13 ? 00:02:03 /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Xmx1024m -XX:MaxPermSize=256m -cp /home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jsch-0.1.42.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/slf4j-api-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/logback-core-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jzlib-1.0.7.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-wrapper-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/asm-all-3.3.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/dom4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-core-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-launcher-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jaxen-1.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jcl-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-lang-2.6.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/log4j-over-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/groovy-all-1.7.10.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-tooling-api-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/ivy-2.2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/plugins:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-httpclient-3.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/ant-launcher-1.8.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-codec-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-ui-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/guava-r08.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jna-posix-1.0.3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-collections-3.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jna-3.2.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/webdavlib-2.0.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/gradle-open-api-1.0-milestone-3.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-io-1.4.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jansi-1.2.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/logback-classic-0.9.28.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/jul-to-slf4j-1.6.1.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/core-impl:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/commons-cli-1.2.jar:/home/kdvolder/.gradle/wrapper/dists/gradle-1.0-milestone-3/lib/ant-1.8.2.jar org.gradle.launcher.GradleDaemon -g /home/kdvolder/.gradle When it's reached the point that there are 9 or 10 daemons sitting there, my machine is completely unusable. Since the tooling API provides no mechanisms to manage the daemon processes it spawns, it should really do a much better job of cleaning up after itself. I think that I'd prefer the daemon process spawned for an STS instance to be 'owned' by that instance and to go away when the IDE is closed. I'd also like it to be possible to limit the number of spawned daemon processes to some reasonable number like 1 or 2. It may be useful to have a global limit as well as a per-owner limit. If a new daemon is started above that limit, another one must first be killed. (And why would it be starting so many daemons???). Note: it does look like the daemons eventually commit suicide, but obviously the mechanism falls short of keeping the daemons from consuming all my machine's resources (probably memory more than CPU is the issue) |
Comment by Geertjan Wielenga [ 09/Sep/11 ] |
This is probably also what's causing the problem in the NetBeans plugin, described here: http://blogs.oracle.com/geertjan/entry/netbeans_gradle_integration_problems I'd prefer to not have a Gradle daemon at all, since it starts an external process over which I have no control. I'd rather have a slower build than an external process, in my opinion. |
Comment by Michael Bien [ 12/Sep/11 ] |
+1 an API like this shouldn't start processes. This makes it difficult to use in general. |
Comment by Rajmahendra Hegde [ 17/Oct/11 ] |
Adding to Michael.. as a core tooling this shouls be fixed so soon so many IDEs can start implementing this... i love to see a IDE plugin in both netbeans and eclipse. |
Comment by Adam Murdoch [ 17/Oct/11 ] |
@kris, can you try out a recent snapshot and let us know if you consider the issue fixed? The fixes are on the Gradle side, rather than the tooling API side, so you'll need to use a build that uses a recent snapshot. |
Comment by Kris De Volder [ 17/Oct/11 ] |
Sure, can you tell me what sort of behavior to expect? I.e. how many simultaneous daemons? Is there a limit, is there a time (e.g. timeout and/or parent process exits) when they are supposed to go away etc. I can also just play with it a bit and compare to my previous experience, but it may also help to know what to expect. In any case, I'll give it a try tomorrow. |
Comment by Kris De Volder [ 19/Oct/11 ] |
I played with a little bit. It is hard to say for me whether this is really 'fixed'. I could only do limited testing of this since you are limiting me to use projects that work with M5 snapshot. Most of the projects that I test with, today, only work properly in M3. However here some limited observations: 1) I managed to get two concurrent daemons started. This happened as I was trying to run two concurrent Gradle operations in two separate STS instances. Once the daemons where created they never really went away by themselves. I did wait for some time (30 minutes maybe?). But the daemons just kept sitting around idle. I noticed this "-Dorg.gradle.daemon.idletimeout=10800000" argument in the process. If it means what I think it means... it means the daemon should go away after 3 hours? If so, then it is really pretty much equivalent to 'indefinitely' in practice. The daemon should go away after 10 idle minutes tops. If more than one daemon is concurrently started, you should even consider lowering the limit. Get that second daemon to go away immediately. In my opinion, the negative effect of having these two big processes pushing my machine towards starting to swap, or at least reducing what I have left over for file caches, more than offset the speedup I get on the odd gradle command that I need to execute. 2) fixing the deamon management in the gradle distribution rather than on the API side, in my opinion, is a mistake. All daemons for all versions should be managed together and with something that knows how many daemons have been created, regardless of gradle version. Indeed, a common cause (for me at least) of spawning multiple daemons is that some commands get executed with different versions. The reason why multiple versions get used could be...
Bug 1765 is quite bad, in combination with the poor daemon management because it tends to spawn an extra daemon which then just sits around forever (or at least a very long time). If I had my way, I'd really never want to see more than one daemon sticking around. And even that one daemon, I'd like to go away after a much shorter time than 3 hours. If you must start a second daemon to maintain responsiveness while the first one is busy, fine, but don't then keep both daemons around for 3 hours after that. Also, really, daemons should be managed by something that spans gradle versions in my opinion... because you need to consider how many daemons are already active, regardless of version, to decide how long you want to keep the daemons around in idle state. The problem with an idle daemon is that it is 'expensive' as it puts a constant drain on my resources (memory!) and really doesn't offer much benefit if it isn't being frequently used. (once every 3 hours is not really frequent, and does not warrant paying 1+Gb of memory to speed up the next command by a few seconds or even 10s of seconds). Also, consider that if my machine is under "memory pressure" the idle daemon will mostly be paged out, and it probably will not be that 'fast' the next time I try to call on it anyway. |
Comment by Kris De Volder [ 19/Oct/11 ] |
I also tried to stop daemon with command "gradle --stop". (I still have the two daemons running, now). First time I tried it it printed But when I check "ps -fu kdvolder | grep wrapper" I see that both daemon processes are still there after that. Then I type try "gradle --stop" again and it tells me: But again "ps ..." the processes are both still there. Now... I run another command from STS and I now have 3 daemon processes sitting there. Conclusion: this is probably not yet fixed. PS: I did do something a bit 'nasty'. I deleted the .gradle folder. As I was trying to make the commands take longer and do more work. Maybe that could be what confused the daemons. |
Comment by Kris De Volder [ 19/Oct/11 ] |
The third daemon that just got started, aparantly also isn't running: kdvolder@bun2:~/commandline-dev/gradle-plugins$ gradle --stop Gradle daemon is not running. This is odd, because it just succesfully built a gradle model for my STS. |
Comment by Kris De Volder [ 19/Oct/11 ] |
Some positive news: I tried the following:
=> it looks like the daemon executing this command is immediately terminated. So I am no longer able to get into a situation where I accumulate dead daemons by killing processes that are using the daemon "in midflight". |
Comment by Adam Murdoch [ 03/Nov/11 ] |
@Kris, thanks for this feedback. It's excellent stuff. Given what you've seen, let's leave this issue open. I've raised some other issues based on what you've mentioned:
Then there's:
Our plan is to fix 1890, 1771/1240 and 1765 fairly soon. We're holding off on 1891 for a bit, until the client - daemon protocol stabilises a little. |
Comment by Kris De Volder [ 07/Nov/11 ] |
Sounds good. I also hope you'll consider a more reasonable timeout... 3 hours seems a bit long Another thing worth considering is that my point of view is that of an interactive user who 'owns' the machine he's using. Things may be different if you consider scenarios of running builds on something like a shared build server. |
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:
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. |