Since upgrading to 2.6 seeing issues with lock file

Since upgrading to Gradle 2.6 I see issue with lock file which I haven’t seen before in any other Gradle x.x version.
I normally always upgrade to every new version so used 2.5, 2.4, … etc before.

$ ./gradlew clean appengineRun
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'watstemtnl'.
> Could not open cp_proj class cache for build file '/Users/marceloverdijk/workspace/watstemtnl/build.gradle' (/Users/marceloverdijk/.gradle/caches/2.6/scripts/build_a55ku26rg2eyu96wrmz5r3n44/cp_proj).
   > Timeout waiting to lock cp_proj class cache for build file '/Users/marceloverdijk/workspace/watstemtnl/build.gradle' (/Users/marceloverdijk/.gradle/caches/2.6/scripts/build_a55ku26rg2eyu96wrmz5r3n44/cp_proj). It is currently in use by another Gradle instance.
     Owner PID: unknown
     Our PID: 33080
     Owner Operation: unknown
     Our operation: Initialize cache
     Lock file: /Users/marceloverdijk/.gradle/caches/2.6/scripts/build_a55ku26rg2eyu96wrmz5r3n44/cp_proj/

I cannot see any other Gradle process btw.
I already removed the lock file and cache folder manually so I was able to continue (but also lost history).

Earlier this week I had the same problem so it’s now the 2nd time with Gradle 2.6 which caught my attention.

I’m using a MacBook with Java 1.8.0_25.
Running Gradle from commond line, and having IntelliJ open as well.


Thanks Marcel. I’m not aware of any changes to class caching in Gradle 2.6 that might be triggering this. It appears that an instance of Gradle is compiling the build scripts, and another instance is timing out waiting for that to complete (10 secs).

I wonder if it’s got something to do with the changes made to add continuous mode support, combined with your use of a ‘single use daemon’ (the warning message that a new JVM will be forked).

Please let us know if this problem continues, and if you see any pattern that might help identify the cause.