Issue
Builds sometimes fail with the error:
java.io.IOException: cannot find current thread at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:300) at org.jenkinsci.plugins.workflow.cps.CpsBodySubContext.doGet(CpsBodySubContext.java:88) at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:67) at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Callback.finished(BindingStep.java:254) at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Execution2$Callback2.finished(BindingStep.java:162) at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution$TailCall.lambda$onSuccess$0(GeneralNonBlockingStepExecution.java:140) at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77) 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:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Environment
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller >
2.164.1.2
-
CloudBees CI (CloudBees Core) on traditional platforms - Client controller >
2.164.1.2
-
CloudBees Jenkins Enterprise - Managed controller >
2.164.1.2
-
CloudBees Jenkins Platform - Client controller >
2.164.1.2
-
CloudBees Jenkins Distribution >
2.164.1.2
-
Jenkins LTS >
2.164.1
Resolution
This is a bug that was reported here: [JENKINS-56890] IOException: "cannot find current thread" - Jenkins JIRA
It affects environments with Jenkins versions above 2.164
and Pipeline: Groovy (workflow-cps) plugin
below version 2.69
The solution is to upgrade the Pipeline: Groovy (workflow-cps) plugin
to version 2.69
or higher
Please upgrade your CloudBees CI instance to version 2.176.2.3
or higher as the updated plugin is included in these versions of CAP.