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

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

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: pipeline, xvnc-plugin
    • Labels:
      None
    • Environment:
      Jenkins: 2.0 / 2.1
      Build timeout plugin: 1.16
      Pipeline Plugin: 2.0 / 2.1
      Xvnc plugin: 1.23
    • Similar Issues:

      Description

      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
      

        Attachments

          Issue Links

            Activity

            martin_v M V created issue -
            ikedam ikedam made changes -
            Field Original Value New Value
            Component/s build-timeout-plugin [ 15530 ]
            Assignee Kohsuke Kawaguchi [ kohsuke ] Jesse Glick [ jglick ]
            martin_v M V made changes -
            Link This issue is related to JENKINS-36010 [ JENKINS-36010 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 170852 ] JNJira + In-Review [ 184067 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Link This issue duplicates JENKINS-34637 [ JENKINS-34637 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Duplicate [ 3 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: