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

Jenkins not scheduling any jobs after upgrade to Priority Sorter 3.0 but giving exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: prioritysorter-plugin
    • Labels:
      None
    • Environment:
      Priority Sorter 3.0, CloudBees Folder 4.7
      Jenkins 1.612
      running under Tomcat 8 on JDK 1.8.45 64Bit, Windows Server 2008
    • Similar Issues:

      Description

      After upgrade to Priority Sorter 3.0 and defining the new Priority Groups Jenkins doesn't schedule any more jobs but just throws NPE:

      May 04, 2015 8:08:10 AM SEVERE hudson.triggers.SafeTimerTask run
      
      Timer task hudson.model.Queue$MaintainTask@eccba45 failed
      java.lang.NullPointerException
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:80)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:76)
      	at java.util.TimSort.countRunAndMakeAscending(TimSort.java:351)
      	at java.util.TimSort.sort(TimSort.java:216)
      	at java.util.Arrays.sort(Arrays.java:1512)
      	at java.util.ArrayList.sort(ArrayList.java:1454)
      	at java.util.Collections.sort(Collections.java:175)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter.sortBuildableItems(AdvancedQueueSorter.java:76)
      	at hudson.model.Queue.maintain(Queue.java:1342)
      	at hudson.model.Queue$MaintainTask.doRun(Queue.java:2457)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Priority Sorter Log itself looks very much normal and priorities seem to be assigned as expected. There are no exceptions in that log:

      [...]
      New Item: Id: 20542, JobName: XXX-Sync-Rsync-Repository with ..., jobGroupId: 2, reason: <none>, priority: 1, weight: 1.0, status: WAITING
        Evaluating JobGroup [0] ...
        Evaluating JobGroup [1] ...
        Evaluating JobGroup [2] ...
            Evaluating strategies ...
              Evaluating strategy [Job Triggered by a Upstream Build] ...
              Evaluating strategy [Take the priority from Property on the Job] ...
            No applicable strategy - Using JobGroup default
      
      May 04, 2015 8:07:02 AM FINE jenkins.advancedqueue.ItemTransitionLogger logBuilableItem
      
      Buildable: Id: 20542, JobName: ***-Sync-Rsync-Repository with ***, jobGroupId: 2, reason: <none>, priority: 1, weight: 1.0, status: BUILDABLE
      
      May 04, 2015 8:11:02 AM FINER PrioritySorter.Queue.Items
      
      New Item: Id: 20543, JobName: ADMIN_***_Install_RTS_***-slave8, jobGroupId: 6, reason: <none>, priority: 3, weight: 3.0, status: WAITING
        Evaluating JobGroup [0] ...
        Evaluating JobGroup [1] ...
        Evaluating JobGroup [2] ...
        Evaluating JobGroup [3] ...
        Evaluating JobGroup [4] ...
        Evaluating JobGroup [5] ...
            Checking for Job Property inclusion for [*** Unit Tests]...
            Checking for Cloudbees Folder inclusion ...
              Evaluating Folder [ADMIN_***_Install_RTS] ...
            No match ...
        Evaluating JobGroup [6] ...
            Evaluating strategies ...
              Evaluating strategy [Job Triggered by a Upstream Build] ...
              Evaluating strategy [Take the priority from Property on the Job] ...
            No applicable strategy - Using JobGroup default
      [...]
      

      Downgrade to Priority Sorter 2.12 removes the problem.

        Attachments

          Activity

            People

            • Assignee:
              emsa23 Magnus Sandberg
              Reporter:
              klou Kurt
            • Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: