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

Triggering the same job twice results in zombie workflow run

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: pipeline
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.610
      workflow-plugin 1.5
    • Similar Issues:

      Description

      When two workflow jobs try to trigger the same job at the same time, java.hudson.model.Queue#scheduleInternal may detect a duplicate.

      When that happens, a second instance of WaitingItem does not get created, meaning one of the workflow runs will have no listeners related to the triggered job.

      When the triggered job ends, only one workflow run will be notified and continue, the other one will stay listening forever.

      The workaround I've had to apply to deal with this is running the following in scriptler:

      Jenkins.instance.getItemByFullName(jobName)
      .builds.findAll

      {it.building}

      .each{it.execution.currentExecutions.get()
      .each

      {it.context.onFailure(new Exception())}

      }

        Attachments

          Issue Links

            Activity

            micpiekar Michal Piekarczyk created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is blocking JENKINS-25550 [ JENKINS-25550 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 121 (Web Link)" [ 12807 ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-34201 [ JENKINS-34201 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 162666 ] JNJira + In-Review [ 197025 ]
            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 is duplicated by JENKINS-34201 [ JENKINS-34201 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-34201 [ JENKINS-34201 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                micpiekar Michal Piekarczyk
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: