• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Trivial Trivial
    • gradle-plugin
    • None
    • Jenkins 2.150.2
      Gradle Plugin version 1.28
      Gradle version 4.2.1 on Linux server

      Locks are not being released on the Gradle cache so other jobs are failing waiting for the locks to be released.

      Debug message from Jenkins log:  [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] The file lock is held by a different Gradle process (pid: 3265, operation: ). Will attempt to ping owner at port 42238

       

      The lock file is not being deleted after builds complete.

      Full log attached.

          [JENKINS-56239] Gradle cache locked

          Stefan Wolf added a comment -

          x102785: I don't think this has anything to do with the Gradle plugin. This is an issue with Gradle or the usage of Gradle.

          Do you have two Gradle build run in parallel on the same machine?

          Do your Gradle builds share the same user home?

          What is the other process which is noted in the log doing?

          Stefan Wolf added a comment - x102785 : I don't think this has anything to do with the Gradle plugin. This is an issue with Gradle or the usage of Gradle. Do you have two Gradle build run in parallel on the same machine? Do your Gradle builds share the same user home? What is the other process which is noted in the log doing?

          Jed Jacobs added a comment -

          Hi Stefan.  We have more than one build on the same machine but they were not running concurrently.
          The Gradle builds all run with the same account so yes, they share the same user home and Gradle cache then, by default.

          The only other process is the git plugin get the files from BitBucket.

          I should mention, this is a scripted pipeline.

          Jed Jacobs added a comment - Hi Stefan.  We have more than one build on the same machine but they were not running concurrently. The Gradle builds all run with the same account so yes, they share the same user home and Gradle cache then, by default. The only other process is the git plugin get the files from BitBucket. I should mention, this is a scripted pipeline.

          Jed Jacobs added a comment -

          Issue not caused by the Gradle Plugin.  We found a rogue process on the server that had not released locks on over 1000 dependencies.  Killing the process and deleting the locks resolved the issue.

          Jed Jacobs added a comment - Issue not caused by the Gradle Plugin.  We found a rogue process on the server that had not released locks on over 1000 dependencies.  Killing the process and deleting the locks resolved the issue.

            Unassigned Unassigned
            x102785 Jed Jacobs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: