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

Hang in StageStepExecution.println

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Have seen some hung threads ending with

      at java.lang.Thread.sleep(Native Method) 
      at org.jenkinsci.plugins.workflow.cps.CpsStepContext.getThreadGroupSynchronously(CpsStepContext.java:241) 
      at org.jenkinsci.plugins.workflow.cps.CpsStepContext.getThreadSynchronously(CpsStepContext.java:233) 
      at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:285) 
      at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:70) 
      at org.jenkinsci.plugins.workflow.support.steps.StageStepExecution.println(StageStepExecution.java:226) 
      at org.jenkinsci.plugins.workflow.support.steps.StageStepExecution.cancel(StageStepExecution.java:234) 
      at org.jenkinsci.plugins.workflow.support.steps.StageStepExecution.enter(StageStepExecution.java:133)
      

      This locks StageStepExecution.class, blocking other threads. The thread dump suggests that a valid build is entering a stage which involves canceling an invalid build (one which is on the books but apparently broken in some fashion), and this hangs when it ought not.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            CHANGES.md
            cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java
            cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java
            support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java
            http://jenkins-ci.org/commit/workflow-plugin/0b4c317b7bc610283be00fef18b796a43315454c
            Log:
            [FIXED JENKINS-33005] Make StageStepExecution defensively call isReady on foreign builds.
            Also make CpsFlowExecution.onLoad unconditionally set programPromise, in case CpsStepContext.getThreadGroupSynchronously is waiting for it.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: CHANGES.md cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java http://jenkins-ci.org/commit/workflow-plugin/0b4c317b7bc610283be00fef18b796a43315454c Log: [FIXED JENKINS-33005] Make StageStepExecution defensively call isReady on foreign builds. Also make CpsFlowExecution.onLoad unconditionally set programPromise, in case CpsStepContext.getThreadGroupSynchronously is waiting for it.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            CHANGES.md
            cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java
            cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java
            support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java
            http://jenkins-ci.org/commit/workflow-plugin/5b2dd6f5a070d1543511d1d2c64af3311d2b5738
            Log:
            Merge pull request #343 from jglick/StageStepExecution-isReady-JENKINS-33005

            JENKINS-33005 Hang in StageStepExecution.println

            Compare: https://github.com/jenkinsci/workflow-plugin/compare/541faf611659...5b2dd6f5a070

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: CHANGES.md cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java http://jenkins-ci.org/commit/workflow-plugin/5b2dd6f5a070d1543511d1d2c64af3311d2b5738 Log: Merge pull request #343 from jglick/StageStepExecution-isReady- JENKINS-33005 JENKINS-33005 Hang in StageStepExecution.println Compare: https://github.com/jenkinsci/workflow-plugin/compare/541faf611659...5b2dd6f5a070
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java
            http://jenkins-ci.org/commit/pipeline-stage-step-plugin/7160487f137949e00eab14441969c72055225e98
            Log:
            [FIXED JENKINS-33005] Make StageStepExecution defensively call isReady on foreign builds.
            Also make CpsFlowExecution.onLoad unconditionally set programPromise, in case CpsStepContext.getThreadGroupSynchronously is waiting for it.
            Originally-Committed-As: 0b4c317b7bc610283be00fef18b796a43315454c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/StageStepExecution.java http://jenkins-ci.org/commit/pipeline-stage-step-plugin/7160487f137949e00eab14441969c72055225e98 Log: [FIXED JENKINS-33005] Make StageStepExecution defensively call isReady on foreign builds. Also make CpsFlowExecution.onLoad unconditionally set programPromise, in case CpsStepContext.getThreadGroupSynchronously is waiting for it. Originally-Committed-As: 0b4c317b7bc610283be00fef18b796a43315454c
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java
            cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java
            http://jenkins-ci.org/commit/workflow-cps-plugin/53ac56fa79c8b063cb86ee150f21538ac1d4dba8
            Log:
            [FIXED JENKINS-33005] Make StageStepExecution defensively call isReady on foreign builds.
            Also make CpsFlowExecution.onLoad unconditionally set programPromise, in case CpsStepContext.getThreadGroupSynchronously is waiting for it.
            Originally-Committed-As: 0b4c317b7bc610283be00fef18b796a43315454c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java cps/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java http://jenkins-ci.org/commit/workflow-cps-plugin/53ac56fa79c8b063cb86ee150f21538ac1d4dba8 Log: [FIXED JENKINS-33005] Make StageStepExecution defensively call isReady on foreign builds. Also make CpsFlowExecution.onLoad unconditionally set programPromise, in case CpsStepContext.getThreadGroupSynchronously is waiting for it. Originally-Committed-As: 0b4c317b7bc610283be00fef18b796a43315454c

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              jglick Jesse Glick
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: