docker-gradle
docker-gradle copied to clipboard
Timeout waiting to lock Java compile cache
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 ?
I've never seen that before. Does it still happen without the -u gradle
?
Thx for your interest. Still happen without -u.
Le sam. 1 mai 2021 à 22:03, Keegan Witt @.***> a écrit :
I've never seen that before. Does it still happen without the -u gradle?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/keeganwitt/docker-gradle/issues/184#issuecomment-830686749, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2PTBRHJ463J266NU26V2TTLRNCNANCNFSM434OCEPA .
The issue was being discussed in https://github.com/gradle/gradle/issues/11861, but I didn't see any comments that appeared useful (so far).
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)
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).