[JIRA] (JENKINS-38917) Version 1.8 stopped working with remote agents

0 views
Skip to first unread message

ddigtiar@cloudbees.com (JIRA)

unread,
Oct 12, 2016, 3:09:04 AM10/12/16
to jenkinsc...@googlegroups.com
Denys Digtiar created an issue
 
Jenkins / Bug JENKINS-38917
Version 1.8 stopped working with remote agents
Issue Type: Bug Bug
Assignee: rin_ne
Components: export-params-plugin
Created: 2016/Oct/12 7:08 AM
Environment: Jenkins 1.625 LTS (on mac os sierra)
export-params-plugin 1.8
docker jenkinsci/ssh-slave as an agent
Labels: plugin remoting
Priority: Blocker Blocker
Reporter: Denys Digtiar

While it works on the master when a Job is executed on a remote Agent the "export parameters to file" build step consistently fails with the following message.

Could not store parameters into <path>

Further investigation uncovered following Exception as a cause

java.io.IOException: remote file operation failed: <path> at hudson.remoting.Channel@7f287e48:SSH1: java.io.IOException: Unable to serialize hudson.FilePath$FileCallableWrapper@38a67991
	at hudson.FilePath.act(FilePath.java:987)
	at hudson.FilePath.act(FilePath.java:969)
	at org.jenkinsci.plugins.exportparams.ExportParametersBuilder.perform(ExportParametersBuilder.java:134)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
	at hudson.model.Build$BuildExecution.build(Build.java:205)
	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:408)
Caused by: java.io.IOException: Unable to serialize hudson.FilePath$FileCallableWrapper@38a67991
	at hudson.remoting.UserRequest.serialize(UserRequest.java:168)
	at hudson.remoting.UserRequest.<init>(UserRequest.java:62)
	at hudson.remoting.Channel.call(Channel.java:779)
	at hudson.FilePath.act(FilePath.java:980)
	... 11 more
Caused by: java.io.NotSerializableException: org.jenkinsci.plugins.exportparams.ExportParametersBuilder
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
	at hudson.remoting.UserRequest._serialize(UserRequest.java:157)
	at hudson.remoting.UserRequest.serialize(UserRequest.java:166)
	... 14 more
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

rinrin.ne@gmail.com (JIRA)

unread,
Oct 12, 2016, 9:28:04 AM10/12/16
to jenkinsc...@googlegroups.com
rin_ne commented on Bug JENKINS-38917
 
Re: Version 1.8 stopped working with remote agents

Priority Blocker is really correct? Regarding help,

Blocks development and/or testing work, production could not run.

I cannot reproduce your facing issue with remote slave. I have not updated this area since 1.5.

NotSerializableException is raised if given object does not have implementation of Serializable interface. This plugin passes String object that is serialized from EnvVars to BufferedWriter. Thus this exception would be raised by String object if this is export-params plugin issue.

I don't think this is not export-params plugin issue for now. Please provide your job configuration regarding export-params plugin if you want further investigation.

ddigtiar@cloudbees.com (JIRA)

unread,
Oct 12, 2016, 9:38:02 PM10/12/16
to jenkinsc...@googlegroups.com

I have just been able to reproduce it again with the brand new jenkins:alpine image based container and the same ssh agent container I used with the previous experiment.

As I described it, the only workaround for the issue is to build on the master which is not feasible in the production environments, therefore Blocker priority.

Here is a link to the change log for the last release pointing to the change that I believe is a culprit.
https://github.com/jenkinsci/export-params-plugin/compare/export-params-1.1...export-params-1.8#diff-760dab5c086e6b7560887018ac881ac7L137
I don't know that much about Jenkins remoting. But my guess is that FileCallable has to be Serializable. Since an anonymous inner class is used it captures its parent object which I am guessing is not serializable or has fields in its hierarchy that are not serializable.

rinrin.ne@gmail.com (JIRA)

unread,
Oct 12, 2016, 9:51:02 PM10/12/16
to jenkinsc...@googlegroups.com
rin_ne commented on Bug JENKINS-38917

Could you reproduce this with export-params pkugin 1.5 once?

ddigtiar@cloudbees.com (JIRA)

unread,
Oct 12, 2016, 10:06:02 PM10/12/16
to jenkinsc...@googlegroups.com

I have not found it in archives so I built it from source. I was able to reproduce it.
I can not reproduce it on 1.1

ddigtiar@cloudbees.com (JIRA)

unread,
Oct 12, 2016, 10:07:05 PM10/12/16
to jenkinsc...@googlegroups.com
Denys Digtiar edited a comment on Bug JENKINS-38917
I have not found it in archives so I built it from source. I was able to reproduce it the issue .
I can not reproduce
it the issue on 1.1

scm_issue_link@java.net (JIRA)

unread,
Oct 13, 2016, 1:35:02 AM10/13/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: rinrinne
Path:
src/main/java/org/jenkinsci/plugins/exportparams/ExportParametersBuilder.java
http://jenkins-ci.org/commit/export-params-plugin/cef03bfd0044e0f359473aef4b4ca71f1069620e
Log:
Add inner class to ExportParametersBuilder

Annonymous inner class that implements FileCallable uses external
final String. This might be an issue regarding serialization on
remote.

This patch adds new inner class that implements FileCallable to
keep such string.

Issue: JENKINS-38917

rinrin.ne@gmail.com (JIRA)

unread,
Oct 13, 2016, 1:36:01 AM10/13/16
to jenkinsc...@googlegroups.com
rin_ne commented on Bug JENKINS-38917

As I described it, the only workaround for the issue is to build on the master which is not feasible in the production environments, therefore Blocker priority.

I don't think so. Blocker priority should be used on Jenkins project if If core is affected by installed plugin with no configuration. This issue happens on the build that is started from a job which has this plugin related configurations. So this issue might be broker from the viewpoint of this plugin, but this is never blocker from the viewpoint of this issue tracker. Please confirm the meaning of priority in this issue tracker within bees.

Unfortunately I still not reproduce this issue, but I found weakness code. So I uploaded a patch. Could you fetch the latest commit on 'JENKINS-38917' branch then build and test again?

ddigtiar@cloudbees.com (JIRA)

unread,
Oct 13, 2016, 1:46:01 AM10/13/16
to jenkinsc...@googlegroups.com

ddigtiar@cloudbees.com (JIRA)

unread,
Oct 13, 2016, 1:56:02 AM10/13/16
to jenkinsc...@googlegroups.com
Denys Digtiar commented on Bug JENKINS-38917
 
Re: Version 1.8 stopped working with remote agents

If the priority is from the perspective of overall Jenkins, then you are absolutely correct. I downgraded the priority. It was just my misunderstanding. Thank you for your prompt response, very much appreciated.

I will test the fix and provide a feedback.

ddigtiar@cloudbees.com (JIRA)

unread,
Oct 13, 2016, 4:29:01 AM10/13/16
to jenkinsc...@googlegroups.com

My test case is passing. Parameters are stored on SSH agent as well as the master. Thank you!

rinrin.ne@gmail.com (JIRA)

unread,
Oct 13, 2016, 4:37:01 AM10/13/16
to jenkinsc...@googlegroups.com
rin_ne commented on Bug JENKINS-38917

OK, I will release new version.

rinrin.ne@gmail.com (JIRA)

unread,
Oct 13, 2016, 4:47:02 AM10/13/16
to jenkinsc...@googlegroups.com
rin_ne resolved as Fixed
 
Change By: rin_ne
Status: Open Resolved
Resolution: Fixed

rinrin.ne@gmail.com (JIRA)

unread,
Oct 13, 2016, 4:47:02 AM10/13/16
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages