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

Jenkins pipeline lock mechanism is throwing null pointer exceptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: pipeline
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.157
    • Similar Issues:

      Description

      I am getting this null pointer exception and the lock is not getting freed, it was working correctly for a long and suddenly started to throw this exceptions

       

      // code placeholder
      stage('Deploy to iDev') {
          steps {
              lock(resource: "$DEV_LOCK", inversePrecedence: true) {
                  script {
                     .
                      .
                      .
                  }
              }
          }
      }
      

       Below is the exception thrown:

       

      {{}}

      java.lang.NullPointerException at org.jenkins.plugins.lockableresources.LockableResourcesManager.freeResources(LockableResourcesManager.java:323) at org.jenkins.plugins.lockableresources.LockableResourcesManager.unlockNames(LockableResourcesManager.java:367) at org.jenkins.plugins.lockableresources.LockStepExecution$Callback.finished(LockStepExecution.java:125) at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114) at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:368) at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)

      {{}}

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              rgowdatmx rahul gowda
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: