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

Job hangs if one of multiple triggered builds was aborted

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      I have two cases with job hanging:
      1) Parent job triggers multiple different jobs and waits for their completion. I abort some triggered job while it stays in queue. After that parent job never finished, waiting for completion.
      2) Parent job triggers multiple instances (via label factory) of one job on different slaves and waits for completion. I abort one of job while it executes on slave. Parent job hangs forever saying "Waiting for completion".

      I believe it worked correctly (in both cases parent job has failed) in some previous version.
      I've recently updated Jenkins from 1.48 to 1.532
      As well as Parametrized Trigger Plugin from 2.16 to 2.22
      And NodeLabel Parameter Plugin from 1.2.1 to 1.4

          [JENKINS-21932] Job hangs if one of multiple triggered builds was aborted

          Sergey Irisov created issue -

          ikedam added a comment -

          Sounds a issue of parameterized-trigger plugin.

          Can you always reproduce that behavior?
          Please report an example project configuration to reproduce the problem.

          ikedam added a comment - Sounds a issue of parameterized-trigger plugin. Can you always reproduce that behavior? Please report an example project configuration to reproduce the problem.
          ikedam made changes -
          Component/s Original: nodelabelparameter [ 15873 ]
          Assignee Original: Dominik Bartholdi [ domi ] New: huybrechts [ huybrechts ]

          Sergey Irisov added a comment - - edited

          I can reproduce now only first case.

          Parent job: Launcher_trigger_multiple_job.
          It triggers 2 job: Slave_job and Slave_job2.
          Slave_job was aborted while it stays in queue. And Slave_job2 successfully finished.
          Launcher job hung waiting for Slave_job.

          Jobs' configs are in attachment.

          Sergey Irisov added a comment - - edited I can reproduce now only first case. Parent job: Launcher_trigger_multiple_job. It triggers 2 job: Slave_job and Slave_job2. Slave_job was aborted while it stays in queue. And Slave_job2 successfully finished. Launcher job hung waiting for Slave_job. Jobs' configs are in attachment.
          Sergey Irisov made changes -
          Attachment New: slave2_config.xml [ 25407 ]
          Attachment New: launcher_multiple_job_config.xml [ 25408 ]
          Attachment New: slave1_config.xml [ 25409 ]

          Oleg Nenashev added a comment - - edited

          I suppose this issue and JENKINS-16679 have the same origin.
          After the initial analysis of JENKINS-16679 (I've done it several months ago; hope to find notes), I suspect that it may require a fix inside the Jenkins core.

          As a workaround, it is possible to analyze statuses of future tasks instead of sequential "wait" calls against the submitted projects list.

          Oleg Nenashev added a comment - - edited I suppose this issue and JENKINS-16679 have the same origin. After the initial analysis of JENKINS-16679 (I've done it several months ago; hope to find notes), I suspect that it may require a fix inside the Jenkins core. As a workaround, it is possible to analyze statuses of future tasks instead of sequential "wait" calls against the submitted projects list.
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-16679 [ JENKINS-16679 ]

          ikedam added a comment -

          It reproduced easily also in my environment. Amazing.
          It would require a fix in Jenkins core as @oleg_nenashev points.

          How I reproduce:

          1. Install parameterized-trigger plugin
          2. Create a node "slave1" from Manage Jenkins > Manage Nodes > New Node
            • No need to launch that node.
          3. Create a free style project "downstream1".
            • Check "Restrict where this project can be run" (this is displayed only when there are slaves) and enter "slave1" to "Label Expression"
          4. Create a free style project "downstream2".
          5. Create a free style project "upstream"
            • Add "Trigger/call builds on other projects"
              • "downstream1,downstream2" for "Projects to build"
              • Check Block until the triggered projects finish their builds
          6. Click "Build Now" of "upstream".
          7. Cancel the build of "downstream1" that should be pending.
          8. Result: "upstream" should finish, but actually does not finish.

          Environments:
          Windows 8
          Jenkins 1.532.1
          JDK 1.7.0_45
          Parameterized Trigger plugin 2.22

          ikedam added a comment - It reproduced easily also in my environment. Amazing. It would require a fix in Jenkins core as @oleg_nenashev points. How I reproduce: Install parameterized-trigger plugin Create a node "slave1" from Manage Jenkins > Manage Nodes > New Node No need to launch that node. Create a free style project "downstream1". Check "Restrict where this project can be run" (this is displayed only when there are slaves) and enter "slave1" to "Label Expression" Create a free style project "downstream2". Create a free style project "upstream" Add "Trigger/call builds on other projects" "downstream1,downstream2" for "Projects to build" Check Block until the triggered projects finish their builds Click "Build Now" of "upstream". Cancel the build of "downstream1" that should be pending. Result: "upstream" should finish, but actually does not finish. Environments: Windows 8 Jenkins 1.532.1 JDK 1.7.0_45 Parameterized Trigger plugin 2.22
          ikedam made changes -
          Assignee Original: huybrechts [ huybrechts ] New: ikedam [ ikedam ]

          ikedam added a comment -

          I found it reproduces even with only one downstream project:

          1. Install parameterized-trigger plugin
          2. Create a node "slave1" from Manage Jenkins > Manage Nodes > New Node
            • No need to launch that node.
          3. Create a free style project "downstream".
            • Check "Restrict where this project can be run" (this is displayed only when there are slaves) and enter "slave1" to "Label Expression"
          4. Create a free style project "upstream"
            • Add "Trigger/call builds on other projects"
              • "downstream" for "Projects to build"
              • Check Block until the triggered projects finish their builds
          5. Click "Build Now" of "upstream".
          6. Cancel the build of "downstream" that should be pending.
          7. Result: "upstream" should finish, but actually does not finish.

          And as long I tested, it does not reproduce with Jenkins <= 1.509.

          Jenkins result
          1.480.3 don't reproduce
          1.509.2 don't reproduce
          1.532.1 reproduce

          I should find the version of Jenkins that starts produce this problem.

          ikedam added a comment - I found it reproduces even with only one downstream project: Install parameterized-trigger plugin Create a node "slave1" from Manage Jenkins > Manage Nodes > New Node No need to launch that node. Create a free style project "downstream". Check "Restrict where this project can be run" (this is displayed only when there are slaves) and enter "slave1" to "Label Expression" Create a free style project "upstream" Add "Trigger/call builds on other projects" "downstream" for "Projects to build" Check Block until the triggered projects finish their builds Click "Build Now" of "upstream". Cancel the build of "downstream" that should be pending. Result: "upstream" should finish, but actually does not finish. And as long I tested, it does not reproduce with Jenkins <= 1.509. Jenkins result 1.480.3 don't reproduce 1.509.2 don't reproduce 1.532.1 reproduce I should find the version of Jenkins that starts produce this problem.

            Unassigned Unassigned
            cerber Sergey Irisov
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: