Issue Type: Bug Bug
Assignee: Kohsuke Kawaguchi
Components: workflow-plugin
Created: 17/Dec/14 5:36 PM
Description:

A flow which just had

node('...') {sh 'echo hi'}

waited for a node matching the label. I restarted Jenkins after changing something so that the label would be available. The shell step ran, but then the flow failed with


...
Running: Allocate node : End
Running: End of Workflow
java.io.NotSerializableException: org.jenkinsci.plugins.workflow.job.WorkflowJob
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:890)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1062)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1018)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:884)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:584)
	at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
	at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
	at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.close(RiverWriter.java:145)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:341)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:323)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:297)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:71)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.call(CpsThreadGroup.java:183)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.call(CpsThreadGroup.java:181)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
	at org.jenkinsci.plugins.workflow.cps.CpsVmThread.run(CpsVmThread.java:21)
Caused by: an exception which occurred:
	in field task
	in object java.util.ArrayList@401ac88
Finished: FAILURE

CpsStepContext.getThread then began complaining that

no thread 2 among []

as the DurableTaskStep$Execution.run kept on running.

It is not apparent from this stack trace why something is trying to serialize the job.

Observed also in PR 21; https://github.com/jenkinsci/workflow-plugin/commit/a594618516a22e9e8bcd016808ca487efee80fff fixed it. Turned out in that case that the culprit was ExecutorPickle. But why could the error message not say that? It only said field task, which was not enough information.

Project: Jenkins
Labels: robustness
Priority: Minor Minor
Reporter: Jesse Glick
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to