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

NPE: Failed to abort CpsFlowExecutiontask.DurableTaskStep$Execution.stop(DurableTaskStep.java:140)

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Apr 05, 2016 10:56:52 AM org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$6 onSuccess
      WARNING: Failed to abort CpsFlowExecution[Owner[bmlltech/lux/master/2:bmlltech/lux/master #2]]
      java.lang.NullPointerException
      	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.stop(DurableTaskStep.java:140)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$6.onSuccess(CpsFlowExecution.java:760)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$6.onSuccess(CpsFlowExecution.java:755)
      	at org.jenkinsci.plugins.workflow.support.concurrent.Futures$1.run(Futures.java:150)
      	at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
      	at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149)
      	at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134)
      	at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170)
      	at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$5.onSuccess(CpsFlowExecution.java:644)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$5.onSuccess(CpsFlowExecution.java:631)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:568)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:32)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	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)
      

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            akostadinov I think you are running an old version of the plugin.

            Show
            jglick Jesse Glick added a comment - akostadinov I think you are running an old version of the plugin.
            Hide
            akostadinov akostadinov added a comment -

            Seeing a lot of these in the log:

            Jul 31, 2017 3:25:52 PM WARNING org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution logger
            
            JENKINS-34021: could not get TaskListener in CpsStepContext[15:sh]:Owner[New_Puddle_Detector/192:New_Puddle_Detector #192]
            java.io.IOException: cannot find current thread
            	at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:295)
            	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:61)
            	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.logger(DurableTaskStep.java:209)
            	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.access$700(DurableTaskStep.java:139)
            	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution$3.call(DurableTaskStep.java:308)
            	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution$3.call(DurableTaskStep.java:306)
            	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution$4.call(DurableTaskStep.java:359)
            	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:748)
            
            

            Any ideas how to debug what is causing the issue?

            Show
            akostadinov akostadinov added a comment - Seeing a lot of these in the log: Jul 31, 2017 3:25:52 PM WARNING org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution logger JENKINS-34021: could not get TaskListener in CpsStepContext[15:sh]:Owner[New_Puddle_Detector/192:New_Puddle_Detector #192] java.io.IOException: cannot find current thread at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:295) at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:61) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.logger(DurableTaskStep.java:209) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.access$700(DurableTaskStep.java:139) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution$3.call(DurableTaskStep.java:308) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution$3.call(DurableTaskStep.java:306) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution$4.call(DurableTaskStep.java:359) 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:748) Any ideas how to debug what is causing the issue?
            Hide
            jglick Jesse Glick added a comment -

            With 2.32.3, workflow-durable-task-step 2.9, and workflow-cps 2.29, and this script

            while (true) {
                try {
                    node {
                        sh 'sleep 30'
                    }
                } catch (e) {
                    echo "ignoring $e"
                }
            }
            

            I do get some errors, mainly

            java.io.IOException: cannot find current thread
            	at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:296)
            	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:61)
            	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.logger(DurableTaskStep.java:200)
            	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:301)
            	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:276)
            	at …
            

            Everything does stop cleanly and there are no recurring warnings.

            Show
            jglick Jesse Glick added a comment - With 2.32.3, workflow-durable-task-step 2.9, and workflow-cps 2.29, and this script while ( true ) { try { node { sh 'sleep 30' } } catch (e) { echo "ignoring $e" } } I do get some errors, mainly java.io.IOException: cannot find current thread at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:296) at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:61) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.logger(DurableTaskStep.java:200) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:301) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:276) at … Everything does stop cleanly and there are no recurring warnings.
            Hide
            amuniz Antonio Muñiz added a comment - - edited
            1. Jenkins 2.32 (with all default plugins, which I think is latest versions)
            2. workflow-basic-steps-plugin didn't have the fix for retry at that time (which makes the case easier to reproduce)
            3. Create a pipeline with the script I posted before
            4. Trigger a build
            5. Click on the build stop button
            6. retry swallows the request and retries its body
            7. The halt link is printed in the console log, click on it
            8. The kill link is printed in the console log, click on it
            9. The build is killed, but a warning is continuously printed in Jenkins global log

            Jesse Glick I hope it helps.

            Show
            amuniz Antonio Muñiz added a comment - - edited Jenkins 2.32 (with all default plugins, which I think is latest versions) workflow-basic-steps-plugin didn't have the fix for retry at that time (which makes the case easier to reproduce) Create a pipeline with the script I posted before Trigger a build Click on the build stop button retry swallows the request and retries its body The halt link is printed in the console log, click on it The kill link is printed in the console log, click on it The build is killed, but a warning is continuously printed in Jenkins global log Jesse Glick I hope it helps.
            Hide
            jglick Jesse Glick added a comment -

            Antonio Muñiz please reopen if you know exactly how to reproduce from scratch. Need to know plugin versions and exactly what you did to kill the build.

            Show
            jglick Jesse Glick added a comment - Antonio Muñiz please reopen if you know exactly how to reproduce from scratch. Need to know plugin versions and exactly what you did to kill the build.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                ssbarnea Sorin Sbarnea
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: