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

Jenkins Multipipeline jobs discards old builds and starts from build one

    Details

    • Similar Issues:

      Description

      I have multibranch pipeline job.Pipeline has around 8 stages, out of which 2 stage are parallel and others are in series. Parallel stage has 8 stage that runs in parallel. I have buildDiscarder(logRotator(numToKeepStr:'3')) set in options. Problem I have is, once in a while the build resets removes all builds and artifacts and starts from build 1. This is so annoying.  Not sure if buildDiscarder is causing it or what is triggering this. Also I get concurrent modification exception once in a while. Not sure if the two issues are related or not. 

       

      {{ java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445)
      at java.util.HashMap$EntryIterator.next(HashMap.java:1479)
      at java.util.HashMap$EntryIterator.next(HashMap.java:1477)
      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.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$ConverterImpl.writeChild(CpsFlowExecution.java:1673)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$ConverterImpl.marshal(CpsFlowExecution.java:1618)
      at hudson.util.XStream2$AssociatedConverterImpl.marshal(XStream2.java:464)
      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)
      Caused: java.lang.RuntimeException: Failed to serialize org.jenkinsci.plugins.workflow.job.WorkflowRun#execution for class org.jenkinsci.plugins.workflow.job.WorkflowRun
      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(Pure}}

        Attachments

          Activity

          Hide
          sg Sudheer Gundanna added a comment -

          Jenkins is hosted on Amazon linux m5.2xlarge

          Show
          sg Sudheer Gundanna added a comment - Jenkins is hosted on Amazon linux m5.2xlarge
          Hide
          sg Sudheer Gundanna added a comment -

          This issue happened again. Jenkins master automatically removed all the history and artifacts from master branch and retriggered the build and set it to build number 1.

          Jenkins version: 2.164.2

          Show
          sg Sudheer Gundanna added a comment - This issue happened again. Jenkins master automatically removed all the history and artifacts from master branch and retriggered the build and set it to build number 1. Jenkins version: 2.164.2
          Hide
          morganr87 Morgan Robertson added a comment -

          I think this is a duplicate of 'https://issues.jenkins-ci.org/browse/JENKINS-55220' .  Please read it & if so, please mention details in there and click 'vote for this issue'.

          Show
          morganr87 Morgan Robertson added a comment - I think this is a duplicate of 'https://issues.jenkins-ci.org/browse/JENKINS-55220' .  Please read it & if so, please mention details in there and click 'vote for this issue'.

            People

            • Assignee:
              Unassigned
              Reporter:
              sg Sudheer Gundanna
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: