• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • script-security 1244.ve463715a_f89c

      After upgrading plugins to the versions specified in Environment, our build jobs started failing with the following error: 

      java.lang.VerifyError: (class: com/codemanufaktur/rbs/tools/conan/ConanBuildTask, method: <init> signature: (Ljava/util/Map;)V) Unable to pop operand off an empty stack
      	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
      	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
      	at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357)
      	at org.kohsuke.groovy.sandbox.impl.GroovyCallSiteSelector.constructor(GroovyCallSiteSelector.java:67)
      	at org.kohsuke.groovy.sandbox.impl.GroovyCallSiteSelector.findConstructor(GroovyCallSiteSelector.java:45)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedConstructor(Checker.java:223)
      	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.constructorCall(SandboxInvoker.java:21)
      	at com.codemanufaktur.rbs.tools.conan.ConanBuilder.createTask(ConanBuilder.groovy:87)
      	at com.codemanufaktur.rbs.tools.conan.ConanBuilder.buildTasks(ConanBuilder.groovy:102)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.collect(CpsDefaultGroovyMethods:3287)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.collect(CpsDefaultGroovyMethods:3257)
      	at com.codemanufaktur.rbs.tools.conan.ConanBuilder.buildTasks(ConanBuilder.groovy:102)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.callClosureForMapEntry(CpsDefaultGroovyMethods:5361)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.collectMany(CpsDefaultGroovyMethods:3485)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.collectMany(CpsDefaultGroovyMethods:3506)
      	at com.codemanufaktur.rbs.tools.conan.ConanBuilder.buildTasks(ConanBuilder.groovy:99)
      	at com.codemanufaktur.rbs.tools.conan.ConanBuilder.run(ConanBuilder.groovy:49)
      	at com.codemanufaktur.rbs.pipeline.Pipeline.build(Pipeline.groovy:64)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2125)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2110)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2151)
      	at com.codemanufaktur.rbs.pipeline.Pipeline.build(Pipeline.groovy:63)
      	at pipelineFactory.call(pipelineFactory.groovy:51)
      	at ___cps.transform___(Native Method)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:85)
      	at jdk.internal.reflect.GeneratedMethodAccessor317.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      	at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
      	at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
      	at jdk.internal.reflect.GeneratedMethodAccessor367.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:75)
      	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
      	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:65)
      	at jdk.internal.reflect.GeneratedMethodAccessor363.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	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:158)
      	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:152)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
      	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:152)
      	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:187)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
      	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:30)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:70)
      	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)

      After a downgrade of the following plugins to the following versions, everything started working again.

      git:4.12.1
      git-client:3.12.1
      junit:1156.vcf492e95a_a_b_0
      pipeline-groovy-lib:612.v84da_9c54906d
      script-security:1183.v774b_0b_0a_a_451
      workflow-cps:2802.v5ea_628154b_c2

      It seems to me that the fix for SECURITY-2824 introduced this problem. I'll try to boil this down to a MCVE, but in the mean time, here is the code in question:

      // from class ConanBuilder
          private ConanBuildTask createTask(String tag, String hostProfile) {
              new ConanBuildTask(
                  recipe: this.recipe,
                  hostProfile: hostProfile,
                  buildProfile: this.buildProfile,
                  tag: tag,
                  remotes: this.remotes,
                  stageRemote: this.stageRemote,
                  config: this.config
              )
          }
      
          private List<ConanBuildTask> buildTasks() {
              return artefacts?.findAll { tag, _ -> !this.tags || tag in this.tags }
                  .collectMany { tag, profiles ->
                      if (profiles in Collection) {
                          return profiles.collect { profile -> createTask(tag, profile) }
                      }
                      return createTask(tag, profiles)
                  }
          }
      
      class ConanBuildTask
      {
          ConanBuildTask(Map params)
          {
              // never reached
          }
      }
      

          [JENKINS-70080] Update breaks compound assignments

          Marian Degel added a comment - - edited

          We have a similar error after the latest update which we could boil down to the following minimal example:

          // Jenkinsfile
          class TestRunner {
            private def testCases = [:]
            
            @NonCPS
            void add(newTests) {
              testCases += newTests
            }
          }
          
          node('test'){
              stage('a'){
                  script {
                      def t = new TestRunner()
                  }
                  echo "Hello"   
              }
          }
          

          which causes:

          java.lang.VerifyError: (class: TestRunner, method: add signature: (Ljava/lang/Object;)V) Unable to pop operand off an empty stack
          13:19:16  	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
          13:19:16  	at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
          13:19:16  	at java.base/java.lang.Class.getDeclaredMethod(Class.java:2473)
          13:19:16  	at java.base/jdk.internal.reflect.ReflectionFactory.findReadWriteObjectForSerialization(ReflectionFactory.java:556)
          13:19:16  	at java.base/jdk.internal.reflect.ReflectionFactory.readObjectForSerialization(ReflectionFactory.java:537)
          13:19:16  	at jdk.unsupported/sun.reflect.ReflectionFactory.readObjectForSerialization(ReflectionFactory.java:144)
          13:19:16  	at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.<init>(JDKSpecific.java:61)
          13:19:16  	at org.jboss.marshalling.reflect.SerializableClass.<init>(SerializableClass.java:84)
          13:19:16  	at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:62)
          13:19:16  	at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:59)
          13:19:16  	at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228)
          13:19:16  	at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210)
          13:19:16  	at java.base/java.lang.ClassValue.get(ClassValue.java:116)
          13:19:16  	at org.jboss.marshalling.reflect.SerializableClassRegistry.lookup(SerializableClassRegistry.java:83)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.writeNewSerializableClass(RiverMarshaller.java:1514)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.writeNewClass(RiverMarshaller.java:1417)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.writeClass(RiverMarshaller.java:1268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.writeClassClass(RiverMarshaller.java:1256)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:166)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.writeArrayObject(RiverMarshaller.java:312)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:222)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.writeArrayObject(RiverMarshaller.java:312)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:222)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
          13:19:16  	at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
          13:19:16  	at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
          13:19:16  	at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
          13:19:16  	at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:341)
          13:19:16  	at java.base/java.util.HashMap.internalWriteEntries(HashMap.java:1858)
          13:19:16  	at java.base/java.util.HashMap.writeObject(HashMap.java:1412)
          13:19:16  	at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:89)
          13:19:16  	at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:199)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1089)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
          13:19:16  	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
          13:19:16  	at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
          13:19:16  	at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:116)
          13:19:16  	at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.lambda$writeObject$1(RiverWriter.java:144)
          13:19:16  	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:331)
          13:19:16  	at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:143)
          13:19:16  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:578)
          13:19:16  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:554)
          13:19:16  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgramIfPossible(CpsThreadGroup.java:537)
          13:19:16  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:461)
          13:19:16  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95)
          13:19:16  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
          13:19:16  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
          13:19:16  	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
          13:19:16  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          13:19:16  	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
          13:19:16  	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:30)
          13:19:16  	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:70)
          13:19:16  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
          13:19:16  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          13:19:16  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          13:19:16  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          13:19:16  	at java.base/java.lang.Thread.run(Thread.java:829)
          13:19:16  Finished: FAILURE
          

          Our original error from our script was less speaking and more comparable to the one from lho:

          [2022-11-15T07:21:34.167Z] java.lang.VerifyError: (class: de/company/TestRunner, method: add signature: (Ljava/lang/Object;)V) Unable to pop operand off an empty stack
          [2022-11-15T07:21:34.167Z] 	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.GroovyCallSiteSelector.constructor(GroovyCallSiteSelector.java:67)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.GroovyCallSiteSelector.findConstructor(GroovyCallSiteSelector.java:45)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedConstructor(Checker.java:223)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$checkedConstructor.callStatic(Unknown Source)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:197)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:217)
          [2022-11-15T07:21:34.167Z] 	at de.company.AllTests.run(AllTests.groovy:13)
          [2022-11-15T07:21:34.167Z] 	at de.company.AllTests$run.callStatic(Unknown Source)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:197)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:216)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onStaticCall(GroovyInterceptor.java:35)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onStaticCall(SandboxInterceptor.java:190)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:214)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedStaticCall(Checker.java:218)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.workflow.libs.LibraryStep$LoadedClasses.invokeMethod(LibraryStep.java:310)
          [2022-11-15T07:21:34.167Z] 	at jdk.internal.reflect.GeneratedMethodAccessor16319.invoke(Unknown Source)
          [2022-11-15T07:21:34.167Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
          [2022-11-15T07:21:34.167Z] 	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
          [2022-11-15T07:21:34.167Z] 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
          [2022-11-15T07:21:34.167Z] 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:41)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:180)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:161)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:146)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:178)
          [2022-11-15T07:21:34.167Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:182)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
          [2022-11-15T07:21:34.167Z] 	at WorkflowScript.run(WorkflowScript:5)
          [2022-11-15T07:21:34.167Z] 	at ___cps.transform___(Native Method)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:90)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:116)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:85)
          [2022-11-15T07:21:34.167Z] 	at jdk.internal.reflect.GeneratedMethodAccessor588.invoke(Unknown Source)
          [2022-11-15T07:21:34.167Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:158)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:152)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
          [2022-11-15T07:21:34.167Z] 	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
          [2022-11-15T07:21:34.167Z] 	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:152)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
          [2022-11-15T07:21:34.167Z] 	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          [2022-11-15T07:21:34.167Z] 	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
          [2022-11-15T07:21:34.167Z] 	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
          [2022-11-15T07:21:34.167Z] 	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          [2022-11-15T07:21:34.167Z] 	at java.base/java.lang.Thread.run(Thread.java:829)
          [2022-11-15T07:21:34.455Z] Finished: FAILURE
          

          From what we can tell our issue appears to be related to the list append we're doing, namely:

          testCases += newTests
          

          If we replace this with:

          testCases = testCases + newTests
          

          the error disappears and the script works as before.

          We're not sure what has changed here.

          Marian Degel added a comment - - edited We have a similar error after the latest update which we could boil down to the following minimal example: // Jenkinsfile class TestRunner { private def testCases = [:] @NonCPS void add(newTests) { testCases += newTests } } node( 'test' ){ stage( 'a' ){ script { def t = new TestRunner() } echo "Hello" } } which causes: java.lang.VerifyError: (class: TestRunner, method: add signature: (Ljava/lang/Object;)V) Unable to pop operand off an empty stack 13:19:16 at java.base/java.lang.Class.getDeclaredMethods0(Native Method) 13:19:16 at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166) 13:19:16 at java.base/java.lang.Class.getDeclaredMethod(Class.java:2473) 13:19:16 at java.base/jdk.internal.reflect.ReflectionFactory.findReadWriteObjectForSerialization(ReflectionFactory.java:556) 13:19:16 at java.base/jdk.internal.reflect.ReflectionFactory.readObjectForSerialization(ReflectionFactory.java:537) 13:19:16 at jdk.unsupported/sun.reflect.ReflectionFactory.readObjectForSerialization(ReflectionFactory.java:144) 13:19:16 at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.<init>(JDKSpecific.java:61) 13:19:16 at org.jboss.marshalling.reflect.SerializableClass.<init>(SerializableClass.java:84) 13:19:16 at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:62) 13:19:16 at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:59) 13:19:16 at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228) 13:19:16 at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210) 13:19:16 at java.base/java.lang.ClassValue.get(ClassValue.java:116) 13:19:16 at org.jboss.marshalling.reflect.SerializableClassRegistry.lookup(SerializableClassRegistry.java:83) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.writeNewSerializableClass(RiverMarshaller.java:1514) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.writeNewClass(RiverMarshaller.java:1417) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.writeClass(RiverMarshaller.java:1268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.writeClassClass(RiverMarshaller.java:1256) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:166) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.writeArrayObject(RiverMarshaller.java:312) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:222) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.writeArrayObject(RiverMarshaller.java:312) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:222) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65) 13:19:16 at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56) 13:19:16 at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50) 13:19:16 at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179) 13:19:16 at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:341) 13:19:16 at java.base/java.util.HashMap.internalWriteEntries(HashMap.java:1858) 13:19:16 at java.base/java.util.HashMap.writeObject(HashMap.java:1412) 13:19:16 at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:89) 13:19:16 at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:199) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1089) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101) 13:19:16 at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268) 13:19:16 at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58) 13:19:16 at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:116) 13:19:16 at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.lambda$writeObject$1(RiverWriter.java:144) 13:19:16 at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:331) 13:19:16 at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:143) 13:19:16 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:578) 13:19:16 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:554) 13:19:16 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgramIfPossible(CpsThreadGroup.java:537) 13:19:16 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:461) 13:19:16 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95) 13:19:16 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330) 13:19:16 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294) 13:19:16 at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67) 13:19:16 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 13:19:16 at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139) 13:19:16 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:30) 13:19:16 at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:70) 13:19:16 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 13:19:16 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 13:19:16 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 13:19:16 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 13:19:16 at java.base/java.lang.Thread.run(Thread.java:829) 13:19:16 Finished: FAILURE Our original error from our script was less speaking and more comparable to the one from lho : [2022-11-15T07:21:34.167Z] java.lang.VerifyError: (class: de/company/TestRunner, method: add signature: (Ljava/lang/Object;)V) Unable to pop operand off an empty stack [2022-11-15T07:21:34.167Z] at java.base/java.lang.Class.getDeclaredConstructors0(Native Method) [2022-11-15T07:21:34.167Z] at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137) [2022-11-15T07:21:34.167Z] at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.GroovyCallSiteSelector.constructor(GroovyCallSiteSelector.java:67) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.GroovyCallSiteSelector.findConstructor(GroovyCallSiteSelector.java:45) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.Checker.checkedConstructor(Checker.java:223) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.Checker$checkedConstructor.callStatic(Unknown Source) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:197) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:217) [2022-11-15T07:21:34.167Z] at de.company.AllTests.run(AllTests.groovy:13) [2022-11-15T07:21:34.167Z] at de.company.AllTests$run.callStatic(Unknown Source) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:197) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:216) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.GroovyInterceptor.onStaticCall(GroovyInterceptor.java:35) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onStaticCall(SandboxInterceptor.java:190) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:214) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.Checker.checkedStaticCall(Checker.java:218) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.workflow.libs.LibraryStep$LoadedClasses.invokeMethod(LibraryStep.java:310) [2022-11-15T07:21:34.167Z] at jdk.internal.reflect.GeneratedMethodAccessor16319.invoke(Unknown Source) [2022-11-15T07:21:34.167Z] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [2022-11-15T07:21:34.167Z] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) [2022-11-15T07:21:34.167Z] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) [2022-11-15T07:21:34.167Z] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225) [2022-11-15T07:21:34.167Z] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:41) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:180) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:161) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:146) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:178) [2022-11-15T07:21:34.167Z] at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:182) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) [2022-11-15T07:21:34.167Z] at WorkflowScript.run(WorkflowScript:5) [2022-11-15T07:21:34.167Z] at ___cps.transform___(Native Method) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:90) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:116) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:85) [2022-11-15T07:21:34.167Z] at jdk.internal.reflect.GeneratedMethodAccessor588.invoke(Unknown Source) [2022-11-15T07:21:34.167Z] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [2022-11-15T07:21:34.167Z] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.Next.step(Next.java:83) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:158) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:152) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136) [2022-11-15T07:21:34.167Z] at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275) [2022-11-15T07:21:34.167Z] at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:152) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:187) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:420) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:95) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294) [2022-11-15T07:21:34.167Z] at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67) [2022-11-15T07:21:34.167Z] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [2022-11-15T07:21:34.167Z] at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139) [2022-11-15T07:21:34.167Z] at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) [2022-11-15T07:21:34.167Z] at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68) [2022-11-15T07:21:34.167Z] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [2022-11-15T07:21:34.167Z] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [2022-11-15T07:21:34.167Z] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [2022-11-15T07:21:34.167Z] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [2022-11-15T07:21:34.167Z] at java.base/java.lang.Thread.run(Thread.java:829) [2022-11-15T07:21:34.455Z] Finished: FAILURE From what we can tell our issue appears to be related to the list append we're doing, namely: testCases += newTests If we replace this with: testCases = testCases + newTests the error disappears and the script works as before. We're not sure what has changed here.

          kgiloo added a comment -

          set Issue to "Major": all of a sudden very damaging and enigmatic

          kgiloo added a comment - set Issue to "Major": all of a sudden very damaging and enigmatic

          Devin Nusbaum added a comment -

          I just saw this issue and will look into it. In the meantime, I think you can avoid the issue by expanding all compound assignments to fields in constructors or @NonCPS methods as noted by degelma. For example, this is currently broken:

          class Test {
            def field
            @NonCPS
            def method() {
              field += ...
            }
          } 

          A workaround is to avoid the compound operator:

          class Test {
            def field
            @NonCPS
            def method() {
              field = field + ...
            }
          } 

          Depending on your specific case, another workaround is to perform the assignment in CPS-transformed code (i.e. remove @NonCPS), but this may not work in all cases and is impossible if the assignment happens in a constructor.

          Devin Nusbaum added a comment - I just saw this issue and will look into it. In the meantime, I think you can avoid the issue by expanding all compound assignments to fields in constructors or @NonCPS methods as noted by degelma . For example, this is currently broken: class Test { def field @NonCPS def method() { field += ... } } A workaround is to avoid the compound operator: class Test { def field @NonCPS def method() { field = field + ... } } Depending on your specific case, another workaround is to perform the assignment in CPS-transformed code (i.e. remove @NonCPS ), but this may not work in all cases and is impossible if the assignment happens in a constructor.

          Devin Nusbaum added a comment -

          A fix for this issue has just been released in Script Security plugin version 1244.ve463715a_f89c.

          Devin Nusbaum added a comment - A fix for this issue has just been released in Script Security plugin version 1244.ve463715a_f89c .

            dnusbaum Devin Nusbaum
            lho Lennart
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: