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

hudson.util.RobustReflectionConverter.marshallField throws ConcurrentModificationException

    Details

    • Similar Issues:

      Description

      Started by upstream project "project2" build number 383
      FATAL: Failed to serialize hudson.model.Actionable#actions for class hudson.maven.MavenModuleSetBuild
      java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.maven.MavenModuleSetBuild
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:164)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:135)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:130)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:120)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:94)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
      	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:98)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:38)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:840)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:829)
      	at com.thoughtworks.xstream.XStream.toXML(XStream.java:804)
      	at hudson.XmlFile.write(XmlFile.java:165)
      	at org.jvnet.hudson.plugins.DownstreamBuildViewUpdateListener.save(DownstreamBuildViewUpdateListener.java:100)
      	at org.jvnet.hudson.plugins.DownstreamBuildViewUpdateListener.onStarted(DownstreamBuildViewUpdateListener.java:88)
      	at org.jvnet.hudson.plugins.DownstreamBuildViewUpdateListener.onStarted(DownstreamBuildViewUpdateListener.java:48)
      	at hudson.model.listeners.RunListener.fireStarted(RunListener.java:139)
      	at hudson.model.Run.run(Run.java:1236)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:306)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      Caused by: java.lang.RuntimeException: Failed to serialize org.jvnet.hudson.plugins.AbstractDownstreamBuildViewAction#downstreamBuilds for class org.jvnet.hudson.plugins.DownstreamBuildViewAction
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:164)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:135)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:130)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:120)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:94)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
      	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
      	at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:172)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:160)
      	... 21 more
      Caused by: java.util.ConcurrentModificationException
      	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
      	at java.util.HashMap$EntryIterator.next(HashMap.java:834)
      	at java.util.HashMap$EntryIterator.next(HashMap.java:832)
      	at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:54)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:172)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:160)
      	... 35 more
      

        Attachments

          Issue Links

            Activity

            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            Reassigning to the right plugin. I haven't looked at the code, but I recommend the use of ConcurrentHashMap instead of a plain HashMap to avoid concurrent update problems like this.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - Reassigning to the right plugin. I haven't looked at the code, but I recommend the use of ConcurrentHashMap instead of a plain HashMap to avoid concurrent update problems like this.
            Hide
            olivergondza Oliver Gondža added a comment -

            This does not seem resolved to me. No indication associated with the issue nor have I found one in git. I have reproduced with 2.7.4.4 (jenkins.ci.cloudbees.com) with xstream 1.4.7-jenkins-1, xvnc plugin 1.23.

            FATAL: Failed to serialize hudson.plugins.xvnc.Xvnc$DescriptorImpl#allocators for class hudson.plugins.xvnc.Xvnc$DescriptorImpl
            java.lang.RuntimeException: Failed to serialize hudson.plugins.xvnc.Xvnc$DescriptorImpl#allocators for class hudson.plugins.xvnc.Xvnc$DescriptorImpl
            	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
            	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
            	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
            	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
            	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
            	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
            	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
            	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
            	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
            	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
            	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
            	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
            	at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
            	at hudson.XmlFile.write(XmlFile.java:178)
            	at hudson.model.Descriptor.save(Descriptor.java:864)
            	at hudson.plugins.xvnc.DisplayAllocator.save(DisplayAllocator.java:32)
            	at hudson.plugins.xvnc.DisplayAllocator.allocate(DisplayAllocator.java:51)
            	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
            	at hudson.plugins.xvnc.Xvnc.setUp(Xvnc.java:94)
            	at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:145)
            	at hudson.model.Build$BuildExecution.doRun(Build.java:156)
            	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:544)
            	at hudson.model.Run.execute(Run.java:1741)
            	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            	at hudson.model.ResourceController.execute(ResourceController.java:98)
            	at hudson.model.Executor.run(Executor.java:410)
            Caused by: java.util.ConcurrentModificationException
            	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
            	at java.util.HashMap$EntryIterator.next(HashMap.java:1463)
            	at java.util.HashMap$EntryIterator.next(HashMap.java:1461)
            	at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:75)
            	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
            	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
            	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
            	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
            	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
            	... 25 more
            

            This aborted build early in the process.

            Show
            olivergondza Oliver Gondža added a comment - This does not seem resolved to me. No indication associated with the issue nor have I found one in git. I have reproduced with 2.7.4.4 (jenkins.ci.cloudbees.com) with xstream 1.4.7-jenkins-1, xvnc plugin 1.23. FATAL: Failed to serialize hudson.plugins.xvnc.Xvnc$DescriptorImpl#allocators for class hudson.plugins.xvnc.Xvnc$DescriptorImpl java.lang.RuntimeException: Failed to serialize hudson.plugins.xvnc.Xvnc$DescriptorImpl#allocators for class hudson.plugins.xvnc.Xvnc$DescriptorImpl at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015) at com.thoughtworks.xstream.XStream.toXML(XStream.java:988) at hudson.XmlFile.write(XmlFile.java:178) at hudson.model.Descriptor.save(Descriptor.java:864) at hudson.plugins.xvnc.DisplayAllocator.save(DisplayAllocator.java:32) at hudson.plugins.xvnc.DisplayAllocator.allocate(DisplayAllocator.java:51) at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104) at hudson.plugins.xvnc.Xvnc.setUp(Xvnc.java:94) at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:145) at hudson.model.Build$BuildExecution.doRun(Build.java:156) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:544) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429) at java.util.HashMap$EntryIterator.next(HashMap.java:1463) at java.util.HashMap$EntryIterator.next(HashMap.java:1461) at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:75) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252) ... 25 more This aborted build early in the process.

              People

              • Assignee:
                Unassigned
                Reporter:
                hhuynh hhuynh
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: