-
Bug
-
Resolution: Fixed
-
Major
... WARNING hudson.model.RunMap retrieve could not load .../jobs/.../builds/2013-11-19_... hudson.util.IOException2: Unable to read .../jobs/.../builds/2013-11-19_.../build.xml at hudson.XmlFile.unmarshal(XmlFile.java:166) at hudson.model.Run.reload(Run.java:320) at hudson.model.Run.<init>(Run.java:309) at hudson.model.AbstractBuild.<init>(AbstractBuild.java:187) at hudson.model.Build.<init>(Build.java:103) at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:41) at ... Caused by: com.thoughtworks.xstream.converters.ConversionException: Invalid reference ---- Debugging information ---- reference : ../hudson.plugins.disk__usage.BuildDiskUsageAction/build/actions/org.jvnet.hudson.plugins.DownstreamBuildViewAction class : java.util.concurrent.CopyOnWriteArrayList required-type : java.util.concurrent.CopyOnWriteArrayList converter-type : hudson.util.RobustCollectionConverter path : /build/actions/org.jvnet.hudson.plugins.DownstreamBuildViewAction line number : 143 class[1] : hudson.model.FreeStyleBuild converter-type[1] : hudson.util.RobustReflectionConverter version : not available ------------------------------- at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:57) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71) at hudson.util.RobustCollectionConverter.populateCollection(RobustCollectionConverter.java:85) at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:61) at hudson.util.RobustCollectionConverter.unmarshal(RobustCollectionConverter.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:357) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:290) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:229) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061) at hudson.util.XStream2.unmarshal(XStream2.java:113) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045) at hudson.XmlFile.unmarshal(XmlFile.java:164) ... 132 more
while trying to load
<?xml version='1.0' encoding='UTF-8'?> <build> <actions> ... <hudson.plugins.disk__usage.BuildDiskUsageAction plugin="disk-usage@0.23"> <buildDiskUsage>...</buildDiskUsage> <build class="build"> <actions> ... <hudson.plugins.disk__usage.BuildDiskUsageAction reference="../../.."/> <org.jvnet.hudson.plugins.DownstreamBuildViewAction plugin="downstream-buildview@1.8"> <build class="build" reference="../../.."/> <downstreamBuilds class="concurrent-hash-map">... </org.jvnet.hudson.plugins.DownstreamBuildViewAction> ... </actions> ... </build> </hudson.plugins.disk__usage.BuildDiskUsageAction> <org.jvnet.hudson.plugins.DownstreamBuildViewAction reference="../hudson.plugins.disk__usage.BuildDiskUsageAction/build/actions/org.jvnet.hudson.plugins.DownstreamBuildViewAction"/> <hudson.tasks.Fingerprinter_-FingerprintAction reference="../hudson.plugins.disk__usage.BuildDiskUsageAction/build/actions/hudson.tasks.Fingerprinter_-FingerprintAction"/> ... <org.jvnet.hudson.plugins.DownstreamBuildViewAction plugin="downstream-buildview@1.8"> <build class="build" reference="../../.."/> <downstreamBuilds class="concurrent-hash-map">... </actions> ... <scm class="hudson.scm.NullChangeLogParser" reference="../actions/hudson.plugins.disk__usage.BuildDiskUsageAction/build/scm"/> <culprits class="com.google.common.collect.EmptyImmutableSortedSet" reference="../actions/hudson.plugins.disk__usage.BuildDiskUsageAction/build/culprits"/> </build>
It is very dangerous to serialize a Run-valued field as part of an action. You should make this field transient and implement RunAction2 (1.509.4+ if I recall correctly). Then the BuildDiskUsageAction constructor need not take AbstractBuild build; the build will be set when the action is attached immediately after construction (DiskUsageUtil.calculateDiskUsageForBuild).