• workflow-cps 2.69

      Our server has intermittently been raising an exception which fails builds: 

      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)
      Finished: FAILURE

      It happens across different projects, and we can't find any commonality between them that might explain how we're ending up in this state. The error is not repeatable – kicking off the build again usually results in a successful build.

      Jenkins ver. 2.164.1

      (Relevant?) plugin versions:
      Pipeline Multibranch: 2.20
      Pipeline: Groovy 2.63

      I found the line that is throwing the exception in the source code, which seems straightforward, but I don't know why that value is sometimes null.

      I'm happy to provide more information to help diagnose this problem if you need something more.

        1. image-2023-11-08-00-38-27-386.png
          image-2023-11-08-00-38-27-386.png
          18 kB
        2. log.txt
          4 kB
        3. pipeline.txt
          3 kB
        4. installedPlugins.txt
          44 kB
        5. pipeline_viyou
          2 kB

          [JENKINS-56890] IOException: "cannot find current thread"

          Cody Casterline created issue -
          Cody Casterline made changes -
          Description Original: Our server has intermittently been raising an exception which fails builds: 

          {{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)}}
          {{Finished: FAILURE}}

          It happens across different projects, and we can't find any commonality between them that might explain how we're ending up in this state. The error is not repeatable – kicking off the build again usually results in a successful build.

          [Jenkins ver. 2.164.1|https://jenkins.io/]

          (Relevant?) plugin versions:
          Pipeline Multibranch: 2.20
          Pipeline: Groovy 2.63

          I found [the line that is throwing the exception in the source code|[https://github.com/jenkinsci/workflow-cps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java#L300]], which seems straightforward, but I don't know why that value is sometimes null.

          I'm happy to provide more information to help diagnose this problem if you need something more.
          New: Our server has intermittently been raising an exception which fails builds: 

          {{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)}}
          {{Finished: FAILURE}}

          It happens across different projects, and we can't find any commonality between them that might explain how we're ending up in this state. The error is not repeatable – kicking off the build again usually results in a successful build.

          [Jenkins ver. 2.164.1|https://jenkins.io/]

          (Relevant?) plugin versions:
          Pipeline Multibranch: 2.20
          Pipeline: Groovy 2.63

          I found [the line that is throwing the exception in the source code|https://github.com/jenkinsci/workflow-cps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java#L300], which seems straightforward, but I don't know why that value is sometimes null.

          I'm happy to provide more information to help diagnose this problem if you need something more.
          Lee Webb made changes -
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]
          Devin Nusbaum made changes -
          Component/s New: workflow-cps-plugin [ 21713 ]
          Component/s Original: pipeline [ 21692 ]
          Devin Nusbaum made changes -
          Labels New: pipeline
          Devin Nusbaum made changes -
          Remote Link New: This issue links to "jenkinsci/workflow-cps-plugin#287 (Web Link)" [ 22759 ]
          Devin Nusbaum made changes -
          Remote Link New: This issue links to "jenkinsci/workflow-cps-plugin#288 (Web Link)" [ 22800 ]
          Devin Nusbaum made changes -
          Assignee New: Devin Nusbaum [ dnusbaum ]
          Devin Nusbaum made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Devin Nusbaum made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Devin Nusbaum made changes -
          Released As New: workflow-cps 2.69
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            fcodyc Cody Casterline
            Votes:
            20 Vote for this issue
            Watchers:
            40 Start watching this issue

              Created:
              Updated:
              Resolved: