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

NullPointerException in AdvancedQueueSorter

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      Our Jenkins server seems to get locked at some point in time.
      Many Jobs are in starvation, waiting for nodes with certain labels/label combinations.
      (i.e. Waiting for next available executor on ...)

      The log shows a lot of these entries:

      Apr 15, 2015 3:44:25 PM SEVERE hudson.triggers.SafeTimerTask run
      
      Timer task hudson.model.Queue$MaintainTask@5d00189f failed
      java.lang.NullPointerException
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:99)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:81)
      	at java.util.TimSort.countRunAndMakeAscending(TimSort.java:329)
      	at java.util.TimSort.sort(TimSort.java:189)
      	at java.util.TimSort.sort(TimSort.java:173)
      	at java.util.Arrays.sort(Arrays.java:659)
      	at java.util.Collections.sort(Collections.java:217)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter.sortBuildableItems(AdvancedQueueSorter.java:81)
      	at hudson.model.Queue.maintain(Queue.java:1135)
      	at hudson.model.Queue$MaintainTask.doRun(Queue.java:2197)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
      	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)
      
      Feed
      

      and also some entries like

      java.lang.NullPointerException
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorter.onLeft(AdvancedQueueSorter.java:157)
      	at jenkins.advancedqueue.sorter.AdvancedQueueSorterQueueListener.onLeft(AdvancedQueueSorterQueueListener.java:47)
      	at hudson.model.Queue$LeftItem.enter(Queue.java:2087)
      	at hudson.model.Queue.onStartExecuting(Queue.java:924)
      	at hudson.model.Executor.run(Executor.java:209)
      	at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)
      

      We see theses issues since we updated the Priority Sorter Plugin to version 2.11 (from version 2.9)

      Downgrading to version 2.9 seems to work fine!

        Attachments

          Activity

          tom_ghyselinck Tom Ghyselinck created issue -
          tom_ghyselinck Tom Ghyselinck made changes -
          Field Original Value New Value
          Component/s prioritysorter-plugin [ 15771 ]
          Component/s core [ 15593 ]
          Assignee Magnus Sandberg [ emsa23 ]
          Description Hi,

          Our Jenkins server seems to get locked at some point in time.
          Many Jobs are in _starvation_, waiting for nodes with certain _labels_/_label combinations_.
          (i.e. _Waiting for next available executor on ..._)

          The log shows a lot of these entries:
          {code}
          Apr 15, 2015 3:44:25 PM SEVERE hudson.triggers.SafeTimerTask run

          Timer task hudson.model.Queue$MaintainTask@5d00189f failed
          java.lang.NullPointerException
          at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:99)
          at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:81)
          at java.util.TimSort.countRunAndMakeAscending(TimSort.java:329)
          at java.util.TimSort.sort(TimSort.java:189)
          at java.util.TimSort.sort(TimSort.java:173)
          at java.util.Arrays.sort(Arrays.java:659)
          at java.util.Collections.sort(Collections.java:217)
          at jenkins.advancedqueue.sorter.AdvancedQueueSorter.sortBuildableItems(AdvancedQueueSorter.java:81)
          at hudson.model.Queue.maintain(Queue.java:1135)
          at hudson.model.Queue$MaintainTask.doRun(Queue.java:2197)
          at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
          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)

          Feed
          {code}
          Hi,

          Our Jenkins server seems to get locked at some point in time.
          Many Jobs are in _starvation_, waiting for nodes with certain _labels_/_label combinations_.
          (i.e. _Waiting for next available executor on ..._)

          The log shows a lot of these entries:
          {code}
          Apr 15, 2015 3:44:25 PM SEVERE hudson.triggers.SafeTimerTask run

          Timer task hudson.model.Queue$MaintainTask@5d00189f failed
          java.lang.NullPointerException
          at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:99)
          at jenkins.advancedqueue.sorter.AdvancedQueueSorter$2.compare(AdvancedQueueSorter.java:81)
          at java.util.TimSort.countRunAndMakeAscending(TimSort.java:329)
          at java.util.TimSort.sort(TimSort.java:189)
          at java.util.TimSort.sort(TimSort.java:173)
          at java.util.Arrays.sort(Arrays.java:659)
          at java.util.Collections.sort(Collections.java:217)
          at jenkins.advancedqueue.sorter.AdvancedQueueSorter.sortBuildableItems(AdvancedQueueSorter.java:81)
          at hudson.model.Queue.maintain(Queue.java:1135)
          at hudson.model.Queue$MaintainTask.doRun(Queue.java:2197)
          at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
          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)

          Feed
          {code}

          and also some entries like
          {code}
          java.lang.NullPointerException
          at jenkins.advancedqueue.sorter.AdvancedQueueSorter.onLeft(AdvancedQueueSorter.java:157)
          at jenkins.advancedqueue.sorter.AdvancedQueueSorterQueueListener.onLeft(AdvancedQueueSorterQueueListener.java:47)
          at hudson.model.Queue$LeftItem.enter(Queue.java:2087)
          at hudson.model.Queue.onStartExecuting(Queue.java:924)
          at hudson.model.Executor.run(Executor.java:209)
          at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)
          {code}

          We see theses issues since we updated the [Priority Sorter Plugin|https://wiki.jenkins-ci.org/display/JENKINS/Priority+Sorter+Plugin] to _version 2.11_ (from _version 2.9_)

          Downgrading to _version 2.9_ seems to work fine!
          Environment Jenkins 1.596.2 LTS Jenkins 1.596.2 LTS
          Priority Sorter plugin 2.11
          emsa23 Magnus Sandberg made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          mwebber Matthew Webber made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          danielbeck Daniel Beck made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 162556 ] JNJira + In-Review [ 208689 ]

            People

            Assignee:
            emsa23 Magnus Sandberg
            Reporter:
            tom_ghyselinck Tom Ghyselinck
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: