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

Pipeline/Timeout/Xvnc: "timeout" with a ""wrap" inside don't time out.

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • pipeline, xvnc-plugin
    • None
    • Jenkins: 2.0 / 2.1
      Build timeout plugin: 1.16
      Pipeline Plugin: 2.0 / 2.1
      Xvnc plugin: 1.23

      This code end regular after 10 seconds, but I expect a fail after 3 seconds.

      node {
              timeout(time: 3, unit: 'SECONDS') {
                      wrap([$class: 'Xvnc']) {
                              sh "sleep 10s"
                      }
              }
      }
      

      Log:

      Started by user anonymous
      [Pipeline] node
      Running on jenkins-worker01 in /var/lib/jenkins/workspace/Test
      [Pipeline] {
      [Pipeline] timeout
      [Pipeline] {
      [Pipeline] wrap
      Starting xvnc
      [Test] $ vncserver :28 -localhost -nolisten tcp
      New 'jenkins-worker01:28 (jenkins)' desktop is jenkins-worker01:28
      Starting applications specified in /var/lib/jenkins/.vnc/xstartup
      Log file is /var/lib/jenkins/.vnc/jenkins-worker01:28.log
      [Pipeline] {
      [Pipeline] sh
      [Test] Running shell script
      + seq 1 10
      + sleep 1
      + sleep 1
      + sleep 1
      + sleep 1
      + sleep 1
      + sleep 1
      + sleep 1
      + sleep 1
      + sleep 1
      + sleep 1
      [Pipeline] }
      Terminating xvnc.
      $ vncserver -kill :28
      Killing Xvnc4 process ID 60601
      [Pipeline] // wrap
      [Pipeline] }
      [Pipeline] // timeout
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Finished: SUCCESS
      

      This code fail with a timeout after 5 seconds, instead of the expected 3 seconds:

      node {
              timeout(time: 3, unit: 'SECONDS') {
                      wrap([$class: 'Xvnc']) {
                                timeout(time: 5, unit: 'SECONDS') {
                                         sh "sleep 10s"
                                 }
                      }
              }
      }
      

      Log:

      Started by user anonymous
      [Pipeline] node
      Running on jenkins-worker01 in /var/lib/jenkins/workspace/Test
      [Pipeline] {
      [Pipeline] timeout
      [Pipeline] {
      [Pipeline] wrap
      Starting xvnc
      [Test] $ vncserver :15 -localhost -nolisten tcp
      New 'jenkins-worker01:15 (jenkins)' desktop is jenkins-worker01:15
      Starting applications specified in /var/lib/jenkins/.vnc/xstartup
      Log file is /var/lib/jenkins/.vnc/jenkins-worker01:15.log
      [Pipeline] {
      [Pipeline] timeout
      [Pipeline] {
      [Pipeline] sh
      [Test] Running shell script
      + seq 1 10
      + sleep 1
      + sleep 1
      + sleep 1
      + sleep 1
      + sleep 1
      Sending interrupt signal to process
      Terminated
      [Pipeline] }
      [Pipeline] // timeout
      [Pipeline] }
      Terminating xvnc.
      $ vncserver -kill :15
      Killing Xvnc4 process ID 60523
      [Pipeline] // wrap
      [Pipeline] }
      [Pipeline] // timeout
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code 143
      Finished: FAILURE
      

          [JENKINS-34677] Pipeline/Timeout/Xvnc: "timeout" with a ""wrap" inside don't time out.

          M V created issue -

          ikedam added a comment -

          timeout step in pipeline is not related to build-timeout-plugin.
          Removed it from component/s.

          ikedam added a comment - timeout step in pipeline is not related to build-timeout-plugin. Removed it from component/s.
          ikedam made changes -
          Component/s Original: build-timeout-plugin [ 15530 ]
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ] New: Jesse Glick [ jglick ]
          M V made changes -
          Link New: This issue is related to JENKINS-36010 [ JENKINS-36010 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 170852 ] New: JNJira + In-Review [ 184067 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]

          Jesse Glick added a comment -

          Probably the same as JENKINS-34637; root cause TBD.

          Jesse Glick added a comment - Probably the same as JENKINS-34637 ; root cause TBD.
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-34637 [ JENKINS-34637 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            jglick Jesse Glick
            martin_v M V
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: