Gradle 4.0 seems to spend >2mins for releasing lock?


(Thipor Kong) #1

Hi,

during evaluation of my build scripts I occasionally observe periods of “non-activity” of about 2 minutes:

11:33:05.076 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Resolve files of :classpath' completed
11:33:05.079 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on proj remapped class cache for 7uewo2i8uwll7cnk514p31v40 (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts-remapped\build_504ib4befaksy6qux93vtag1l\7uewo2i8uwll7cnk514p31v40\proje9a10deaafccaeabc00f566ce982f5ba).
11:33:05.079 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on proj remapped class cache for 7uewo2i8uwll7cnk514p31v40 (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts-remapped\build_504ib4befaksy6qux93vtag1l\7uewo2i8uwll7cnk514p31v40\proje9a10deaafccaeabc00f566ce982f5ba).
11:33:05.079 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on proj remapped class cache for 7uewo2i8uwll7cnk514p31v40 (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts-remapped\build_504ib4befaksy6qux93vtag1l\7uewo2i8uwll7cnk514p31v40\proje9a10deaafccaeabc00f566ce982f5ba).
11:33:05.079 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on proj remapped class cache for 7uewo2i8uwll7cnk514p31v40 (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts-remapped\build_504ib4befaksy6qux93vtag1l\7uewo2i8uwll7cnk514p31v40\proje9a10deaafccaeabc00f566ce982f5ba).
11:33:05.080 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on proj remapped class cache for 7uewo2i8uwll7cnk514p31v40 (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts-remapped\build_504ib4befaksy6qux93vtag1l\7uewo2i8uwll7cnk514p31v40\proje9a10deaafccaeabc00f566ce982f5ba).
11:33:05.232 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on proj generic class cache for build file 'C:\Workarea\slk\build.gradle' (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts\7uewo2i8uwll7cnk514p31v40\proj\proje9a10deaafccaeabc00f566ce982f5ba).
11:33:05.233 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on proj generic class cache for build file 'C:\Workarea\slk\build.gradle' (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts\7uewo2i8uwll7cnk514p31v40\proj\proje9a10deaafccaeabc00f566ce982f5ba).
11:33:05.233 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on proj generic class cache for build file 'C:\Workarea\slk\build.gradle' (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts\7uewo2i8uwll7cnk514p31v40\proj\proje9a10deaafccaeabc00f566ce982f5ba).
11:33:05.930 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 17112014848, Free: 6464049152}
11:33:05.930 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 3803185152, Committed: 360185856}
[ 50x more log entries from MemoryManager like the two above ]
11:35:15.968 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 17112014848, Free: 6490927104}
11:35:15.968 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 3803185152, Committed: 452460544}
11:35:18.792 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on proj remapped class cache for 7uewo2i8uwll7cnk514p31v40 (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts-remapped\build_504ib4befaksy6qux93vtag1l\7uewo2i8uwll7cnk514p31v40\proje9a10deaafccaeabc00f566ce982f5ba).
11:35:18.792 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on proj remapped class cache for 7uewo2i8uwll7cnk514p31v40 (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts-remapped\build_504ib4befaksy6qux93vtag1l\7uewo2i8uwll7cnk514p31v40\proje9a10deaafccaeabc00f566ce982f5ba).
11:35:18.792 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on proj remapped class cache for 7uewo2i8uwll7cnk514p31v40 (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts-remapped\build_504ib4befaksy6qux93vtag1l\7uewo2i8uwll7cnk514p31v40\proje9a10deaafccaeabc00f566ce982f5ba).
11:35:18.792 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on proj remapped class cache for 7uewo2i8uwll7cnk514p31v40 (C:\Workarea\_tools.tk09\.gradle\caches\4.0\scripts-remapped\build_504ib4befaksy6qux93vtag1l\7uewo2i8uwll7cnk514p31v40\proje9a10deaafccaeabc00f566ce982f5ba).

Any suggestions how to get rid of this?

Thanks,

Thipor


Gradle 4.0

Build time:   2017-06-14 15:11:08 UTC
Revision:     316546a5fcb4e2dfe1d6aa0b73a4e09e8cecb5a5

Groovy:       2.4.11
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_131 (Oracle Corporation 25.131-b11)
OS:           Windows 7 6.1 amd64

(Stefan Oehme) #2

Hey Thipor,

could you give us some more details about the circumstances of the locking? Are other builds running on the same machine? Are you running inside a docker container or VM? Are you using a file share from different machines?

Cheers,
Stefan


(Thipor Kong) #3

Just tried 20 times in a row to reproduce the behaviour and it didn’t show again.
Will track this closely.

Just to answer the questions: no other builds, no container/VM, only local filesystem.

Thanks.