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

ISE from BuildTriggerListener.onDeleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            As of PR 109 you get a somewhat different warning:

            … org.jenkinsci.plugins.workflow.cps.CpsStepContext onFailure
            WARNING: already completed CpsStepContext[3]:Owner[us/1:us #1]
            java.lang.IllegalStateException: hudson.AbortException: ds #1 was deleted
            	at org.jenkinsci.plugins.workflow.cps.CpsStepContext.onFailure(CpsStepContext.java:320)
            	at org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerListener.onDeleted(BuildTriggerListener.java:53)
            	at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:246)
            	at hudson.model.Run.delete(Run.java:1483)
            	at …
            
            Show
            jglick Jesse Glick added a comment - As of PR 109 you get a somewhat different warning: … org.jenkinsci.plugins.workflow.cps.CpsStepContext onFailure WARNING: already completed CpsStepContext[3]:Owner[us/1:us #1] java.lang.IllegalStateException: hudson.AbortException: ds #1 was deleted at org.jenkinsci.plugins.workflow.cps.CpsStepContext.onFailure(CpsStepContext.java:320) at org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerListener.onDeleted(BuildTriggerListener.java:53) at hudson.model.listeners.RunListener.fireDeleted(RunListener.java:246) at hudson.model.Run.delete(Run.java:1483) at …
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerListener.java
            src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepRestartTest.java
            src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepTest.java
            http://jenkins-ci.org/commit/pipeline-build-step-plugin/c869245bed52a6b0b9c35e9a38f4c6d3f843a1ff
            Log:
            [FIXED JENKINS-28673] ISE after deleting a downstream build.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerListener.java src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepRestartTest.java src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepTest.java http://jenkins-ci.org/commit/pipeline-build-step-plugin/c869245bed52a6b0b9c35e9a38f4c6d3f843a1ff Log: [FIXED JENKINS-28673] ISE after deleting a downstream build.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerListener.java
            src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepRestartTest.java
            src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepTest.java
            http://jenkins-ci.org/commit/pipeline-build-step-plugin/3e7943a4afc873b1355eb9f406e82ad0e05dea24
            Log:
            Merge pull request #2 from jglick/ISE-JENKINS-28673

            JENKINS-28673 ISE after deleting a downstream build

            Compare: https://github.com/jenkinsci/pipeline-build-step-plugin/compare/a850c28adbe2...3e7943a4afc8

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerListener.java src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepRestartTest.java src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerStepTest.java http://jenkins-ci.org/commit/pipeline-build-step-plugin/3e7943a4afc873b1355eb9f406e82ad0e05dea24 Log: Merge pull request #2 from jglick/ISE- JENKINS-28673 JENKINS-28673 ISE after deleting a downstream build Compare: https://github.com/jenkinsci/pipeline-build-step-plugin/compare/a850c28adbe2...3e7943a4afc8

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: