--no-daemon works fine in 2.12 but does nothing in 2.13


(Ben Spiller) #1

When I start gradle 2.13 with --no-daemon, gradle seems to be ignoring the option and starting the daemon anyway:

16:12:07.941 [DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Native-platform posix files is not available. Continuing with fallback.
16:12:07.958 [DEBUG] [org.gradle.internal.nativeintegration.filesystem.services.FileSystemServices] Using JDK 7 file service org.gradle.internal.nativeintegration.filesystem.jdk7.WindowsJdk7Symlink
16:12:08.466 [LIFECYCLE] [org.gradle.launcher.daemon.client.SingleUseDaemonClient] To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.13/userguide/gradle_daemon.html.
16:12:08.501 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonStarter] Using daemon args: [c:\foo\jvm\jvm\bin\java.exe, -XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=windows-1252, -Djava.io.tmpdir=c:\bar\output-amd64-win-release\BUILD_WORK, -Duser.country=GB, -Duser.language=en, -Duser.variant, -cp, C:\gradle\2.13\lib\gradle-launcher-2.13.jar]
16:12:08.506 [INFO] [org.gradle.launcher.daemon.client.DefaultDaemonStarter] Starting daemon process: workingDir = c:\bar\output-amd64-win-release\BUILD_WORK\gradle-cache\daemon\2.13, daemonArgs: [c:\foo\jvm\jvm\bin\java.exe, -XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=windows-1252, -Djava.io.tmpdir=c:\bar\output-amd64-win-release\BUILD_WORK, -Duser.country=GB, -Duser.language=en, -Duser.variant, -cp, C:\gradle\2.13\lib\gradle-launcher-2.13.jar, org.gradle.launcher.daemon.bootstrap.GradleDaemon, 2.13]
16:12:08.527 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process ‘Gradle build daemon’. Working directory: c:\bar\output-amd64-win-release\BUILD_WORK\gradle-cache\daemon\2.13 Command: c:\foo\jvm\jvm\bin\java.exe -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=windows-1252 -Djava.io.tmpdir=c:\bar\output-amd64-win-release\BUILD_WORK -Duser.country=GB -Duser.language=en -Duser.variant -cp C:\gradle\2.13\lib\gradle-launcher-2.13.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 2.13
16:12:08.527 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Environment for process ‘Gradle build daemon’: …
16:12:08.529 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
16:12:08.532 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: Gradle build daemon.
16:12:08.550 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED

This definitely does not happen on 2.12, so appears to be a regression in the documented behaviour (as per https://docs.gradle.org/2.13/userguide/gradle_daemon.html)


(Sterling Greene) #2

It’s starting a single-use daemon (which shuts down at the end of the build) because the JVM arguments requested for the build are not compatible with the JVM you’re running.

It’s using these JVM args for the daemon:

-XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=windows-1252, -Djava.io.tmpdir=c:\bar\output-amd64-win-release\BUILD_WORK, -Duser.country=GB, -Duser.language=en, -Duser.variant,

I think those are the defaults, so I suspect you may have different arguments set in gradlew or maybe JAVA_OPTS?