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

NullpointerException in AdvancedQueueSorterQueueListener and AdvancedQueueSorter on startup

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      NullPointerExceptions during startup. They are caught by calling class, so not major but still, we do not want to log warnings for normal things that can happen.

      There is a null check in AdvancedQueueSorterQueueListener.onEnterBuildable() but not in the other three event methods in the class.

      In AdvancedQueueSorter I see newer code that might have fixed this?

      Sep 29, 2014 10:13:58 AM hudson.model.Queue$BlockedItem enter
      WARNING: QueueListener failed while processing hudson.model.Queue$BlockedItem:hudson.model.FreeStyleProject@470c5677[alo_integration_build]:471
      java.lang.NullPointerException
      at jenkins.advancedqueue.sorter.AdvancedQueueSorterQueueListener.onEnterBlocked(AdvancedQueueSorterQueueListener.java:61)
      at hudson.model.Queue$BlockedItem.enter(Queue.java:1712)
      at hudson.model.Queue.load(Queue.java:372)
      at hudson.model.Queue.init(Queue.java:2075)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:105)
      at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:169)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      at jenkins.model.Jenkins$7.runTask(Jenkins.java:904)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      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:724)

      Sep 29, 2014 11:05:45 AM hudson.model.Queue$LeftItem enter
      WARNING: QueueListener failed while processing hudson.model.Queue$LeftItem:hudson.model.FreeStyleProject@185eede4[Build-tivotool_Chips]:495
      java.lang.NullPointerException
      at jenkins.advancedqueue.sorter.AdvancedQueueSorter.onLeft(AdvancedQueueSorter.java:131)
      at jenkins.advancedqueue.sorter.AdvancedQueueSorterQueueListener.onLeft(AdvancedQueueSorterQueueListener.java:47)
      at hudson.model.Queue$LeftItem.enter(Queue.java:1884)
      at hudson.model.Queue.onStartExecuting(Queue.java:914)
      at hudson.model.Executor.run(Executor.java:207)

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: emsa23
          Path:
          src/main/java/jenkins/advancedqueue/sorter/AdvancedQueueSorterQueueListener.java
          http://jenkins-ci.org/commit/priority-sorter-plugin/9dd205200bb77e3d2f4d5e53ddb97e33caf9fcb1
          Log:
          Merge pull request #21 from christ66/ZD-21057

          Fixed NPE when onEnterBlocked() is called during startup.

          A NPE can happen if the throttle concurrent plugin is enabled and the queue is blocked.

          Relates to JENKINS-24911

          Compare: https://github.com/jenkinsci/priority-sorter-plugin/compare/41e2edc0cfb9...9dd205200bb7

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: emsa23 Path: src/main/java/jenkins/advancedqueue/sorter/AdvancedQueueSorterQueueListener.java http://jenkins-ci.org/commit/priority-sorter-plugin/9dd205200bb77e3d2f4d5e53ddb97e33caf9fcb1 Log: Merge pull request #21 from christ66/ZD-21057 Fixed NPE when onEnterBlocked() is called during startup. A NPE can happen if the throttle concurrent plugin is enabled and the queue is blocked. Relates to JENKINS-24911 Compare: https://github.com/jenkinsci/priority-sorter-plugin/compare/41e2edc0cfb9...9dd205200bb7
          Hide
          emsa23 Magnus Sandberg added a comment -

          Should be fixed with 2.9

          Show
          emsa23 Magnus Sandberg added a comment - Should be fixed with 2.9

            People

            Assignee:
            emsa23 Magnus Sandberg
            Reporter:
            marcus_phi Marcus Philip
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: