• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • build-blocker-plugin
    • None
    • Windows Server 2013
      Jenkins 1.609.1 LTS
      Build Blocker Plugin 1.6

      Sometimes the build blocker plugin fails with a null pointer exception. Jobs are queued first, then vanish from the queue without being built.
      Jenkins log:

      java.lang.NullPointerException
      	at hudson.plugins.buildblocker.BlockingJobsMonitor.getBlockingJob(BlockingJobsMonitor.java:85)
      	at hudson.plugins.buildblocker.BuildBlockerQueueTaskDispatcher.canRun(BuildBlockerQueueTaskDispatcher.java:80)
      	at hudson.model.Queue.isBuildBlocked(Queue.java:1110)
      	at hudson.model.Queue.maintain(Queue.java:1320)
      	at hudson.model.Queue$MaintainTask.doRun(Queue.java:2450)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
      	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      

          [JENKINS-28919] Build-Blocker-Plugin NullPointerException

          This might be related to my specific configuration: commits are pushed to the Jenkins CI and two builds are queued simultaneously (Windows build and Linux build). Both builds have a configured wait time of 60s and the same regular expression set in the build blocker field.
          The NPE only occurs in one build after the wait time has passed, the other build starts as expected. I have now changed the wait time of one job to 70s and haven't noticed a NPE for several days.

          Christoph Vogtländer added a comment - This might be related to my specific configuration: commits are pushed to the Jenkins CI and two builds are queued simultaneously (Windows build and Linux build). Both builds have a configured wait time of 60s and the same regular expression set in the build blocker field. The NPE only occurs in one build after the wait time has passed, the other build starts as expected. I have now changed the wait time of one job to 70s and haven't noticed a NPE for several days.

          Elmar Fasel added a comment -

          I experienced the same issue after updating jenkins to v1.618 and build-blocker-plugin to v1.7.

          For me it works again after changing the build blocker plugin configuration of the failing job.
          I see the following difference in the configuration XML:

              <hudson.plugins.buildblocker.BuildBlockerProperty plugin="build-blocker-plugin@1.4.1">
                <useBuildBlocker>true</useBuildBlocker>
                <blockingJobs>cm-dev-.*-build
              </hudson.plugins.buildblocker.BuildBlockerProperty>
          
              <hudson.plugins.buildblocker.BuildBlockerProperty plugin="build-blocker-plugin@1.7">
                <useBuildBlocker>true</useBuildBlocker>
                <blockLevel>GLOBAL</blockLevel>
                <scanQueueFor>ALL</scanQueueFor>
                <blockingJobs>cm-dev-.*-build
              </hudson.plugins.buildblocker.BuildBlockerProperty>
          

          Maybe the newer build-blocker-plugin version assumes existence of attributes which might be missing after an upgrade from an older version.

          Elmar Fasel added a comment - I experienced the same issue after updating jenkins to v1.618 and build-blocker-plugin to v1.7. For me it works again after changing the build blocker plugin configuration of the failing job. I see the following difference in the configuration XML: <hudson.plugins.buildblocker.BuildBlockerProperty plugin="build-blocker-plugin@1.4.1"> <useBuildBlocker>true</useBuildBlocker> <blockingJobs>cm-dev-.*-build </hudson.plugins.buildblocker.BuildBlockerProperty> <hudson.plugins.buildblocker.BuildBlockerProperty plugin="build-blocker-plugin@1.7"> <useBuildBlocker>true</useBuildBlocker> <blockLevel>GLOBAL</blockLevel> <scanQueueFor>ALL</scanQueueFor> <blockingJobs>cm-dev-.*-build </hudson.plugins.buildblocker.BuildBlockerProperty> Maybe the newer build-blocker-plugin version assumes existence of attributes which might be missing after an upgrade from an older version.

            Unassigned Unassigned
            gordin Christoph Vogtländer
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: