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

NPE at at org.jenkins.plugins.lockableresources.LockableResourcesManager.getNextQueuedContext

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins 2.60.3 on Debian jessie + OpenJDK 8 with plugin version 2.0 (also 2.43.x and 1.11.2 respectively).
    • Similar Issues:

      Description

      This started happening frequently when trying to release a lock, either from within a job or from the web UI:

      java.lang.NullPointerException
      at org.jenkins.plugins.lockableresources.LockableResourcesManager.getNextQueuedContext(LockableResourcesManager.java:438)
      at org.jenkins.plugins.lockableresources.LockableResourcesManager.unlockNames(LockableResourcesManager.java:351)
      at org.jenkins.plugins.lockableresources.LockStepExecution$Callback.finished(LockStepExecution.java:84)
      at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114)
      at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:362)
      at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)
      at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
      at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:165)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:330)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:242)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:230)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      

      This continues after restarts; the only workaround we have so far is to remove the requirement for locking for our critical jobs - but others are still broken. Help welcomed!

        Attachments

          Activity

          Hide
          dom Dominic Hargreaves added a comment -

          The problem went away by stopping Jenkins, removing the org.jenkins.plugins.lockableresources.LockableResourcesManager.xml and recreating the resources by hand. I have a copy of the offending file; let me know if there is anything useful I can pull out of it.

          Show
          dom Dominic Hargreaves added a comment - The problem went away by stopping Jenkins, removing the org.jenkins.plugins.lockableresources.LockableResourcesManager.xml and recreating the resources by hand. I have a copy of the offending file; let me know if there is anything useful I can pull out of it.

            People

            • Assignee:
              Unassigned
              Reporter:
              dom Dominic Hargreaves
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: