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

NPE Cannot get property 'closure' after resume on Jenkins restart

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None

      This issue occurred after doing an upgrade of Plugins:
      branch-api from 2.5.0 to 2.5.2
      credentials-binding 1.18 to 2.19
      credentials 2.1.19 to 2.2.0
      github-branch-source 2.5.2 to 2.5.3
      workflow-basic-steps 2.16 to 2.18
      workflow-cps 2.68 to 2.70
      workflow-durable-task-step 2.30 to 2.31
      workflow-step-api 2.19 to 2.20

      Before shutting Jenkins down for plugin-updates, I marked the build agents temporarily offline, and waited for all shell steps in the jobs to complete.

      There were 4 jobs left in a running state waiting for build-agents in their console log.

      I clicked on pause job for each one of them, and then allowed the plug-in update to restart Jenkins.

      After Jenkins restarted, two of the jobs, appear to resumed properly and then crashed after apparently completing the run with a NPE.

      I tried to repeat the issue with an almost identically configured Jenkins system that was previously had the plugin upgrades and was not able to reproduce.

      I then upgraded that second system to to 2.176.1 stable and was not able to reproduce.

      00:19:02.536  [Pipeline] End of Pipeline
      00:19:02.570  [BFA] Scanning build for known causes...
      00:19:02.570  [BFA] No failure causes found
      00:19:02.570  [BFA] Done. 0s
      00:19:03.604  
      00:19:03.604  GitHub has been notified of this commit’s build result
      00:19:03.604  
      00:19:03.605  java.lang.NullPointerException: Cannot get property 'closure' on null object
      00:19:03.605  	at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
      00:19:03.605  	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
      00:19:03.605  	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:456)
      00:19:03.605  	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.getProperty(DefaultInvoker.java:39)
      00:19:03.605  	at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executeSingleStage(ModelInterpreter.groovy:684)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:418)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:416)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executeSingleStage(ModelInterpreter.groovy:682)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:281)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(ModelInterpreter.groovy:567)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(ModelInterpreter.groovy:566)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:271)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:466)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(ModelInterpreter.groovy:465)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:270)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(ModelInterpreter.groovy:504)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(ModelInterpreter.groovy:503)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:269)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:316)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(ModelInterpreter.groovy:608)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(ModelInterpreter.groovy:607)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:313)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.stageInput(ModelInterpreter.groovy:379)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.stageInput(ModelInterpreter.groovy:378)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:312)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(ModelInterpreter.groovy:635)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(ModelInterpreter.groovy:634)
      00:19:03.605  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(ModelInterpreter.groovy:252)
      00:19:03.605  	at ___cps.transform___(Native Method)
      00:19:03.605  	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
      00:19:03.605  	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
      00:19:03.605  	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
      00:19:03.605  	at sun.reflect.GeneratedMethodAccessor618.invoke(Unknown Source)
      00:19:03.605  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      00:19:03.605  	at java.lang.reflect.Method.invoke(Method.java:498)
      00:19:03.605  	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      00:19:03.605  	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      00:19:03.605  	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
      00:19:03.605  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
      00:19:03.605  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
      00:19:03.605  	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
      00:19:03.605  	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
      00:19:03.605  	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
      00:19:03.605  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      00:19:03.605  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
      00:19:03.605  	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:186)
      00:19:03.605  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:370)
      00:19:03.605  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:93)
      00:19:03.605  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:282)
      00:19:03.605  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:270)
      00:19:03.605  	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      00:19:03.605  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      00:19:03.605  	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      00:19:03.605  	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      00:19:03.605  	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      00:19:03.605  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      00:19:03.605  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      00:19:03.605  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      00:19:03.605  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      00:19:03.605  	at java.lang.Thread.run(Thread.java:748)
      00:19:03.605  Finished: FAILURE
      

            Unassigned Unassigned
            wb8tyw John Malmberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: