Build fails with 'cannot find current thread' error

Article ID:360033606192
1 minute readKnowledge base


Builds sometimes fail with the error: cannot find current thread
at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(
at org.jenkinsci.plugins.workflow.cps.CpsBodySubContext.doGet(
at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Callback.finished(
at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Execution2$Callback2.finished(
at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution$TailCall.lambda$onSuccess$0(
at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(
at java.util.concurrent.Executors$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$


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

If you are a CloudBees customer, you may need to temporarily disable the CloudBees Assurance Program (CAP) in order to find the update as explained here: Plugins missing from Update Center after installing CloudBees Jenkins v2.x — CloudBees Support If you would like to stay CAP compliant, please upgrade your CloudBees Jenkins instance to version or higher as the updated plugin is included in these versions of CAP.