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

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Cannot Reproduce
    • blueocean-plugin
    • None
    • Jenkins Version: 2.44
      Pipeline Groovy: 2.36
      Blue Ocean: 1.1.2
    • 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

            xathien Zack Young created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Component/s blueocean-plugin [ 21481 ]
            Component/s pipeline [ 21692 ]
            jamesdumay James Dumay made changes -
            Epic Link JENKINS-43953 [ 181485 ]
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.3 [ 296 ]
            xathien Zack Young made changes -
            Environment Jenkins Version: 2.44
            Pipeline Groovy: 2.36
            Jenkins Version: 2.44
            Pipeline Groovy: 2.36
            Blue Ocean: 1.1.2
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.3-beta-2 [ 296 ] Blue Ocean 1.4 [ 311 ]
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.4 [ 311 ] Blue Ocean 1.3 - candidates [ 326 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Assignee Vivek Pandey [ vivek ]
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.4 - candidates [ 326 ] Blue Ocean 1.4 - beta 2 [ 416 ]
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.4 - beta 3 [ 416 ] Blue Ocean 1.4 - beta 4 [ 441 ]
            olamy Olivier Lamy made changes -
            Assignee Vivek Pandey [ vivek ] Olivier Lamy [ olamy ]
            olamy Olivier Lamy made changes -
            Link This issue is related to JENKINS-51057 [ JENKINS-51057 ]
            olamy Olivier Lamy made changes -
            Resolution Cannot Reproduce [ 5 ]
            Status Open [ 1 ] Closed [ 6 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: