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

Pipeline: StackOverflowError at io.jenkins.blueocean.events.PipelineEventListener$StageEventPublisher.getParentBlock(PipelineEventListener.java:110)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
      Jenkins Version: 2.44
      Pipeline Groovy: 2.36
      Blue Ocean: 1.1.2
    • Similar Issues:
    • Sprint:
      Blue Ocean - Candidates

      Description

      When executing a Pipeline script with a long-running loop that uses nested closures, a StackOverflowError occurs and the job aborts abruptly.

       

      Reproduction steps:

      1. Create a Pipeline job with this as the script:
        1. def finished = false
          def someMap = ['foo':'bar', 'baz':'spam']
          def someOtherMap = ['foo':'baz', 'baz':'bar']
          node {
            def incr = 0
            while (true) {
              someMap.each{ foo, bar ->
                sh "echo ${foo} ${bar} ${incr}"
                incr++
                someOtherMap.each{ baz, spam ->
                  sh "echo ${baz} ${spam} ${incr}"
                }
              }
            }
          }
      1. Run the job
      2. Wait for about an hour. For me, the loop executes nearly 4000 times before the error. Maybe easier to reproduce on a smaller stack.

      Attached is the (not-very-interesting) resultant stack trace.

        Attachments

          Issue Links

            Activity

            Hide
            jdkern Josh Kern added a comment -

            Is there any status update here?  Any known workarounds for this issue?

            Show
            jdkern Josh Kern added a comment - Is there any status update here?  Any known workarounds for this issue?
            Hide
            olamy Olivier Lamy added a comment -

            do you still have the issue with last blue ocean version?

            Show
            olamy Olivier Lamy added a comment - do you still have the issue with last blue ocean version?
            Hide
            olamy Olivier Lamy added a comment -

            possible related to JENKINS-51057

            Show
            olamy Olivier Lamy added a comment - possible related to  JENKINS-51057
            Hide
            xathien Zack Young added a comment -

            > do you still have the issue with last blue ocean version?

            Still reproducible in 1.9.0, which Jenkins is telling me is the latest version.

            Show
            xathien Zack Young added a comment - > do you still have the issue with last blue ocean version? Still reproducible in 1.9.0, which Jenkins is telling me is the latest version.
            Hide
            olamy Olivier Lamy added a comment -

            Zack Young thanks. I should have been more clear with my question  

            Can you attach the stacktrace/logs you have with an up2date version? 

            Show
            olamy Olivier Lamy added a comment - Zack Young thanks. I should have been more clear with my question   Can you attach the stacktrace/logs you have with an up2date version? 
            Hide
            xathien Zack Young added a comment -

            Hmm... I may have spoken too quickly. The build that usually triggers this has been failing for a different reason. Let me rerun the pipeline I put in the description and get some fresh logs and make sure it still triggers.

            Show
            xathien Zack Young added a comment - Hmm... I may have spoken too quickly. The build that usually triggers this has been failing for a different reason. Let me rerun the pipeline I put in the description and get some fresh logs and make sure it still triggers.
            Hide
            xathien Zack Young added a comment -

            Left it running all night and no StackOverflowException. Hooray! Guess we can close this as "apparently fixed by something at some point"

            Show
            xathien Zack Young added a comment - Left it running all night and no StackOverflowException. Hooray! Guess we can close this as "apparently fixed by something at some point"

              People

              Assignee:
              olamy Olivier Lamy
              Reporter:
              xathien Zack Young
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: