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

Canceling a Parallel step make the build hang

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • pipeline
    • None
    • Jenkins 1.642.18.1
      Pipeline 2.1

      Issue

      Building a pipeline job with parallel steps, whenever I cancel a parallel step that waits in the Build Queue, the corresponding job hangs.

      Reproduce

      • I have a node label osx-master that contains 2 nodes
      • Each node has one executor
      • I create a pipeline script like the following
          def branches = [:] 
          branches["one"] = { 
              node('osx-master'){ 
                  echo "branch 1: here is something that happens in stage one" 
                  sh "sleep 10" 
              } 
          } 
          branches["two"] = { 
              node('osx-master'){ 
                  echo "branch 2: here is something that happens in stage one" 
                  sh "sleep 10" 
              } 
          } 
          parallel branches 
          echo "Done with build" 
      
      • I run 2 builds concurrently - for example #15 and #16
      • #15 tasks are immediately picked up from the build queue and are executed
      • #16 tasks shows up in the Build Queue
      • I cancel one of #16 tasks from the Build Queue. It disappears
      • #15 end with SUCCESS
      • #16 never ends and hangs...

      Attached logs of:

      • Queue-Executors.log: `hudson.model.Queue` and `hudson.model.Executors`
      • Pipeline.log: `org.jenkinsci.plugins.workflow.flow`, `org.jenkinsci.plugins.workflow.job` and `org.jenkinsci.plugins.workflow.support`

        1. build-history.png
          build-history.png
          12 kB
        2. build-queue.png
          build-queue.png
          26 kB
        3. build-thread-dump.png
          build-thread-dump.png
          31 kB
        4. build-console-logs.png
          build-console-logs.png
          69 kB
        5. build-steps.png
          build-steps.png
          127 kB
        6. Pipeline.log
          49 kB
        7. Queue-Executors.log
          117 kB

            jglick Jesse Glick
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: