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

[Cancelling nested steps due to timeout] aborts a job prematurely

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Master: CentOS release 6.9 (Final) / Jenkins ver. 2.114
      Slave: Windows Server 2016 (amd64) / SSH connected
    • Similar Issues:

      Description

      job timeout is set to 2 hr 0 min

      when the job is over we see:

      06:38:20 BUILD SUCCESSFUL*06:38:20* Total time: 105 minutes 2 seconds

      which indicates the build is OK and shortly after that the jobs fails with:

      06:38:20 BUILD SUCCESSFUL*06:38:20* Total time: 105 minutes 2 seconds[Pipeline] }[Pipeline] // withAnt[Pipeline] }[Pipeline] // script[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // stage[Pipeline] stage[Pipeline]

      { (Declarative: Post Actions)[Pipeline] echo*06:38:20* Finished[Pipeline] junit*06:38:20* Recording test results[Pipeline] echo*06:38:26* Changed[Pipeline] echo*06:38:26* Success[Pipeline] deleteDirCancelling nested steps due to timeout[Pipeline] }

      [Pipeline] // stage[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // timestamps[Pipeline] }[Pipeline] // timeout[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of Pipelinejava.lang.InterruptedException
      at java.lang.Object.wait(Native Method)
      at hudson.remoting.Request.call(Request.java:177)
      at hudson.remoting.Channel.call(Channel.java:954)
      at hudson.FilePath.act(FilePath.java:998)
      at hudson.FilePath.act(FilePath.java:987)
      at hudson.FilePath.deleteRecursive(FilePath.java:1197)
      at org.jenkinsci.plugins.workflow.steps.DeleteDirStep$Execution.run(DeleteDirStep.java:77)
      at org.jenkinsci.plugins.workflow.steps.DeleteDirStep$Execution.run(DeleteDirStep.java:69)
      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
      at hudson.security.ACL.impersonate(ACL.java:290)
      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
      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

      Expected result would be to have the jobs passing as its execution time fits the timeout setting of two hours.

        Attachments

          Activity

          Hide
          abayer Andrew Bayer added a comment -

          Could you attach your Jenkinsfile? Thanks.

          Show
          abayer Andrew Bayer added a comment - Could you attach your Jenkinsfile? Thanks.
          Hide
          acarr468 Adam Carroll added a comment -

          I had this happen to me as well, the last 6 function calls of the OP match my last 6. It appears that deleteRecursive times out, as I have a number of agents that I was looping over to clean up and one of them got the java.lang.InterruptedException after exactly 5 minutes and 0 seconds of runtime. There is no timeout wrapper around this stage (other timeouts in the pipeline are 10 minutes anyway). This is in a cleanup stage using a multibranch pipeline (I unfortunately cannot share my Jenkinsfile).

          Show
          acarr468 Adam Carroll added a comment - I had this happen to me as well, the last 6 function calls of the OP match my last 6. It appears that deleteRecursive times out, as I have a number of agents that I was looping over to clean up and one of them got the java.lang.InterruptedException after exactly 5 minutes and 0 seconds of runtime. There is no timeout wrapper around this stage (other timeouts in the pipeline are 10 minutes anyway). This is in a cleanup stage using a multibranch pipeline (I unfortunately cannot share my Jenkinsfile).

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            vassilena Vassilena Treneva
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: