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

ISE from BuildTriggerListener.onDeleted


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • None

      Observed in a log file from 1.4 on 1.580.3:

      ... hudson.model.listeners.RunListener report
      WARNING: RunListener failed
      java.lang.IllegalStateException: broken flow
          at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.runInCpsVmThread(CpsFlowExecution.java:506)
          at org.jenkinsci.plugins.workflow.cps.CpsStepContext.scheduleNextRun(CpsStepContext.java:343)
          at org.jenkinsci.plugins.workflow.cps.CpsStepContext.onFailure(CpsStepContext.java:313)
          at org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerListener.onDeleted(BuildTriggerListener.java:33)
          at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:244)
          at hudson.model.Run.delete(Run.java:1488)
          at hudson.maven.MavenModuleSetBuild.delete(MavenModuleSetBuild.java:438)
          at hudson.tasks.LogRotator.perform(LogRotator.java:129)
          at hudson.model.Job.logRotate(Job.java:447)
          at ...

      This seems to be printed to the log even in the normal case that both upstream and downstream are long finished, and the downstream just got log-rotated. Probably onCompleted should delete BuildTriggerAction?

      Note that fcff78cd04b7410dcaa2a7bd124750f2bda7ba08 in 1.7 addressed an ISE but from isCompleted, not scheduleNextRun. Probably CpsFlowExecution.runInCpsVmThread should also log a warning and return, rather than throw up ISE, if programPromise == null.

            jglick Jesse Glick
            jglick Jesse Glick
            1 Vote for this issue
            4 Start watching this issue