Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40368

Locked resources are not always freed up on Pipeline hard kill when there are other pipelines waiting on the Resource

XMLWordPrintable

      Resource lock is not always released when there is some contention over it.

      This can, intermittently, be reproduced by running two builds of the below pipeline concurrently. Retry will simulate inability to cancel the build which should make hard kill link to appear. Canceling the builds in turn as they acquire the lock will sometimes produce the dangling lock.

      retry(5) {
        node('linux') {
          lock('my-resource') {
            println ("running find")
            sh "find / -name hello.txt"
          }
        }
      }
      

            amuniz Antonio Muñiz
            duemir Denys Digtiar
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: