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

hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage()

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We have a declarative pipeline (groovy file) which is used by several projects to perform the deployment. As of uprading to Jenkins LTS 2.150.1 some of the jobs are failing, where others don't. Interestingly the pipeline itself runs on master.

      Here a simplified pipeline:

       

      #!groovy
      import groovy.transform.Field
      @Field PipelineUtil 
      //PipelineUtil=library(identifier: 'pipeline-helper@master').ch.swisscard.jenkins.pipeline.util.PipelineUtil
      PipelineUtil=library(identifier: 'pipeline-helper@master', retriever: modernSCM(
        [$class: 'GitSCMSource',
             remote: 'https://scm.sc.intra/scm/octopus/pipeline-helper.git',
             credentialsId: 'bitbucket.service.user'
        ])).ch.swisscard.jenkins.pipeline.util.PipelineUtillibrary identifier: 'octopus-pipeline-core@master', retriever: modernSCM(
        [$class: 'GitSCMSource',
             remote: 'https://scm.sc.intra/scm/octopus/octopus-pipeline-core.git',
             credentialsId: 'bitbucket.service.user'
        ])import hudson.AbortException
      import hudson.model.ChoiceParameterDefinition
      import org.apache.commons.lang3.exception.ExceptionUtils
      import org.jenkinsci.plugins.workflow.support.steps.build.RunWrapperpipeline {
          agent {
              label "master"
          }
          options {
              /*
              - daysToKeepStr: history is only kept up to this days.
              - numToKeepStr: only this number of build logs are kept.
              - artifactDaysToKeepStr: artifacts are only kept up to this days.
              - artifactNumToKeepStr: only this number of builds have their artifacts kept.
              */
              buildDiscarder(logRotator(daysToKeepStr: '365'))
              disableConcurrentBuilds()
              timestamps()
          }
          parameters {
              booleanParam(defaultValue: false, description: 'Runs the pipeline in dry run (aka dummy) w/o actually deploying or automatic workorder creation', name: 'dryRun')
          }    stages {
              stage('Deployment') {
                  steps {
                      script {
                          ....
                          this.deploy(currentStage, currentNode, currentJob, solution, tagPrefix, selectedTag, currentTag, recipient, sender, prdOperators, gitUrl, true)
                          if (currentBuild.result.equals('UNSTABLE')) {
                              return
                          }
                      }
                  }
              }
              stage('Cleanup') {
                  steps{
                      script {
                          dbInsertBuildEnd(currentBuild, "SUCCESS")
                          PipelineUtil.setBuildDescription(currentBuild, 'Deployment Ended')
                      }
                  }
              }
          }
      }
      

      The pipeline `deploy` is always successful, but - if we encounter the error - we get the following log output but never reach the stage "Cleanup"

      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // script
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // timestamps
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage() is applicable for argument types: (org.jenkinsci.plugins.pipeline.modeldefinition.model.Root, org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent, org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage, null) values: [org.jenkinsci.plugins.pipeline.modeldefinition.model.Root(org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent(null), org.jenkinsci.plugins.pipeline.modeldefinition.model.Stages([org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage(Deployment, null, null, null, null, null, org.jenkinsci.plugins.pipeline.modeldefinition.model.StepsBlock(org.jenkinsci.plugins.workflow.cps.CpsClosure2@379705ac), null, null, null, false, null, null), org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage(Cleanup, null, null, null, null, null, org.jenkinsci.plugins.pipeline.modeldefinition.model.StepsBlock(org.jenkinsci.plugins.workflow.cps.CpsClosure2@2f9438c9), null, null, null, false, null, null)]), null, null, null, org.jenkinsci.plugins.pipeline.modeldefinition.model.Options([], [:], [:]), null, org.jenkinsci.plugins.pipeline.modeldefinition.model.Parameters([hudson.model.BooleanParameterDefinition@5e540782]), null, b74bfec5-972b-4b40-b872-4cd559b3d11d), ...]
      Possible solutions: evaluateStage(org.jenkinsci.plugins.pipeline.modeldefinition.model.Root, org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent, org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage, java.lang.Throwable, org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage, org.jenkinsci.plugins.pipeline.modeldefinition.model.SkippedStageReason)
      	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:19)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:76)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2030)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2015)
      	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2056)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:74)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:455)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:454)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:73)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.recursiveWrappers(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:530)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.recursiveWrappers(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:529)
      	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.recursiveWrappers(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:545)
      	at ___cps.transform___(Native Method)
      	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
      	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
      	at sun.reflect.GeneratedMethodAccessor809.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.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39)
      	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
      	at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28)
      	at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
      	at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
      	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$101(SandboxContinuable.java:34)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58)
      	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:182)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      	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)
      Finished: FAILURE
      

       

       

        Attachments

          Activity

          papanito papanito created issue -
          papanito papanito made changes -
          Field Original Value New Value
          Description We have a declarative pipeline (groovy file) which is used by several projects to perform the deployment. As of uprading to Jenkins LTS 2.150.1 some of the jobs are failing, where others don't. Interestingly the pipeline itself runs on master.

          Here a simplified pipeline:

           
          {code:java}
          #!groovy
          import groovy.transform.Field
          @Field PipelineUtil
          //PipelineUtil=library(identifier: 'pipeline-helper@master').ch.swisscard.jenkins.pipeline.util.PipelineUtil
          PipelineUtil=library(identifier: 'pipeline-helper@master', retriever: modernSCM(
            [$class: 'GitSCMSource',
                 remote: 'https://scm.sc.intra/scm/octopus/pipeline-helper.git',
                 credentialsId: 'bitbucket.service.user'
            ])).ch.swisscard.jenkins.pipeline.util.PipelineUtillibrary identifier: 'octopus-pipeline-core@master', retriever: modernSCM(
            [$class: 'GitSCMSource',
                 remote: 'https://scm.sc.intra/scm/octopus/octopus-pipeline-core.git',
                 credentialsId: 'bitbucket.service.user'
            ])import hudson.AbortException
          import hudson.model.ChoiceParameterDefinition
          import org.apache.commons.lang3.exception.ExceptionUtils
          import org.jenkinsci.plugins.workflow.support.steps.build.RunWrapperpipeline {
              agent {
                  label "master"
              }
              options {
                  /*
                  - daysToKeepStr: history is only kept up to this days.
                  - numToKeepStr: only this number of build logs are kept.
                  - artifactDaysToKeepStr: artifacts are only kept up to this days.
                  - artifactNumToKeepStr: only this number of builds have their artifacts kept.
                  */
                  buildDiscarder(logRotator(daysToKeepStr: '365'))
                  disableConcurrentBuilds()
                  timestamps()
              }
              parameters {
                  booleanParam(defaultValue: false, description: 'Runs the pipeline in dry run (aka dummy) w/o actually deploying or automatic workorder creation', name: 'dryRun')
              } stages {
                  stage('Deployment') {
                      steps {
                          script {
                              ....
                              this.deploy(currentStage, currentNode, currentJob, solution, tagPrefix, selectedTag, currentTag, recipient, sender, prdOperators, gitUrl, true)
                              if (currentBuild.result.equals('UNSTABLE')) {
                                  return
                              }
                          }
                      }
                  }
                  stage('Cleanup') {
                      steps{
                          script {
                              dbInsertBuildEnd(currentBuild, "SUCCESS")
                              PipelineUtil.setBuildDescription(currentBuild, 'Deployment Ended')
                          }
                      }
                  }
              }
          }
          {code}
          The pipeline `deploy` is always successful, but - if we encounter the error - we get the following log output but never reach the stage "Cleanup"

           

           
          {code:java}
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // script
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // timestamps
          [Pipeline] }
          [Pipeline] // withEnv
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage() is applicable for argument types: (org.jenkinsci.plugins.pipeline.modeldefinition.model.Root, org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent, org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage, null) values: [org.jenkinsci.plugins.pipeline.modeldefinition.model.Root(org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent(null), org.jenkinsci.plugins.pipeline.modeldefinition.model.Stages([org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage(Deployment, null, null, null, null, null, org.jenkinsci.plugins.pipeline.modeldefinition.model.StepsBlock(org.jenkinsci.plugins.workflow.cps.CpsClosure2@379705ac), null, null, null, false, null, null), org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage(Cleanup, null, null, null, null, null, org.jenkinsci.plugins.pipeline.modeldefinition.model.StepsBlock(org.jenkinsci.plugins.workflow.cps.CpsClosure2@2f9438c9), null, null, null, false, null, null)]), null, null, null, org.jenkinsci.plugins.pipeline.modeldefinition.model.Options([], [:], [:]), null, org.jenkinsci.plugins.pipeline.modeldefinition.model.Parameters([hudson.model.BooleanParameterDefinition@5e540782]), null, b74bfec5-972b-4b40-b872-4cd559b3d11d), ...]
          Possible solutions: evaluateStage(org.jenkinsci.plugins.pipeline.modeldefinition.model.Root, org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent, org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage, java.lang.Throwable, org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage, org.jenkinsci.plugins.pipeline.modeldefinition.model.SkippedStageReason)
          at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
          at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
          at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:19)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:76)
          at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2030)
          at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2015)
          at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2056)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:74)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:455)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:454)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:73)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.recursiveWrappers(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:530)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.recursiveWrappers(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:529)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.recursiveWrappers(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:545)
          at ___cps.transform___(Native Method)
          at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
          at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
          at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
          at sun.reflect.GeneratedMethodAccessor809.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.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39)
          at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
          at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28)
          at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
          at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
          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$101(SandboxContinuable.java:34)
          at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59)
          at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
          at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58)
          at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:182)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
          at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
          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)
          Finished: FAILURE
          {code}
           

           
          We have a declarative pipeline (groovy file) which is used by several projects to perform the deployment. As of uprading to Jenkins LTS 2.150.1 some of the jobs are failing, where others don't. Interestingly the pipeline itself runs on master.

          Here a simplified pipeline:

           
          {code:java}
          #!groovy
          import groovy.transform.Field
          @Field PipelineUtil
          //PipelineUtil=library(identifier: 'pipeline-helper@master').ch.swisscard.jenkins.pipeline.util.PipelineUtil
          PipelineUtil=library(identifier: 'pipeline-helper@master', retriever: modernSCM(
            [$class: 'GitSCMSource',
                 remote: 'https://scm.sc.intra/scm/octopus/pipeline-helper.git',
                 credentialsId: 'bitbucket.service.user'
            ])).ch.swisscard.jenkins.pipeline.util.PipelineUtillibrary identifier: 'octopus-pipeline-core@master', retriever: modernSCM(
            [$class: 'GitSCMSource',
                 remote: 'https://scm.sc.intra/scm/octopus/octopus-pipeline-core.git',
                 credentialsId: 'bitbucket.service.user'
            ])import hudson.AbortException
          import hudson.model.ChoiceParameterDefinition
          import org.apache.commons.lang3.exception.ExceptionUtils
          import org.jenkinsci.plugins.workflow.support.steps.build.RunWrapperpipeline {
              agent {
                  label "master"
              }
              options {
                  /*
                  - daysToKeepStr: history is only kept up to this days.
                  - numToKeepStr: only this number of build logs are kept.
                  - artifactDaysToKeepStr: artifacts are only kept up to this days.
                  - artifactNumToKeepStr: only this number of builds have their artifacts kept.
                  */
                  buildDiscarder(logRotator(daysToKeepStr: '365'))
                  disableConcurrentBuilds()
                  timestamps()
              }
              parameters {
                  booleanParam(defaultValue: false, description: 'Runs the pipeline in dry run (aka dummy) w/o actually deploying or automatic workorder creation', name: 'dryRun')
              } stages {
                  stage('Deployment') {
                      steps {
                          script {
                              ....
                              this.deploy(currentStage, currentNode, currentJob, solution, tagPrefix, selectedTag, currentTag, recipient, sender, prdOperators, gitUrl, true)
                              if (currentBuild.result.equals('UNSTABLE')) {
                                  return
                              }
                          }
                      }
                  }
                  stage('Cleanup') {
                      steps{
                          script {
                              dbInsertBuildEnd(currentBuild, "SUCCESS")
                              PipelineUtil.setBuildDescription(currentBuild, 'Deployment Ended')
                          }
                      }
                  }
              }
          }
          {code}
          The pipeline `deploy` is always successful, but - if we encounter the error - we get the following log output but never reach the stage "Cleanup"
          {code:java}
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // script
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // timestamps
          [Pipeline] }
          [Pipeline] // withEnv
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage() is applicable for argument types: (org.jenkinsci.plugins.pipeline.modeldefinition.model.Root, org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent, org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage, null) values: [org.jenkinsci.plugins.pipeline.modeldefinition.model.Root(org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent(null), org.jenkinsci.plugins.pipeline.modeldefinition.model.Stages([org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage(Deployment, null, null, null, null, null, org.jenkinsci.plugins.pipeline.modeldefinition.model.StepsBlock(org.jenkinsci.plugins.workflow.cps.CpsClosure2@379705ac), null, null, null, false, null, null), org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage(Cleanup, null, null, null, null, null, org.jenkinsci.plugins.pipeline.modeldefinition.model.StepsBlock(org.jenkinsci.plugins.workflow.cps.CpsClosure2@2f9438c9), null, null, null, false, null, null)]), null, null, null, org.jenkinsci.plugins.pipeline.modeldefinition.model.Options([], [:], [:]), null, org.jenkinsci.plugins.pipeline.modeldefinition.model.Parameters([hudson.model.BooleanParameterDefinition@5e540782]), null, b74bfec5-972b-4b40-b872-4cd559b3d11d), ...]
          Possible solutions: evaluateStage(org.jenkinsci.plugins.pipeline.modeldefinition.model.Root, org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent, org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage, java.lang.Throwable, org.jenkinsci.plugins.pipeline.modeldefinition.model.Stage, org.jenkinsci.plugins.pipeline.modeldefinition.model.SkippedStageReason)
          at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
          at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
          at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:19)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:76)
          at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2030)
          at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2015)
          at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2056)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:74)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:455)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.toolsBlock(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:454)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:73)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.recursiveWrappers(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:530)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.recursiveWrappers(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:529)
          at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.recursiveWrappers(jar:file:/D:/data/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:545)
          at ___cps.transform___(Native Method)
          at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
          at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
          at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
          at sun.reflect.GeneratedMethodAccessor809.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.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39)
          at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
          at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28)
          at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
          at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
          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$101(SandboxContinuable.java:34)
          at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59)
          at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
          at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58)
          at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:182)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
          at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
          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)
          Finished: FAILURE
          {code}
           

           
          abayer Andrew Bayer made changes -
          Component/s pipeline-model-definition-plugin [ 21706 ]
          Component/s pipeline [ 21692 ]
          abayer Andrew Bayer made changes -
          Assignee Andrew Bayer [ abayer ]
          ekassis Elie Kassis made changes -
          Priority Minor [ 4 ] Blocker [ 1 ]
          abayer Andrew Bayer made changes -
          Assignee Andrew Bayer [ abayer ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            papanito papanito
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: