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

Build job serialization is failing on 2.107.3 LTS causing loss of data.

      after upgrading from 2.89.3 to 2.107.3 I'm seeing issues with build record serialization.  Build records are not being saved and are lost when the service is restarted.  Here is the stack trace.

      I have the job-dsl 1.69 installed as well. Note I tried reverting to 1.66 but there was no change in behavior.

      OS : Ubuntu 14.04

      JDK : 1.8.0_172

      Installation Type : Debian package

       

      SEVERE: Failed to save build record
      java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild
              at hudson.XmlFile.write(XmlFile.java:200)
              at hudson.model.Run.save(Run.java:1923)
              at hudson.model.Run.execute(Run.java:1784)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
              at hudson.model.ResourceController.execute(ResourceController.java:97)
              at hudson.model.Executor.run(Executor.java:429)
      Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild
              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:193)
              ... 5 more
      Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.CauseAction#causeBag for class hudson.model.CauseAction
              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 hudson.util.XStream2$PassthruConverter.marshal(XStream2.java:491)
              at hudson.util.XStream2$AssociatedConverterImpl.marshal(XStream2.java:461)
              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.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
              at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
              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)
              ... 18 more
      Caused by: java.lang.RuntimeException: Failed to serialize org.jenkinsci.plugins.ghprb.GhprbCause#triggerSender for class org.jenkinsci.plugins.ghprb.GhprbCause
              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.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
              at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
              at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:78)
              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)
              ... 35 more
      Caused by: java.lang.UnsupportedOperationException: Refusing to marshal org.kohsuke.github.GHUser for security reasons; see https://jenkins.io/redirect/class-filter/
              at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
              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)
              ... 50 more

          [JENKINS-51511] Build job serialization is failing on 2.107.3 LTS causing loss of data.

          Joe Nunnelley created issue -

          Alfred Szmidt added a comment -

          Seems very similar in behaviour to https://issues.jenkins-ci.org/browse/JENKINS-50595

          Alfred Szmidt added a comment - Seems very similar in behaviour to https://issues.jenkins-ci.org/browse/JENKINS-50595

          Joe Nunnelley added a comment -

          I have tried to exempt the classes reported in the stack and restarted jenkins. it was not effective but perhaps my syntax was incorrect.

          -Dhudson.remoting.ClassFilter=org.kohsuke.github.GHPullRequestCommitDetail,org.jenkinsci.plugins.ghprb.GhprbCause,hudson.model.CauseAction,hudson.model.Queue$WaitingItem,hudson.model.Actionable,hudson.model.Queue$State,hudson.model.Cause$UpstreamCause,hudson.model.FreeStyleBuild

           

           

           

           

          Joe Nunnelley added a comment - I have tried to exempt the classes reported in the stack and restarted jenkins. it was not effective but perhaps my syntax was incorrect. -Dhudson.remoting.ClassFilter=org.kohsuke.github.GHPullRequestCommitDetail,org.jenkinsci.plugins.ghprb.GhprbCause,hudson.model.CauseAction,hudson.model.Queue$WaitingItem,hudson.model.Actionable,hudson.model.Queue$State,hudson.model.Cause$UpstreamCause,hudson.model.FreeStyleBuild        
          Joe Nunnelley made changes -
          Labels Original: 2.0 build jenkins regression user-experience New: 2.0 JEP-200 build jenkins regression user-experience

          Joe Nunnelley added a comment -

          additionally I'm stuck on the github pull request builder 1.35 as any plugin version greater than that is hitting the following bug (including 1.40).  https://github.com/jenkinsci/ghprb-plugin/issues/377.  Unfortunately, the 1.40 plugin is the one with the JEP-200 bug fix so we are not able to use it until the rate limit issue is resolved.

          Joe Nunnelley added a comment - additionally I'm stuck on the github pull request builder 1.35 as any plugin version greater than that is hitting the following bug (including 1.40).  https://github.com/jenkinsci/ghprb-plugin/issues/377 .  Unfortunately, the 1.40 plugin is the one with the JEP-200 bug fix so we are not able to use it until the rate limit issue is resolved.
          Joe Nunnelley made changes -
          Link New: This issue is related to JENKINS-48950 [ JENKINS-48950 ]

          Joe Nunnelley added a comment -

          is there a work around for this issue. Data loss for our builds is a severe issue.

          Joe Nunnelley added a comment - is there a work around for this issue. Data loss for our builds is a severe issue.
          Joe Nunnelley made changes -
          Assignee New: Oleg Nenashev [ oleg_nenashev ]
          Oleg Nenashev made changes -
          Component/s New: ghprb-plugin [ 17227 ]
          Component/s Original: core [ 15593 ]

          Oleg Nenashev added a comment -

          I would start from updating ghprb plugin

          Oleg Nenashev added a comment - I would start from updating ghprb plugin

            oleg_nenashev Oleg Nenashev
            joenunnelley Joe Nunnelley
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: