IllegalStateException with "Failed to proceed after CpsStepContext"

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I am seeing warnings and exceptions in my systemd journal for scheduled builds:

      WARNING    o.j.p.w.cps.CpsStepContext$2#onFailure: Failed to proceed after CpsStepContext[129:build]:Owner[name_all/865:name_all #865]
      java.lang.IllegalStateException: completed or broken execution
           at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.onLoad(CpsFlowExecution.java:833)
           at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.getExecution(WorkflowRun.java:719)
           at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun$Owner.get(WorkflowRun.java:992)
           at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsStepContext.getExecution(CpsStepContext.java:217)
           at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsStepContext.getNode(CpsStepContext.java:302)
           at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsStepContext.scheduleNextRun(CpsStepContext.java:368)
           at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsStepContext.completed(CpsStepContext.java:326)
           at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsStepContext.onFailure(CpsStepContext.java:314)
           at PluginClassLoader for pipeline-build-step//org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerListener.lambda$onDeleted$1(BuildTriggerListener.java:86)
           at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67)
           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.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
           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)

      Relevant section from the pipeline:

      def buildJobs = [:]
      List jobsToBuild = getJobsToBuild()
      for (jobName in jobsToBuild) {
          def job = jobName
          buildJobs["${job}"] = {
              stage("${job}") {
                  catchError(buildResult: 'Failure', stageResult: 'Failure') {
                      build job: "${job}"
                  }
              }
          }
      }
      parallel buildJobs

      Some background: This is a scheduled pipeline which invokes multiple other pipelines - I can see this for cases where all "sub-pipelines" are STABLE and for mixed cases of STABLE and UNSTABLE. The overall pipeline result is always as expected from the "sub-pipelines". The build log itself shows no errors. The above stacktrace is shown when setting the overall pipeline result according to the timestamps.

      Build number 865, which is part of the warning/stacktrace, is not the latest build, but the oldest one being removed in this case due to the "Discard old builds" option being configured to "Log Rotation" with a fixed age.

            Assignee:
            Unassigned
            Reporter:
            Stefan
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: