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-console-logs.png
          69 kB
          Allan BURDAJEWICZ
        2. build-history.png
          12 kB
          Allan BURDAJEWICZ
        3. build-queue.png
          26 kB
          Allan BURDAJEWICZ
        4. build-steps.png
          127 kB
          Allan BURDAJEWICZ
        5. build-thread-dump.png
          31 kB
          Allan BURDAJEWICZ
        6. Pipeline.log
          49 kB
          Allan BURDAJEWICZ
        7. Queue-Executors.log
          117 kB
          Allan BURDAJEWICZ

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

              Created:
              Updated:
              Resolved: