Skip to content

Shared GRADLE_USER_HOME via node-local hostPath: journal cache lock timeout across pods (Owner PID == Our PID); Jenkins same-host parallel OK #16872

Description

@zhengyansheng

Summary

We share a writable Gradle user home across concurrent Argo Workflow pods using node-local disk (hostPath, not NFS). Concurrent ./gradlew runs often fail at Gradle startup with a journal cache lock timeout. The lock file frequently reports Owner PID == Our PID.

The same Gradle usage on a Jenkins agent (multiple processes, one PID namespace, local ~/.gradle) does not hit this failure: parallel builds proceed (or wait briefly on locks).

We are filing this to clarify whether this is a known limitation of sharing build-tool home directories across pods, and whether docs should call it out. We are not asking for a specific mitigation design in this issue—primarily want the behavior documented / confirmed.

Environment

  • Argo Workflows: v3.5.13 (CLI; BuildDate 2024-12-02, GitCommit 06c761b8cc993aa6ab60f8c35c3c95bb334f3da0)
  • Kubernetes (EKS): client v1.34.2-eks-ecaa3a6, server v1.35.6-eks-bca9cf6
  • Gradle home volume: node-local disk (hostPath or equivalent), e.g. /opt/workflow-data/gradlew
  • Storage: not NFS
  • Build command: Gradle Wrapper 7.4, e.g. ./gradlew --no-daemon clean <module>:build -x test
  • Multiple Workflows / parallel steps mount the same host path as Gradle user home / caches

Error

FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> ... (service creation chain) ...
  > Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
     > Timeout waiting to lock journal cache (/opt/workflow-data/gradlew/caches/journal-1). It is currently in use by another Gradle instance.
       Owner PID: 41
       Our PID: 41
       Owner Operation:
       Our operation:
       Lock file: /opt/workflow-data/gradlew/caches/journal-1/journal-1.lock

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions