We were bitten by this today; a PR build (on a multibranch pipeline job) started freezing – appearing to still be in progress in the UI, but not assigned to any executor, and never progressing past the node step, with this in the Jenkins system log:
Apr 23, 2019 7:36:18 AM WARNING jenkins.util.AtmostOneTaskExecutor$1 call
null
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.throttleCheckForCategoriesAllNodes(ThrottleQueueTaskDispatcher.java:283)
at hudson.plugins.throttleconcurrents.ThrottleQueueTaskDispatcher.canRunImpl(ThrottleQueueTaskDispatcher.java:256)
at hudson.plugins.throttleconcurrents.ThrottleQueueTaskDispatcher.canRun(ThrottleQueueTaskDispatcher.java:218)
at hudson.plugins.throttleconcurrents.ThrottleQueueTaskDispatcher.canRun(ThrottleQueueTaskDispatcher.java:176)
at hudson.model.Queue.getCauseOfBlockageForItem(Queue.java:1197)
at hudson.model.Queue.maintain(Queue.java:1554)
at hudson.model.Queue$1.call(Queue.java:325)
at hudson.model.Queue$1.call(Queue.java:322)
at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:108)
at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:98)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:112)
at java.lang.Thread.run(Thread.java:748)
I tried aborting and restarting it multiple times but it consistently behaved the same way; the only way we got it to build again was by commenting out the throttle block entirely. It would be marginally better if it had simply failed the build, but far better if this ConcurrentModificationException were not happening at all. Incidentially, this PR was a switch to use Scripted Pipeline due to JENKINS-45140, since Declarative Syntax didn't seem to throttle at all. |