[JIRA] (JENKINS-59958) Scan Multibranch Pipeline fails

22 views
Skip to first unread message

john.viklund@effnet.com (JIRA)

unread,
Oct 28, 2019, 3:30:04 AM10/28/19
to jenkinsc...@googlegroups.com
John V created an issue
 
Jenkins / Bug JENKINS-59958
Scan Multibranch Pipeline fails
Issue Type: Bug Bug
Assignee: lucamilanesio
Components: gerrit-code-review-plugin
Created: 2019-10-28 07:29
Environment: gerrit-code-review-0.3.5
Priority: Major Major
Reporter: John V

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
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

johannes.carlsson@acconeer.com (JIRA)

unread,
Nov 11, 2019, 6:08:02 AM11/11/19
to jenkinsc...@googlegroups.com
Johannes Carlsson commented on Bug JENKINS-59958
 
Re: Scan Multibranch Pipeline fails

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.

davidsben@gmail.com (JIRA)

unread,
Nov 13, 2019, 5:28:02 AM11/13/19
to jenkinsc...@googlegroups.com

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

luca.milanesio@gmail.com (JIRA)

unread,
Nov 24, 2019, 4:10:07 PM11/24/19
to jenkinsc...@googlegroups.com

luca.milanesio@gmail.com (JIRA)

unread,
Nov 24, 2019, 4:10:07 PM11/24/19
to jenkinsc...@googlegroups.com

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.

jon.sten@gmail.com (JIRA)

unread,
Nov 24, 2019, 4:22:03 PM11/24/19
to jenkinsc...@googlegroups.com
Jon Sten commented on Bug JENKINS-59958

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.

luca.milanesio@gmail.com (JIRA)

unread,
Nov 27, 2019, 5:07:04 AM11/27/19
to jenkinsc...@googlegroups.com

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.

luca.milanesio@gmail.com (JIRA)

unread,
Nov 27, 2019, 7:38:03 AM11/27/19
to jenkinsc...@googlegroups.com
Status: Open In Progress

luca.milanesio@gmail.com (JIRA)

unread,
Nov 27, 2019, 7:38:04 AM11/27/19
to jenkinsc...@googlegroups.com

luca.milanesio@gmail.com (JIRA)

unread,
Nov 27, 2019, 7:38:04 AM11/27/19
to jenkinsc...@googlegroups.com

luca.milanesio@gmail.com (JIRA)

unread,
Dec 2, 2019, 9:21:05 AM12/2/19
to jenkinsc...@googlegroups.com
Status: In Review Fixed but Unreleased
Resolution: Fixed

luca.milanesio@gmail.com (JIRA)

unread,
Dec 2, 2019, 9:22:06 AM12/2/19
to jenkinsc...@googlegroups.com

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.

luca.milanesio@gmail.com (JIRA)

unread,
Dec 2, 2019, 9:22:07 AM12/2/19
to jenkinsc...@googlegroups.com
Status: Fixed but Unreleased Resolved
Released As: gerrit-code-review-0.3.6
Reply all
Reply to author
Forward
0 new messages