Hi, Let's see if someone can help me with a weird error that I randomly have, I have a job with about 60 stages in parallel, those stages run some tests all in the same way, randomly I saw the following stack trace, I guess it is related to a custom step I have in my pipeline shared library to make HTTP request. After reading similar issues I've checked that nothing assigned to a variable after exiting from the step to avoid a serialization exception so all variables are set to null before exits from it, but it does not help, I will try to remove all pipeline steps references and use @NonCPS
``` [2019-04-05T09:56:51.745Z] an exception which occurred: [2019-04-05T09:56:51.745Z] in field com.cloudbees.groovy.cps.impl.BlockScopeEnv.locals [2019-04-05T09:56:51.745Z] in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@45f33aac [2019-04-05T09:56:51.745Z] in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent [2019-04-05T09:56:51.745Z] in object com.cloudbees.groovy.cps.impl.TryBlockEnv@75aefeb4 [2019-04-05T09:56:51.745Z] in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent [2019-04-05T09:56:51.745Z] in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@5365a8ac [2019-04-05T09:56:51.745Z] in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent [2019-04-05T09:56:51.745Z] in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@293e6660 [2019-04-05T09:56:51.745Z] in field com.cloudbees.groovy.cps.impl.CallEnv.caller [2019-04-05T09:56:51.746Z] in object com.cloudbees.groovy.cps.impl.FunctionCallEnv@5606e05 [2019-04-05T09:56:51.746Z] in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent [2019-04-05T09:56:51.746Z] in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@4fbdbabe [2019-04-05T09:56:51.746Z] in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent [2019-04-05T09:56:51.746Z] in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@3d675ee3 [2019-04-05T09:56:51.746Z] in field com.cloudbees.groovy.cps.impl.CallEnv.caller [2019-04-05T09:56:51.746Z] in object com.cloudbees.groovy.cps.impl.FunctionCallEnv@37e36233 [2019-04-05T09:56:51.746Z] in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent [2019-04-05T09:56:51.746Z] in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@51436a96 [2019-04-05T09:56:51.746Z] in field com.cloudbees.groovy.cps.impl.CallEnv.caller [2019-04-05T09:56:51.746Z] in object com.cloudbees.groovy.cps.impl.FunctionCallEnv@5af50baa [2019-04-05T09:56:51.746Z] in field com.cloudbees.groovy.cps.Continuable.e [2019-04-05T09:56:51.746Z] in object org.jenkinsci.plugins.workflow.cps.SandboxContinuable@40e885e3 [2019-04-05T09:56:51.746Z] in field org.jenkinsci.plugins.workflow.cps.CpsThread.program [2019-04-05T09:56:51.746Z] in object org.jenkinsci.plugins.workflow.cps.CpsThread@2e37df44 [2019-04-05T09:56:51.746Z] in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.threads [2019-04-05T09:56:51.746Z] in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@2b8d184a [2019-04-05T09:56:51.746Z] in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@2b8d184a [2019-04-05T09:56:51.746Z] Caused: java.io.NotSerializableException: sun.net.www.protocol.https.HttpsURLConnectionImpl [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:926) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179) [2019-04-05T09:56:51.746Z] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) [2019-04-05T09:56:51.746Z] at java.util.HashMap.internalWriteEntries(HashMap.java:1790) [2019-04-05T09:56:51.746Z] at java.util.HashMap.writeObject(HashMap.java:1363) [2019-04-05T09:56:51.746Z] at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source) [2019-04-05T09:56:51.746Z] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [2019-04-05T09:56:51.746Z] at java.lang.reflect.Method.invoke(Method.java:498) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:156) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:191) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1028) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179) [2019-04-05T09:56:51.746Z] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) [2019-04-05T09:56:51.746Z] at java.util.TreeMap.writeObject(TreeMap.java:2438) [2019-04-05T09:56:51.746Z] at sun.reflect.GeneratedMethodAccessor541.invoke(Unknown Source) [2019-04-05T09:56:51.746Z] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [2019-04-05T09:56:51.746Z] at java.lang.reflect.Method.invoke(Method.java:498) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:156) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:191) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1028) [2019-04-05T09:56:51.746Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.747Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082) [2019-04-05T09:56:51.747Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040) [2019-04-05T09:56:51.747Z] at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920) [2019-04-05T09:56:51.747Z] at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58) [2019-04-05T09:56:51.747Z] at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111) [2019-04-05T09:56:51.747Z] at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.lambda$writeObject$0(RiverWriter.java:144) [2019-04-05T09:56:51.747Z] at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:136) [2019-04-05T09:56:51.747Z] at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:143) [2019-04-05T09:56:51.747Z] at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:482) [2019-04-05T09:56:51.747Z] at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:458) [2019-04-05T09:56:51.747Z] at org.jenkinsci.plugins.workflow.cps.CpsStepContext$3.onSuccess(CpsStepContext.java:538) [2019-04-05T09:56:51.747Z] at org.jenkinsci.plugins.workflow.cps.CpsStepContext$3.onSuccess(CpsStepContext.java:532) [2019-04-05T09:56:51.747Z] at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:906) [2019-04-05T09:56:51.747Z] at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35) [2019-04-05T09:56:51.747Z] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [2019-04-05T09:56:51.747Z] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [2019-04-05T09:56:51.747Z] at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131) [2019-04-05T09:56:51.747Z] at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) [2019-04-05T09:56:51.747Z] at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) [2019-04-05T09:56:51.747Z] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [2019-04-05T09:56:51.747Z] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [2019-04-05T09:56:51.747Z] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [2019-04-05T09:56:51.747Z] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [2019-04-05T09:56:51.747Z] at java.lang.Thread.run(Thread.java:748) ``` -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bc033430-4d07-4501-8cbd-9f9a3b6e8186%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
