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

Build Flow Job unable to save build

    Details

    • Similar Issues:

      Description

      Hi Team,

      Recently we have upgraded our jenkins from 2.19.3 to 2.164.1.

      After that whenever we run any build flow job, the job is completing successfully but jenkins is not able to save it on UI. During next jenkins restart or next day the job is getting removed from build history.

      Build flow plugin version is 0.20.

      Below are the error logs from jenkins server.

       

      Jun 07, 2019 3:37:57 PM hudson.model.Run execute
      INFO: Gopal-test-BuildFlow #2 main build action completed: SUCCESS
      Jun 07, 2019 3:37:57 PM hudson.model.Run execute
      SEVERE: Failed to save build record
      java.io.IOException: java.lang.RuntimeException: Failed to serialize com.cloudbees.plugins.flow.FlowRun#startJob for class com.cloudbees.plugins.flow.FlowRun
      at hudson.XmlFile.write(XmlFile.java:200)
      at hudson.model.Run.save(Run.java:2012)
      at hudson.model.Run.execute(Run.java:1873)
      at com.cloudbees.plugins.flow.FlowRun.run(FlowRun.java:155)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Caused by: java.lang.RuntimeException: Failed to serialize com.cloudbees.plugins.flow.FlowRun#startJob for class com.cloudbees.plugins.flow.FlowRun
      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 com.cloudbees.plugins.flow.JobInvocation#lock for class com.cloudbees.plugins.flow.JobInvocation$Start
      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.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.UnsupportedOperationException: Refusing to marshal java.util.concurrent.locks.ReentrantLock for security reasons; see https://jenkins.io/redirect/class-filter/
      at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:546)
      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)
      ... 27 more

       

      Regards,

      Gopal

        Attachments

          Activity

          Hide
          y2j123 jay yap added a comment -

          I also facing the same issue for the Build Flow Job unable to save build error.

          then the job history some of it went missing appear in Jenkins website.

          I only encounter on this plugin issue only. Is there got any solution on this?

          Show
          y2j123 jay yap added a comment - I also facing the same issue for the Build Flow Job unable to save build error. then the job history some of it went missing appear in Jenkins website. I only encounter on this plugin issue only. Is there got any solution on this?
          Hide
          gopal_ahir Gopal Ahir added a comment -

          Hi Craig Rodrigues, Is there any update?

          Show
          gopal_ahir Gopal Ahir added a comment - Hi Craig Rodrigues , Is there any update?

            People

            • Assignee:
              rodrigc Craig Rodrigues
              Reporter:
              gopal_ahir Gopal Ahir
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: