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

Build paused after multiple restarts and then hangs despite timeout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • workflow-cps-plugin
    • None
    • Jenkins 2.164.3
      java 1.8.0_192
      OS - Red hat 7
      workflow-basic-steps : 2.18

      For a pipeline script of

      pipeline {
          agent none 
          options { 
              timestamps() 
              buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
              timeout(time: 5, unit: 'HOURS')
              ansiColor('xterm')
          }
          stages {
              stage('Pre-Build') {
      		....
      <truncated>
      

      When the timeout is reached, we see the job hang and not killed.

      The job is way past its 5 hour timeout.

      12:08:55  [2019-10-10 19:08:55] [INFO] Running verify succeeded in 27s
      16:54:40  Cancelling nested steps due to timeout
      16:55:40  Body did not finish within grace period; terminating with extreme prejudice
      

      Relevant OSS code - https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/3ecc7bbd91182e330a23a9e661ae1cdfa2d2b55e/src/main/java/org/jenkinsci/plugins/workflow/steps/TimeoutStepExecution.java#L152

            jglick Jesse Glick
            croydondias Croydon Dias
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: