[JIRA] (JENKINS-59743) A pipeline job hitting the timeout ending up hanging

2 views
Skip to first unread message

croydondias@gmail.com (JIRA)

unread,
Oct 11, 2019, 5:08:04 AM10/11/19
to jenkinsc...@googlegroups.com
Croydon Dias created an issue
 
Jenkins / Bug JENKINS-59743
A pipeline job hitting the timeout ending up hanging
Issue Type: Bug Bug
Assignee: Unassigned
Components: workflow-basic-steps-plugin
Created: 2019-10-11 09:07
Environment: Jenkins 2.164.3
java 1.8.0_102
OS - rhel7
workflow-basic-steps : 2.18
Priority: Major Major
Reporter: Croydon Dias
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
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

croydondias@gmail.com (JIRA)

unread,
Oct 11, 2019, 5:08:06 AM10/11/19
to jenkinsc...@googlegroups.com
Croydon Dias updated an issue
Change By: Croydon Dias

{noformat}

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

croydondias@gmail.com (JIRA)

unread,
Oct 11, 2019, 5:10:03 AM10/11/19
to jenkinsc...@googlegroups.com
Croydon Dias updated an issue
For a pipeline script of
{noformat}
pipeline {
    agent none
    options {
        timestamps()
        buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
        timeout(time: 5, unit: 'HOURS')
        ansiColor('xterm')
    }
    stages {
        stage('Pre-Build') {
  ....
<truncated>
{noformat}

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

{noformat}
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
{noformat}

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

croydondias@gmail.com (JIRA)

unread,
Oct 11, 2019, 5:11:03 AM10/11/19
to jenkinsc...@googlegroups.com

croydondias@gmail.com (JIRA)

unread,
Oct 11, 2019, 5:12:01 AM10/11/19
to jenkinsc...@googlegroups.com
Croydon Dias updated an issue
Change By: Croydon Dias
Attachment: console-log.png

croydondias@gmail.com (JIRA)

unread,
Oct 11, 2019, 5:12:02 AM10/11/19
to jenkinsc...@googlegroups.com
Croydon Dias updated an issue
For a pipeline script of
{noformat}
pipeline {
    agent none
    options {
        timestamps()
        buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
        timeout(time: 5, unit: 'HOURS')
        ansiColor('xterm')
    }
    stages {
        stage('Pre-Build') {
  ....
<truncated>
{noformat}

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



!console-log.png|thumbnail!

The job is way past its 5 hour timeout.
!progress.png|thumbnail!

{noformat}
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
{noformat}

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

croydondias@gmail.com (JIRA)

unread,
Oct 11, 2019, 5:12:02 AM10/11/19
to jenkinsc...@googlegroups.com
Croydon Dias updated an issue
For a pipeline script of
{noformat}
pipeline {
    agent none
    options {
        timestamps()
        buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
        timeout(time: 5, unit: 'HOURS')
        ansiColor('xterm')
    }
    stages {
        stage('Pre-Build') {
  ....
<truncated>
{noformat}

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



!console-log.png|thumbnail!


!progress.png|thumbnail!

{noformat}
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
{noformat}

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

croydondias@gmail.com (JIRA)

unread,
Oct 11, 2019, 5:13:01 AM10/11/19
to jenkinsc...@googlegroups.com
Croydon Dias updated an issue
Change By: Croydon Dias
Environment: Jenkins 2.164.3
java 1.8.
0_102 0_192
OS -
rhel7 Red hat 7
workflow-basic-steps : 2.18

bitwiseman@gmail.com (JIRA)

unread,
Oct 11, 2019, 12:59:02 PM10/11/19
to jenkinsc...@googlegroups.com
Liam Newman commented on Bug JENKINS-59743
 
Re: A pipeline job hitting the timeout ending up hanging

We'll need to see your full Jenkinsfile, but if you have a try-catch make sure you handle InterruptedException to bubble it out.

Reply all
Reply to author
Forward
0 new messages