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

Build-Blocker-Plugin blocks on builds queued leading to deadlock

      Assume two projects that never shall be build in parallel. You may build project A, then project B or vice versa, but never project A and B together.
      In Project A you define project B as blocker.
      In Project B you define project A as blocker.

      All will be fine:
      Project A builds, Project B is blocked.
      Project B builds, Project A is blocked.

      ... until when Project A is queued, because no available slots to build, and then Project B is queued to. Now Project A blocks Project B, while Project B blocks Project A. Both will never be build! Cause:
      "Build-Blocker-Plugin" does not only take running projects in to account to block other projects, it takes the queue too! This leads to deadlocks as soon as both projects are queued. The plugin should only take running projects into account blocking other projects.

          [JENKINS-28513] Build-Blocker-Plugin blocks on builds queued leading to deadlock

          Thomas Schweikle created issue -

          Lars Vateman added a comment -

          I had to downgrade to Jenkins 1.608 to make it work again. Something in 1.609 or 1.610 must have broken it.

          Lars Vateman added a comment - I had to downgrade to Jenkins 1.608 to make it work again. Something in 1.609 or 1.610 must have broken it.

          I ran into this with the current stable release, v1.609-1. I can confirm that downgrading fixes the problem for me. I tested with v1.596.3 (works), v1.608 (works) and v1.617 (still broken).

          Kenneth Pronovici added a comment - I ran into this with the current stable release, v1.609-1. I can confirm that downgrading fixes the problem for me. I tested with v1.596.3 (works), v1.608 (works) and v1.617 (still broken).

          marlene cote added a comment -

          is there a work around for this?? It is a major stopper for us.

          marlene cote added a comment - is there a work around for this?? It is a major stopper for us.
          marlene cote made changes -
          Labels Original: blocking New: blocking queue

          Daniel Beck added a comment -

          There may be a fix in 1.618 (it's for JENKINS-28926 but it looks similar).

          Daniel Beck added a comment - There may be a fix in 1.618 (it's for JENKINS-28926 but it looks similar).

          We just recently (like yesterday) upgraded to the latest LTS edition (1.609.1) and discovered this bug exists there as well.

          Downgrading to an older Jenkins version is not an option for us as we've already migrated all of our production servers to the new version and it would be significant effort to do so. However, seeing as how this bug is debilitating (ie: completely blocks dozens of jobs, affecting hundreds more that depend on them, thus affecting many different development teams) I would appreciate any feedback that would allow us to work around or fix the problem asap.

          Really, any input from anyone would be helpful!

          Kevin Phillips added a comment - We just recently (like yesterday) upgraded to the latest LTS edition (1.609.1) and discovered this bug exists there as well. Downgrading to an older Jenkins version is not an option for us as we've already migrated all of our production servers to the new version and it would be significant effort to do so. However, seeing as how this bug is debilitating (ie: completely blocks dozens of jobs, affecting hundreds more that depend on them, thus affecting many different development teams) I would appreciate any feedback that would allow us to work around or fix the problem asap. Really, any input from anyone would be helpful!

          NOTE: It appears the maintainer of this plugin is aware that deadlocks are potentially (or, dare I say guaranteed) when using this plugin. There is a TODO on the plugin information page stating just that:

          https://wiki.jenkins-ci.org/display/JENKINS/Build+Blocker+Plugin

          I am concerned that this may indicate a pre-existing bug that somehow has just been exploited or exacerbated in some way to changes to the Jenkins core. We never had this problem prior to our upgrade, but we were using a very old version of the core (1.532.3) so it may be hard to track down which change to which version may be the culprit.

          Kevin Phillips added a comment - NOTE: It appears the maintainer of this plugin is aware that deadlocks are potentially (or, dare I say guaranteed) when using this plugin. There is a TODO on the plugin information page stating just that: https://wiki.jenkins-ci.org/display/JENKINS/Build+Blocker+Plugin I am concerned that this may indicate a pre-existing bug that somehow has just been exploited or exacerbated in some way to changes to the Jenkins core. We never had this problem prior to our upgrade, but we were using a very old version of the core (1.532.3) so it may be hard to track down which change to which version may be the culprit.

          Szymon Stasik added a comment -

          actually the plugin is unusable while excluding checks is being done on both 'in queue'/'building' state after any job has been put to the queue - the deadlock is rather inevitable for any generic rule.

          Szymon Stasik added a comment - actually the plugin is unusable while excluding checks is being done on both 'in queue'/'building' state after any job has been put to the queue - the deadlock is rather inevitable for any generic rule.

          ciekawy
          My thoughts exactly.

          Kevin Phillips added a comment - ciekawy My thoughts exactly.

            dmone Denis Mone
            tps800 Thomas Schweikle
            Votes:
            14 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved: