fix(ci): drop stale Gradle journal locks on the shared /gradle volume #117

Merged
sirius merged 1 commit from feat/android-ci-gradle-journal-lock into main 2026-09-19 02:01:25 +00:00
Owner

Summary

android-ci on main died with LockTimeoutException: Timeout waiting to lock journal cache (/gradle/caches/journal-1). Owner PID and our PID were a few numbers apart — two Gradle JVMs on the shared onionwire-android-gradle volume.

Cause

  • GRADLE_USER_HOME=/gradle is a Docker volume reused across runs.
  • A cancelled/timed-out job never runs the trailing docker rm, so the previous onionwire-android-* container keeps the volume (and the lock).
  • android/gradle.properties sets org.gradle.parallel=true.

Fix

  • trap EXIT plus docker rm -f of leftover onionwire-android-* containers before create.
  • Inside the build container: delete stale *.lock files, GRADLE_OPTS parallel=false.
  • Same treatment on android-release.yml (same volume).

Does not change app code. After merge, re-run android-ci on main if the merge-of-116 job stayed red.

## Summary android-ci on main died with `LockTimeoutException: Timeout waiting to lock journal cache (/gradle/caches/journal-1)`. Owner PID and our PID were a few numbers apart — two Gradle JVMs on the shared `onionwire-android-gradle` volume. ## Cause - `GRADLE_USER_HOME=/gradle` is a Docker volume reused across runs. - A cancelled/timed-out job never runs the trailing `docker rm`, so the previous `onionwire-android-*` container keeps the volume (and the lock). - `android/gradle.properties` sets `org.gradle.parallel=true`. ## Fix - `trap EXIT` plus `docker rm -f` of leftover `onionwire-android-*` containers before create. - Inside the build container: delete stale `*.lock` files, `GRADLE_OPTS` `parallel=false`. - Same treatment on android-release.yml (same volume). Does not change app code. After merge, re-run android-ci on main if the merge-of-116 job stayed red.
fix(ci): drop stale Gradle journal locks on the shared /gradle volume
All checks were successful
android-ci / android (pull_request) Successful in 11m30s
9a1f50eadf
android-ci failed LockTimeoutException on /gradle/caches/journal-1: two
JVMs (PIDs a few apart) sharing onionwire-android-gradle. A cancelled job
never docker-rms the build container, so the next run mounts the same
volume while the previous Gradle still holds the lock. Also
org.gradle.parallel=true in android/gradle.properties.

Remove leftover onionwire-android-* containers (and trap EXIT), delete
stale *.lock files inside the container, and force parallel=false.
sirius merged commit 5c43254111 into main 2026-09-19 02:01:25 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/onionwire!117
No description provided.