Crash with gradle build v3


(Fabien Renaud) #1

Earlier today, someone reported a crash while building with gradle my project. Here is his bug report:

He and I were able to repro the crash on Mac and Ubuntu with different versions of Java 8.
The only constant here was gradle’s version. The project only uses two plugins: shadow and apt and I am using the latest versions for both.
I tried gradle v3.3 and v3.2.1, they both crash. I don’t have issues with gradle 3.3 for other projects I’m working on.

Issues:

  • running gradle(w) build crashes the JVM (see github issue for crash log)
  • the gradle daemon seems to be interrupted for some reason.

daemon log:

:clean
:compileJava
The message received from the daemon indicates that the daemon has disappeared.
Build request sent: Build{id=1935d6b2-ef24-4e6c-b590-67bf0f251b27.1, currentDir=/Users/frenaud/projects/me/benchson}
Attempting to read last messages from the daemon log…
Daemon pid: 58102
log file: /Users/frenaud/.gradle/daemon/3.3/daemon-58102.out.log
----- Last 20 lines from daemon log file - daemon-58102.out.log -----
08:35:33.029 [ERROR] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] Command execution: started DaemonCommandExecution[command = Build{id=1935d6b2-ef24-4e6c-b590-67bf0f251b27.1, currentDir=/Users/frenaud/projects/me/benchson}, connection = DefaultDaemonConnection: socket connection from /0:0:0:0:0:0:0:1:52707 to /0:0:0:0:0:0:0:1:54215] after 0.0 minutes of idle
08:35:33.029 [INFO] [org.gradle.launcher.daemon.server.DaemonRegistryUpdater] Marking the daemon as busy, address: [07b16271-b629-4569-ab5f-9c81bad005bb port:52707, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]]
08:35:33.029 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Marking busy by address: [07b16271-b629-4569-ab5f-9c81bad005bb port:52707, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]]
08:35:33.029 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
08:35:33.029 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
08:35:33.030 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
08:35:33.030 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] resetting idle timer
08:35:33.030 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is running. Sleeping until state changes.
08:35:33.030 [INFO] [org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy] Daemon is about to start building Build{id=1935d6b2-ef24-4e6c-b590-67bf0f251b27.1, currentDir=/Users/frenaud/projects/me/benchson}. Dispatching build started information…
08:35:33.030 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 76: dispatching class org.gradle.launcher.daemon.protocol.BuildStarted
08:35:33.030 [DEBUG] [org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment] Configuring env variables: {PATH=/usr/local/gradle/3.3/bin:/Users/frenaud/projects/others/Git-FastExport/script:/usr/local/java/latest/bin:/Users/frenaud/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin, JAVA_HOME=/usr/local/java/latest, DSHGROUP_PATH=/Users/frenaud/.pdsh/machines, TERM=xterm-256color, LANG=en_US.UTF-8, GENYMOTION_HOME=/Applications/Genymotion.app/Contents/MacOS, GRADLE_HOME=/usr/local/gradle/3.3, ITERM_SESSION_ID=w0t5p0:1A4AE204-CAE0-45A8-ACF1-12AA889896A4, PDSH_RCMD_TYPE=ssh, LOGNAME=frenaud, XPC_SERVICE_NAME=0, PWD=/Users/frenaud/projects/me/benchson, TERM_PROGRAM_VERSION=3.0.14, APP_NAME_60103=Gradle, SHELL=/bin/bash, TERM_PROGRAM=iTerm.app, DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer, OLDPWD=/Users/frenaud/projects/me/benchson, JAVA_MAIN_CLASS_60103=org.gradle.wrapper.GradleWrapperMain, USER=frenaud, ITERM_PROFILE=Default, TMPDIR=/var/folders/3m/tfpncrp90xbdb6yh9mz3b1jh0000gp/T/, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.E7pkSdzpzz/Listeners, EDITOR=vim, XPC_FLAGS=0x0, TERM_SESSION_ID=w0t5p0:1A4AE204-CAE0-45A8-ACF1-12AA889896A4, RUST_SRC_PATH=/usr/local/src/rust/src, M2_HOME=/usr/local/Cellar/maven/3.3.3/libexec, __CF_USER_TEXT_ENCODING=0x1F6:0x0:0x0, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.wDV6TjHxYe/Render, COLORFGBG=15;0, SHLVL=1, HOME=/Users/frenaud, APP_ICON_60103=/Users/frenaud/projects/me/benchson/media/gradle.icns}
08:35:33.031 [DEBUG] [org.gradle.launcher.daemon.server.exec.LogToClient] About to start relaying all logs to the client via the connection.
08:35:33.031 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 58102). The daemon log file: /Users/frenaud/.gradle/daemon/3.3/daemon-58102.out.log
08:35:33.031 [INFO] [org.gradle.launcher.daemon.server.exec.LogAndCheckHealth] Starting 3rd build in daemon [uptime: 54 mins 36.028 secs, performance: 99%, no major garbage collections]
08:35:33.031 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has started executing the build.
08:35:33.031 [INFO] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=2ee0210e-5176-4ae6-9b6a-55ed6ce959b6,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home,daemonRegistryDir=/Users/frenaud/.gradle/daemon,pid=58102,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]
08:35:33.032 [INFO] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for plugin-use-metadata, path /Users/frenaud/.gradle/caches/3.3/plugin-resolution/plugin-use-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@340dda33
08:35:33.032 [INFO] [org.gradle.cache.internal.DefaultCacheAccess] Creating new cache for client-status, path /Users/frenaud/.gradle/caches/3.3/plugin-resolution/client-status.bin, access org.gradle.cache.internal.DefaultCacheAccess@340dda33
:clean
:compileJava
----- End of the daemon log -----