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

Timeout waiting to lock Java compile cache #184

Open
stauvel opened this issue Apr 30, 2021 · 5 comments
Open

Timeout waiting to lock Java compile cache #184

stauvel opened this issue Apr 30, 2021 · 5 comments

Comments

@stauvel
Copy link

stauvel commented Apr 30, 2021

I'm under Windows and build a big composite build.
It works outside of docker, but failed when I run with the following command :

docker run --rm -u gradle -v "$(pwd -W)":/home/gradle/project -w /home/gradle/project gradle:6-jdk11 gradle assemble --no-daemon

(--no-daemon is not the problem)

...
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sub:project:compileJava'.
> Could not create service of type DefaultGeneralCompileCaches using GradleScopeCompileServices.createGeneralCompileCaches().
   > > Task :sub:project:compileJava FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.3/userguide/command_line_interface.html#sec:command_line_warnings
3 actionable tasks: 1 executed, 2 up-to-date
Timeout waiting to lock Java compile cache (/home/gradle/project/.gradle/6.8.3/javaCompile). It is currently in use by another Gradle instance.
     Owner PID: 43
     Our PID: 341
     Owner Operation:
     Our operation: 
     Lock file: /home/gradle/project/.gradle/6.8.3/javaCompile/javaCompile.lock

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
 

The find ~/.gradle -type f -name "*.lock" gives me a lot of locks but I start my build from a new cloned project (no .gradle folder).

Any idea ?

@keeganwitt
Copy link
Owner

I've never seen that before. Does it still happen without the -u gradle?

@stauvel
Copy link
Author

stauvel commented May 1, 2021 via email

@keeganwitt
Copy link
Owner

keeganwitt commented May 2, 2021

The issue was being discussed in gradle/gradle#11861, but I didn't see any comments that appeared useful (so far).

@sergeykad
Copy link

sergeykad commented Oct 11, 2021

The previous issue about the same topic was unfortunately closed due to inactivity.

We experience these errors almost daily on our CI environment (no Dockers)

@keeganwitt
Copy link
Owner

You're saying this is happening even while running Gradle outside of Docker?

Either way, I don't think there's anything I can change in the Docker image to fix this (unless there's some workaround I haven't seen yet).

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

3 participants