Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemon re-used although --no-daemon requested #417

Open
gabrielfeo opened this issue Mar 23, 2022 · 1 comment
Open

Daemon re-used although --no-daemon requested #417

gabrielfeo opened this issue Mar 23, 2022 · 1 comment

Comments

@gabrielfeo
Copy link

gabrielfeo commented Mar 23, 2022

Running a benchmark with --no-daemon and gradle-args containing --configuration-cache --dry-run causes the daemon to be re-used for some reason. Profiler is helpful enough to report this, but no idea what causes it. I created a sample project with complete logs: gabrielfeo/gradle-profiler-no-daemon-issue-sample

...
* Stopping daemons
Running command /builds/ifood/consumer/mobile/consumer-android/.gradle-home/wrapper/dists/gradle-7.3.3-all/4295vidhdd9hd3gbjyw1xqxpo/gradle-7.3.3/bin/gradle --stop --gradle-user-home /builds/ifood/consumer/mobile/consumer-android/.gradle-home
No Gradle daemons are running.
* Running warm-up build #1
...
BUILD SUCCESSFUL in 58s
Used daemon with pid 1603
...
* Stopping daemons
Running command /builds/ifood/consumer/mobile/consumer-android/.gradle-home/wrapper/dists/gradle-7.3.3-all/4295vidhdd9hd3gbjyw1xqxpo/gradle-7.3.3/bin/gradle --stop --gradle-user-home /builds/ifood/consumer/mobile/consumer-android/.gradle-home
Stopping Daemon(s)
1 Daemon stopped
* Running measured build #1
...
BUILD SUCCESSFUL in 6s
Used daemon with pid 1603
...
* Stopping daemons
Running command /builds/ifood/consumer/mobile/consumer-android/.gradle-home/wrapper/dists/gradle-7.3.3-all/4295vidhdd9hd3gbjyw1xqxpo/gradle-7.3.3/bin/gradle --stop --gradle-user-home /builds/ifood/consumer/mobile/consumer-android/.gradle-home
Stopping Daemon(s)
1 Daemon stopped
* Running measured build #2
...
BUILD SUCCESSFUL in 6s
Used daemon with pid 1603
* Stopping daemons
Running command /builds/ifood/consumer/mobile/consumer-android/.gradle-home/wrapper/dists/gradle-7.3.3-all/4295vidhdd9hd3gbjyw1xqxpo/gradle-7.3.3/bin/gradle --stop --gradle-user-home /builds/ifood/consumer/mobile/consumer-android/.gradle-home
Stopping Daemon(s)
1 Daemon stopped
java.lang.RuntimeException: Gradle daemon was reused but should not be reused.
	at org.gradle.profiler.GradleScenarioInvoker.checkPid(GradleScenarioInvoker.java:195)
	at org.gradle.profiler.GradleScenarioInvoker.run(GradleScenarioInvoker.java:154)
	at org.gradle.profiler.GradleScenarioInvoker.run(GradleScenarioInvoker.java:22)
	at org.gradle.profiler.Main.invoke(Main.java:126)
	at org.gradle.profiler.Main.run(Main.java:86)
	at org.gradle.profiler.Main.main(Main.java:25)

PS: I was benchmarking --configuration-cache with --no-daemon by mistake, I don't see a use case for this. I just thought it was worth reporting.

@kenyee
Copy link

kenyee commented Sep 8, 2022

I hit this as well using latest from master doing AS sync...looks like there used to be a way to turn this polling off:
#63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants