Triggering the same job twice results in zombie workflow run

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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())}

      }

            Assignee:
            Jesse Glick
            Reporter:
            Michal Piekarczyk
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: