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

o.j.p.w.cps.CpsThreadGroup#saveProgramIfPossible: program state save failed

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • workflow-cps-plugin
    • None
    • Jenkins 2.235.5
      OS: Linux CentOS 7
      Java: openjdk version "1.8.0_242"

    Description

      There are many such logs in Jenkins master,  I am able to run all jobs as expected, and without any issues.

      2021-04-23 09:11:04.713+0000 [id=639] WARNING o.j.p.w.cps.CpsThreadGroup#saveProgramIfPossible: program state save failed
      an exception which occurred:
      in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.scripts
      in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@3073b3
      in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@3073b3
      Caused: java.io.NotSerializableException: hudson.model.Queue
      at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:926)
      at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
      at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
      at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
      at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
      at java.util.LinkedHashMap.internalWriteEntries(LinkedHashMap.java:333)
      at java.util.HashMap.writeObject(HashMap.java:1363)
      at sun.reflect.GeneratedMethodAccessor320.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:156)
      at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:191)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1028)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920)
      at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
      at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
      at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
      at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
      at com.cloudbees.groovy.cps.SerializableScript.writeObject(SerializableScript.java:26)
      at sun.reflect.GeneratedMethodAccessor527.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:156)
      at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:191)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1028)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:568)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1082)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1040)
      at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920)
      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.lambda$writeObject$0(RiverWriter.java:144)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:237)
      at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:143)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:553)
      Caused: java.io.IOException: Failed to persist /var/jenkins_home/jobs/monitor-stuck-job/builds/1309/program.dat
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:565)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:530)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgramIfPossible(CpsThreadGroup.java:517)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:441)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

      Attachments

        Activity

          richmond Rich added a comment -

          qiaozhi seeing similar issues. Were you able to fix this ?

          richmond Rich added a comment - qiaozhi  seeing similar issues. Were you able to fix this ?
          elibroftw Elijah Lopez added a comment -

          Seriously, I get this too. For my case, it has to do with either iterating on builds or accessing a build's log. The stack trace is extremely long.

          2022-04-11 16:18:11.009+0000 [id=1660748] WARNING hudson.model.RunMap#retrieve: could not load /var/lib/jenkins/jobs/{{JOB_NAME}}/builds/6653
           java.nio.channels.ClosedByInterruptException
           at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
           at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:164)
           at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65)
           at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109)
           at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
           at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
           at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
           at java.io.FilterInputStream.read(FilterInputStream.java:83)
           at java.io.PushbackInputStream.read(PushbackInputStream.java:139)
           at com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.getHeader(XmlHeaderAwareReader.java:79)
           at com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.<init>(XmlHeaderAwareReader.java:61)
           at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:65)
           Caused: com.thoughtworks.xstream.io.StreamException: 
           at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:69)
           at hudson.XmlFile.unmarshal(XmlFile.java:194)
           Caused: java.io.IOException: Unable to read /var/lib/jenkins/jobs/roche_pr/builds/6653/build.xml
           at hudson.XmlFile.unmarshal(XmlFile.java:197)
           at hudson.XmlFile.unmarshal(XmlFile.java:177)
           at org.jenkinsci.plugins.workflow.job.WorkflowRun.reload(WorkflowRun.java:536)
           at hudson.model.Run.<init>(Run.java:353)
           at org.jenkinsci.plugins.workflow.job.WorkflowRun.<init>(WorkflowRun.java:253)
           at sun.reflect.GeneratedConstructorAccessor15555.newInstance(Unknown Source)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
           at jenkins.model.lazy.LazyBuildMixIn.loadBuild(LazyBuildMixIn.java:166)
           at jenkins.model.lazy.LazyBuildMixIn$1.create(LazyBuildMixIn.java:143)
           at hudson.model.RunMap.retrieve(RunMap.java:225)
           at hudson.model.RunMap.retrieve(RunMap.java:58)
           at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:506)
           at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:488)
           at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:386)
           at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:351)
           at jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:75)
           at jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:62)
           at java.util.AbstractMap$2$1.next(AbstractMap.java:418)
           at com.google.common.collect.Iterators.get(Iterators.java:836)
           at hudson.util.RunList.get(RunList.java:150)
           at hudson.util.RunList.get(RunList.java:55)
           at org.jenkinsci.plugins.workflow.cps.persistence.IteratorHack$Itr.next(IteratorHack.java:68)
           at com.fortanix.jenkins.OldPRKiller.prKiller(OldPRKiller.groovy:35)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
           at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
           at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
           at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
           at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
           at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
           at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
           at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
           at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
           at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:158)
           at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
           at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
           at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
           at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
           at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
           at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
           at sun.reflect.GeneratedMethodAccessor583.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
           at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:76)
           at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
           at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
           at sun.reflect.GeneratedMethodAccessor590.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
           at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
           at com.cloudbees.groovy.cps.Next.step(Next.java:83)
           at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
           at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
           at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
           at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
           at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
           at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
           at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
           at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
           at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:402)
           at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
           at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:314)
           at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:278)
           at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
           at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
           at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:748)
          elibroftw Elijah Lopez added a comment - Seriously, I get this too. For my case, it has to do with either iterating on builds or accessing a build's log. The stack trace is extremely long. 2022-04-11 16:18:11.009+0000 [id=1660748] WARNING hudson.model.RunMap#retrieve: could not load / var /lib/jenkins/jobs/{{JOB_NAME}}/builds/6653 java.nio.channels.ClosedByInterruptException at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202) at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:164) at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65) at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109) at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read(BufferedInputStream.java:265) at java.io.FilterInputStream.read(FilterInputStream.java:83) at java.io.PushbackInputStream.read(PushbackInputStream.java:139) at com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.getHeader(XmlHeaderAwareReader.java:79) at com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.<init>(XmlHeaderAwareReader.java:61) at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:65) Caused: com.thoughtworks.xstream.io.StreamException: at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:69) at hudson.XmlFile.unmarshal(XmlFile.java:194) Caused: java.io.IOException: Unable to read / var /lib/jenkins/jobs/roche_pr/builds/6653/build.xml at hudson.XmlFile.unmarshal(XmlFile.java:197) at hudson.XmlFile.unmarshal(XmlFile.java:177) at org.jenkinsci.plugins.workflow.job.WorkflowRun.reload(WorkflowRun.java:536) at hudson.model.Run.<init>(Run.java:353) at org.jenkinsci.plugins.workflow.job.WorkflowRun.<init>(WorkflowRun.java:253) at sun.reflect.GeneratedConstructorAccessor15555.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at jenkins.model.lazy.LazyBuildMixIn.loadBuild(LazyBuildMixIn.java:166) at jenkins.model.lazy.LazyBuildMixIn$1.create(LazyBuildMixIn.java:143) at hudson.model.RunMap.retrieve(RunMap.java:225) at hudson.model.RunMap.retrieve(RunMap.java:58) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:506) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:488) at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:386) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:351) at jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:75) at jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:62) at java.util.AbstractMap$2$1.next(AbstractMap.java:418) at com.google.common.collect.Iterators.get(Iterators.java:836) at hudson.util.RunList.get(RunList.java:150) at hudson.util.RunList.get(RunList.java:55) at org.jenkinsci.plugins.workflow.cps.persistence.IteratorHack$Itr.next(IteratorHack.java:68) at com.fortanix.jenkins.OldPRKiller.prKiller(OldPRKiller.groovy:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:158) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83) at sun.reflect.GeneratedMethodAccessor583.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:76) at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30) at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66) at sun.reflect.GeneratedMethodAccessor590.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:83) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129) at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:402) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:314) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:278) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang. Thread .run( Thread .java:748)
          dziki_jam Valeriy Zabawski added a comment - - edited

          I've started receiving this error recently. Jenkins is running for 21 days, no updates, but suddenly started failing although yesterday everything worked.

          Jul 22, 2022 12:08:55 PM WARNING org.jenkinsci.plugins.workflow.cps.CpsThreadGroup saveProgramIfPossible
          program state save failed
          an exception which occurred:
              in field com.cloudbees.groovy.cps.impl.BlockScopeEnv.locals
              in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@6f14a2c9
              in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
              in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@7ba5d45e
              in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
              in object com.cloudbees.groovy.cps.impl.TryBlockEnv@28e5e533
              in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
              in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@56fd4a7f
              in field com.cloudbees.groovy.cps.impl.CallEnv.caller
              in object com.cloudbees.groovy.cps.impl.FunctionCallEnv@38f8c3d0
              in field com.cloudbees.groovy.cps.Continuable.e
              in object org.jenkinsci.plugins.workflow.cps.SandboxContinuable@27f2915a
              in field org.jenkinsci.plugins.workflow.cps.CpsThread.program
              in object org.jenkinsci.plugins.workflow.cps.CpsThread@51ed2a37
              in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.threads
              in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@140ae82d
              in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@140ae82d
          Caused: java.io.NotSerializableException: org.jenkinsci.plugins.workflow.job.WorkflowRun
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:274)
              at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
              at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
              at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
              at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
              at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:345)
              at java.base/java.util.HashMap.internalWriteEntries(HashMap.java:1858)
              at java.base/java.util.HashMap.writeObject(HashMap.java:1412)
              at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:89)
              at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:199)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1089)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
              at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
              at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
              at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
              at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:345)
              at java.base/java.util.HashMap.internalWriteEntries(HashMap.java:1858)
              at java.base/java.util.HashMap.writeObject(HashMap.java:1412)
              at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:89)
              at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:199)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1089)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
              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.lambda$writeObject$1(RiverWriter.java:144)
              at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:237)
              at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:143)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:578)
          Caused: java.io.IOException: Failed to persist /var/jenkins_home/jobs/cumulus/jobs/k8s/jobs/build/jobs/deployment/builds/90/program.dat
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:590)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:554)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgramIfPossible(CpsThreadGroup.java:537)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:461)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
              at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
              at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
              at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:829)

          In my case it appears when I call Jenkins.instance class and only from shared library, so maybe it's something related to permissions. Trying to get more details.

          dziki_jam Valeriy Zabawski added a comment - - edited I've started receiving this error recently. Jenkins is running for 21 days, no updates, but suddenly started failing although yesterday everything worked. Jul 22, 2022 12:08:55 PM WARNING org.jenkinsci.plugins.workflow.cps.CpsThreadGroup saveProgramIfPossible program state save failed an exception which occurred:     in field com.cloudbees.groovy.cps.impl.BlockScopeEnv.locals     in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@6f14a2c9     in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent     in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@7ba5d45e     in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent     in object com.cloudbees.groovy.cps.impl.TryBlockEnv@28e5e533     in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent     in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@56fd4a7f     in field com.cloudbees.groovy.cps.impl.CallEnv.caller     in object com.cloudbees.groovy.cps.impl.FunctionCallEnv@38f8c3d0     in field com.cloudbees.groovy.cps.Continuable.e     in object org.jenkinsci.plugins.workflow.cps.SandboxContinuable@27f2915a     in field org.jenkinsci.plugins.workflow.cps.CpsThread.program     in object org.jenkinsci.plugins.workflow.cps.CpsThread@51ed2a37     in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.threads     in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@140ae82d     in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@140ae82d Caused: java.io.NotSerializableException: org.jenkinsci.plugins.workflow.job.WorkflowRun     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:274)     at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)     at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)     at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)     at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)     at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:345)     at java.base/java.util.HashMap.internalWriteEntries(HashMap.java:1858)     at java.base/java.util.HashMap.writeObject(HashMap.java:1412)     at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:89)     at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:199)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1089)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)     at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)     at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)     at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)     at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:345)     at java.base/java.util.HashMap.internalWriteEntries(HashMap.java:1858)     at java.base/java.util.HashMap.writeObject(HashMap.java:1412)     at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:89)     at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:199)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1089)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)     at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)     at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)     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.lambda$writeObject$1(RiverWriter.java:144)     at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:237)     at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:143)     at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:578) Caused: java.io.IOException: Failed to persist / var /jenkins_home/jobs/cumulus/jobs/k8s/jobs/build/jobs/deployment/builds/90/program.dat     at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:590)     at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:554)     at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgramIfPossible(CpsThreadGroup.java:537)     at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:461)     at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95)     at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)     at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)     at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)     at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)     at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)     at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)     at java.base/java.lang. Thread .run( Thread .java:829) In my case it appears when I call Jenkins.instance class and only from shared library, so maybe it's something related to permissions. Trying to get more details.

          People

            Unassigned Unassigned
            qiaozhi zhi
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: