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

ConcurrentModificationException in getThrottledPipelineRunsForCategory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
    • Similar Issues:
    • Released As:
      2.0.2

      Description

      I started two builds of a pipeline job which uses the throttle step against a category. The category is configured to permit a maximum of one build at a time. The second build hit the throttled node step, waited for somewhere around 30–40 minutes, and then started executing anyway, despite the first build not having exited the throttled node step yet. I found this in my Jenkins log:

      SEVERE: Timer task hudson.model.Queue$MaintainTask@63d577c failed
      java.util.ConcurrentModificationException
      	at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1211)
      	at java.util.TreeMap$EntryIterator.next(TreeMap.java:1247)
      	at java.util.TreeMap$EntryIterator.next(TreeMap.java:1242)
      	at hudson.plugins.throttleconcurrents.ThrottleJobProperty.getThrottledPipelineRunsForCategory(ThrottleJobProperty.java:316)
      	at hudson.plugins.throttleconcurrents.ThrottleQueueTaskDispatcher.throttleCheckForCategoriesOnNode(ThrottleQueueTaskDispatcher.java:132)
      	at hudson.plugins.throttleconcurrents.ThrottleQueueTaskDispatcher.canTakeImpl(ThrottleQueueTaskDispatcher.java:101)
      	at hudson.plugins.throttleconcurrents.ThrottleQueueTaskDispatcher.canTake(ThrottleQueueTaskDispatcher.java:55)
      	at hudson.model.queue.QueueTaskDispatcher.canTake(QueueTaskDispatcher.java:102)
      	at hudson.model.Queue$JobOffer.getCauseOfBlockage(Queue.java:273)
      	at hudson.model.Queue.maintain(Queue.java:1597)
      	at hudson.model.Queue$MaintainTask.doRun(Queue.java:2833)
      	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
      	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
      	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:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

        Attachments

          Activity

            People

            Assignee:
            basil Basil Crow
            Reporter:
            haw777 Christopher Head
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: