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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: workflow-cps-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.235.5
      OS: Linux CentOS 7
      Java: openjdk version "1.8.0_242"
    • Similar Issues:

      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

          qiaozhi zhi created issue -
          qiaozhi zhi made changes -
          Field Original Value New Value
          Description There are many such logs in Jenkins master, {color:#172b4d} I am able to run all jobs as expected, and without any issues{color}.

          2021-04-23 09:11:04.713+0000 [id=639] {color:#de350b}WARNING o.j.p.w.cps.CpsThreadGroup#saveProgramIfPossible: program state save failed{color}
          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)
          There are many such logs in Jenkins master, {color:#172b4d} I am able to run all jobs as expected, and without any issues{color}.

          2021-04-23 09:11:04.713+0000 [id=639] {color:#de350b}WARNING o.j.p.w.cps.CpsThreadGroup#saveProgramIfPossible: program state save failed{color}
           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
           {color:#de350b}Caused: java.io.NotSerializableException: hudson.model.Queue{color}
           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)
           {color:#de350b}Caused: java.io.IOException: Failed to persist /var/jenkins_home/jobs/monitor-stuck-job/builds/1309/program.dat{color}
           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)
          qiaozhi zhi made changes -
          Priority Minor [ 4 ] Major [ 3 ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            qiaozhi zhi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: