Parent job code:
for(int i = 0; i < 15; i++) { build job: 'test_job', quietPeriod: 0, wait: false }
Downstream job code:
node {
println "DOWNSTREAM JOB"
}
This results in randomly receiving the following error in the downstream jobs:
Started by upstream project "test_parent" build number 19 originally caused by: Started by user Anshu Arya Running: Allocate node : Start Running on master in /var/lib/jenkins/workspace/test_job@8 Running: Allocate node : Body : Start Running: Loaded script: /jenkins_scripts/test_job.groovy Running: Evaluate a Groovy source file into the workflow script : Body : Start Running: Allocate node : Start Running on master in /var/lib/jenkins/workspace/test_job@2 Running: Allocate node : Body : Start Running: Print Message DOWNSTREAM JOB Running: Allocate node : Body : End Running: Allocate node : End Running: Evaluate a Groovy source file into the workflow script : Body : End Running: Allocate node : Body : End Running: Allocate node : End Running: End of Workflow java.lang.NullPointerException at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask.finish(ExecutorStepExecution.java:339) at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask.access$400(ExecutorStepExecution.java:144) at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask$Callback.finished(ExecutorStepExecution.java:370) at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114) at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:311) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:71) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:106) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79) at sun.reflect.GeneratedMethodAccessor433.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:271) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:71) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:180) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:178) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Finished: FAILURE
I had originally mentioned this here https://goo.gl/fHwwUQ but I narrowed it down to this small code example which exhibits the error.
- links to