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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            fxsp2 Felix Sperling added a comment - - edited

            Problem is appearing in v1.654
            Seems like 1.651.1 and 1.651.2 are also affected.

            Show
            fxsp2 Felix Sperling added a comment - - edited Problem is appearing in v1.654 Seems like 1.651.1 and 1.651.2 are also affected.
            Hide
            puneeth_n Puneeth Nanjundaswamy added a comment -

            Any update on this? :/

            Jenkins: 2.7.1
            Build Blocker Plugin: 1.7.3

            Show
            puneeth_n Puneeth Nanjundaswamy added a comment - Any update on this? :/ Jenkins: 2.7.1 Build Blocker Plugin: 1.7.3
            Hide
            malavikac malavika chintapanti added a comment - - edited

            I am also facing same issue. version of plugin-1.7.3 , Jenkins-2.19.3
            Setting: block on node level = true
            check buildable queued builds = true
            Blocking Jobs = .*
            Two jobs keep blocking each other if these are queued.
            There should be some way it resolves automatically.

            Show
            malavikac malavika chintapanti added a comment - - edited I am also facing same issue. version of plugin-1.7.3 , Jenkins-2.19.3 Setting: block on node level = true check buildable queued builds = true Blocking Jobs = .* Two jobs keep blocking each other if these are queued. There should be some way it resolves automatically.
            Hide
            asafm Asaf M added a comment -

            Happens to me as well:

            Jan 05, 2017 9:12:17 AM hudson.triggers.SafeTimerTask run
            SEVERE: Timer task hudson.model.Queue$MaintainTask@63703c8 failed
            java.lang.NullPointerException
                    at hudson.plugins.buildblocker.BlockingJobsMonitor.checkNodeForQueueEntries(BlockingJobsMonitor.java:108)
                    at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.checkAccordingToProperties(BuildBlockerQueueTaskDispatcher.java:171)
                    at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.checkForBlock(BuildBlockerQueueTaskDispatcher.java:127)
                    at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.canTake(BuildBlockerQueueTaskDispatcher.java:110)
                    at hudson.model.Queue$JobOffer.canTake(Queue.java:258)
                    at hudson.model.Queue.maintain(Queue.java:1519)
                    at hudson.model.Queue$MaintainTask.doRun(Queue.java:2709)
                    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)
                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
                    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
                    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
                    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                    at java.lang.Thread.run(Thread.java:745)
            

            Jenkins version 2.15

            Show
            asafm Asaf M added a comment - Happens to me as well: Jan 05, 2017 9:12:17 AM hudson.triggers.SafeTimerTask run SEVERE: Timer task hudson.model.Queue$MaintainTask@63703c8 failed java.lang.NullPointerException at hudson.plugins.buildblocker.BlockingJobsMonitor.checkNodeForQueueEntries(BlockingJobsMonitor.java:108) at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.checkAccordingToProperties(BuildBlockerQueueTaskDispatcher.java:171) at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.checkForBlock(BuildBlockerQueueTaskDispatcher.java:127) at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.canTake(BuildBlockerQueueTaskDispatcher.java:110) at hudson.model.Queue$JobOffer.canTake(Queue.java:258) at hudson.model.Queue.maintain(Queue.java:1519) at hudson.model.Queue$MaintainTask.doRun(Queue.java:2709) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang. Thread .run( Thread .java:745) Jenkins version 2.15
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            https://github.com/jenkinsci/build-blocker-plugin/pull/9 is an attempt to fix that, but AFAIK there is no active maintainer

            Show
            oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/build-blocker-plugin/pull/9 is an attempt to fix that, but AFAIK there is no active maintainer

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tps800 Thomas Schweikle
              Votes:
              14 Vote for this issue
              Watchers:
              20 Start watching this issue

                Dates

                Created:
                Updated: