Skip to content

[JENKINS-18775] [XStream] ConcurrentModificationException from DefaultConverterLookup #14741

Description

@jenkins-infra-bot

A user reported a hung Jenkins instance displaying an error:

org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException 
	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246) 
	at jenkins.InitReactorRunner.run(InitReactorRunner.java:43) 
	at jenkins.model.Jenkins.executeReactor(Jenkins.java:904) 
	at jenkins.model.Jenkins.(Jenkins.java:804) 
	at hudson.model.Hudson.(Hudson.java:81) 
	at hudson.model.Hudson.(Hudson.java:77) 
	at hudson.WebAppMain$2.run(WebAppMain.java:214) 
Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException 
	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:124) 
	at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184) 
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) 
	at jenkins.model.Jenkins$7.runTask(Jenkins.java:893) 
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) 
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) 
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 
	at java.lang.Thread.run(Thread.java:722) 
Caused by: java.lang.reflect.InvocationTargetException 
	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:601) 
	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120) 
... 8 more 
Caused by: java.util.ConcurrentModificationException 
	at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1115) 
	at java.util.TreeMap$KeyIterator.next(TreeMap.java:1169) 
	at com.thoughtworks.xstream.core.util.PrioritizedList$PrioritizedItemIterator.next(PrioritizedList.java:91) 
	at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:55) 
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:56)

Seems that DefaultConverterLookup is failing to synchronize access to its converters field; probably another thread was calling registerConverter in the middle of this loop.


Originally reported by jglick, imported from: [XStream] ConcurrentModificationException from DefaultConverterLookup
  • assignee: jglick
  • status: Resolved
  • priority: Major
  • component(s): core
  • label(s): 1.509.4-fixed, threads, xstream
  • resolution: Fixed
  • resolved: 2013-08-26T15:24:57+00:00
  • votes: 0
  • watchers: 4
  • imported: 2025-11-24
Raw content of original issue

A user reported a hung Jenkins instance displaying an error:

org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException 
	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246) 
	at jenkins.InitReactorRunner.run(InitReactorRunner.java:43) 
	at jenkins.model.Jenkins.executeReactor(Jenkins.java:904) 
	at jenkins.model.Jenkins.<init>(Jenkins.java:804) 
	at hudson.model.Hudson.<init>(Hudson.java:81) 
	at hudson.model.Hudson.<init>(Hudson.java:77) 
	at hudson.WebAppMain$2.run(WebAppMain.java:214) 
Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException 
	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:124) 
	at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184) 
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) 
	at jenkins.model.Jenkins$7.runTask(Jenkins.java:893) 
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) 
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) 
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 
	at java.lang.Thread.run(Thread.java:722) 
Caused by: java.lang.reflect.InvocationTargetException 
	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:601) 
	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120) 
... 8 more 
Caused by: java.util.ConcurrentModificationException 
	at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1115) 
	at java.util.TreeMap$KeyIterator.next(TreeMap.java:1169) 
	at com.thoughtworks.xstream.core.util.PrioritizedList$PrioritizedItemIterator.next(PrioritizedList.java:91) 
	at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:55) 
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:56)

Seems that DefaultConverterLookup is failing to synchronize access to its converters field; probably another thread was calling registerConverter in the middle of this loop.

  • environment: 1.516; JDK 7u10; Linux

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions