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

Blue Ocean plug-in causes stack overflow for big pipeline jobs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: blueocean-plugin
    • Environment:
    • Epic Link:
    • Sprint:
      Blue Ocean 1.5 - beta 1
    • Similar Issues:

      Description

      Yesterday I found that I get a stack overflow exception for jobs executing lot of steps.

      The issue does not occur if blue ocean is not installed.

      Most simple solution is to run an echo step inside a loop, e.g.:

      timestamps {
          for (int i = 0; true; ++i) {
              echo i.toString()
          }    
      }
      

      Using default java vm settings this fails mostly at about loop count ~ 4600+.

      Hope there's an easy way to fix this.

      Error message is as follows:

      <snip>
      15:36:10 4605
      [Pipeline] echo
      15:36:10 4606
      [Pipeline] End of Pipeline
      java.lang.StackOverflowError
      	at org.jenkinsci.plugins.workflow.graph.FlowNode.getPersistentAction(FlowNode.java:344)
      	at org.jenkinsci.plugins.workflow.graph.FlowNode.getAction(FlowNode.java:370)
      	at io.jenkins.blueocean.events.PipelineEventListener.getParentBlock(PipelineEventListener.java:110)
      	at io.jenkins.blueocean.events.PipelineEventListener.getParentBlock(PipelineEventListener.java:120)
      	at io.jenkins.blueocean.events.PipelineEventListener.getParentBlock(PipelineEventListener.java:120)
      	at io.jenkins.blueocean.events.PipelineEventListener.getParentBlock(PipelineEventListener.java:120)
      ...
      <snip>
      

        Attachments

          Activity

          Hide
          macdrega Joerg Schwaerzler added a comment -

          Looking at the code it should be quite easy to fix. Just need to replace the recursive call in getParentBlock() by a loop. I  would be willing to give it a try - however until now I didn't do any Jenkins plugin development.

          For use this might become blocking in the near future.

          Show
          macdrega Joerg Schwaerzler added a comment - Looking at the code it should be quite easy to fix. Just need to replace the recursive call in getParentBlock() by a loop. I  would be willing to give it a try - however until now I didn't do any Jenkins plugin development. For use this might become blocking in the near future.
          Hide
          jamesdumay James Dumay added a comment -

          Vivek Pandey small one that would be good to fix.

          Show
          jamesdumay James Dumay added a comment - Vivek Pandey small one that would be good to fix.
          Hide
          thxmasj Thomas Johansen added a comment -

          James Dumay: Why is this one down-prioritized? The bug is a complete show stopper for using Blue Ocean on our team.

          Show
          thxmasj Thomas Johansen added a comment - James Dumay : Why is this one down-prioritized? The bug is a complete show stopper for using Blue Ocean on our team.
          Show
          vivek Vivek Pandey added a comment - Thomas Johansen I have PR opened,  https://github.com/jenkinsci/blueocean-plugin/pull/1667/: )

            People

            • Assignee:
              vivek Vivek Pandey
              Reporter:
              macdrega Joerg Schwaerzler
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: