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

Scan Multibranch Pipeline fails

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      gerrit-code-review-0.3.6

      Description

      After the initial scan all subsequent scans fail (both manual and event triggered).

      Scan Multibranch Pipeline Log:

      Branch indexing
      FATAL: Failed to recompute children of project
      java.lang.RuntimeException: Failed to serialize hudson.util.PersistedList#data for class jenkins.branch.MultiBranchProject$BranchSourceList
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:254)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:222)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:208)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:149)
      	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 com.thoughtworks.xstream.XStream.toXML(XStream.java:975)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:575)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1026)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Caused by: java.lang.RuntimeException: Failed to serialize jenkins.branch.BranchSource#source for class jenkins.branch.BranchSource
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:254)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:222)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:208)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:149)
      	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 hudson.util.CopyOnWriteList$ConverterImpl.marshal(CopyOnWriteList.java:187)
      	at hudson.util.XStream2$AssociatedConverterImpl.marshal(XStream2.java:460)
      	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:263)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:250)
      	... 19 more
      Caused by: java.lang.RuntimeException: Failed to serialize jenkins.plugins.gerrit.AbstractGerritSCMSource#projectOpenChanges for class jenkins.plugins.gerrit.GerritSCMSource
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:254)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:222)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:208)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:149)
      	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:263)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:250)
      	... 35 more
      Caused by: java.lang.RuntimeException: Failed to serialize jenkins.plugins.gerrit.ProjectOpenChanges#openChanges for class jenkins.plugins.gerrit.ProjectOpenChanges
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:254)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:222)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:208)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:149)
      	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:263)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:250)
      	... 44 more
      Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.google.common.cache.LocalCache$LocalLoadingCache for security reasons; see https://jenkins.io/redirect/class-filter/
      	at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:542)
      	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:263)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:250)
      	... 53 more
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            Hide
            accojohannes Johannes Carlsson added a comment -

            A workaround it to start jenkins with a class filter. On my installation this is done by editing /etc/default/jenkins

            JAVA_ARGS='-Djava.awt.headless=true -Dhudson.remoting.ClassFilter=com.google.common.cache.LocalCache\$LocalLoadingCache,com.google.common.base.Equivalences\$Equals,com.urswolfer.gerrit.client.rest.GerritApiImpl,com.urswolfer.gerrit.client.rest.http.GerritRestClient,com.urswolfer.gerrit.client.rest.GerritAuthData\$Basic,com.urswolfer.gerrit.client.rest.http.HttpRequestExecutor,org.apache.http.impl.client.BasicCookieStore,org.apache.http.cookie.CookieIdentityComparator,org.apache.http.impl.cookie.BasicClientCookie,com.urswolfer.gerrit.client.rest.http.LoginCache,com.google.common.base.Optional\$Absent,com.google.common.base.Suppliers\$MemoizingSupplier'

            Make sure to have single quotes and to restart jenkins after changing above.

            I suspect the problem was introduced with:

            40a5144 Set automatically change details to env
            

            See https://jenkins.io/blog/2018/01/13/jep-200/ and https://jenkins.io/blog/2018/03/15/jep-200-lts/ for more information.

            Show
            accojohannes Johannes Carlsson added a comment - A workaround it to start jenkins with a class filter. On my installation this is done by editing /etc/default/jenkins JAVA_ARGS= '-Djava.awt.headless= true -Dhudson.remoting.ClassFilter=com.google.common.cache.LocalCache\$LocalLoadingCache,com.google.common.base.Equivalences\$Equals,com.urswolfer.gerrit.client. rest .GerritApiImpl,com.urswolfer.gerrit.client. rest .http.GerritRestClient,com.urswolfer.gerrit.client. rest .GerritAuthData\$Basic,com.urswolfer.gerrit.client. rest .http.HttpRequestExecutor,org.apache.http.impl.client.BasicCookieStore,org.apache.http.cookie.CookieIdentityComparator,org.apache.http.impl.cookie.BasicClientCookie,com.urswolfer.gerrit.client. rest .http.LoginCache,com.google.common.base.Optional\$Absent,com.google.common.base.Suppliers\$MemoizingSupplier' Make sure to have single quotes and to restart jenkins after changing above. I suspect the problem was introduced with: 40a5144 Set automatically change details to env See https://jenkins.io/blog/2018/01/13/jep-200/ and https://jenkins.io/blog/2018/03/15/jep-200-lts/ for more information.
            Hide
            davidsben David Brown added a comment -

            Hit the same issue in our company, our workaround in place is a downgrade back to 0.3.2

            Show
            davidsben David Brown added a comment - Hit the same issue in our company, our workaround in place is a downgrade back to 0.3.2
            Hide
            lucamilanesio Luca Domenico Milanesio added a comment -

            Thank you for reporting the issue and the links to JEP-200. I believe you are running Jenkins 2.102 or above. Will check and report back to this ticket.

            Show
            lucamilanesio Luca Domenico Milanesio added a comment - Thank you for reporting the issue and the links to JEP-200. I believe you are running Jenkins 2.102 or above. Will check and report back to this ticket.
            Hide
            jons Jon Sten added a comment -

            We got hit by this one as well last week when we upgraded from revision e6c56b7 (of the git which contains my fix for closed down instances) to 0.3.5, we are running core 1.191.2. For now we have downgrading back to e6c56b7.

            Show
            jons Jon Sten added a comment - We got hit by this one as well last week when we upgraded from revision e6c56b7 (of the git which contains my fix for closed down instances) to 0.3.5, we are running core 1.191.2. For now we have downgrading back to e6c56b7.
            Hide
            lucamilanesio Luca Domenico Milanesio added a comment -

            I've managed to reproduce the issue: the list of open changes should not have been cached at all. Working on a fix for review shortly.

            Show
            lucamilanesio Luca Domenico Milanesio added a comment - I've managed to reproduce the issue: the list of open changes should not have been cached at all. Working on a fix for review shortly.
            Show
            lucamilanesio Luca Domenico Milanesio added a comment - Fix for review: https://review.gerrithub.io/c/jenkinsci/gerrit-code-review-plugin/+/475993
            Hide
            lucamilanesio Luca Domenico Milanesio added a comment -

            Thanks for your patience, this has now been resolved.

            We are also discussing  the introduction of "docker-based" validation environments where we can prevent this problems to happen during the change validation process.

            Show
            lucamilanesio Luca Domenico Milanesio added a comment - Thanks for your patience, this has now been resolved. We are also discussing  the introduction of "docker-based" validation environments where we can prevent this problems to happen during the change validation process.

              People

              Assignee:
              lucamilanesio Luca Domenico Milanesio
              Reporter:
              johnv John V
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: