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

EmptyStackException from PipelineNodeGraphVisitor.parallelBranchStart

    Details

    • Similar Issues:
    • Sprint:
      arctic

      Description

      To reproduce,

      make -C .../jenkinsci/parallel-test-executor-plugin/demo run
      

      Log in as admin and you should soon see pipeline ยป master #1 building. Install BlueOcean from the update center. Go to the B.O. display and once #1 has finished, click the start button to schedule build #2. You will soon see a lot of exceptions in the console:

      ... WARNING org.eclipse.jetty.util.log.JavaUtilLog warn
      Error while serving http://localhost:8080/blue/rest/organizations/jenkins/pipelines/pipeline/branches/master/runs/2/nodes/
      java.lang.reflect.InvocationTargetException
      	at ...
      Caused by: java.util.EmptyStackException
      	at java.util.Stack.peek(Stack.java:102)
      	at java.util.Stack.pop(Stack.java:84)
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor.parallelBranchStart(PipelineNodeGraphVisitor.java:158)
      	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:593)
      	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:551)
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor.<init>(PipelineNodeGraphVisitor.java:68)
      	at io.jenkins.blueocean.rest.impl.pipeline.NodeGraphBuilder$NodeGraphBuilderFactory.getInstance(NodeGraphBuilder.java:37)
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeContainerImpl.<init>(PipelineNodeContainerImpl.java:39)
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineRunImpl.getNodes(PipelineRunImpl.java:81)
      	... 103 more
      

      and incremental display of build results seems badly broken.

        Attachments

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment - - edited

            Jesse Glick eep that doesn't look good. Ill punt this over to Vivek Pandey for investigation. I suspect if you see a lot of these exceptions then incremental won't work at all.

            Show
            jamesdumay James Dumay added a comment - - edited Jesse Glick eep that doesn't look good. Ill punt this over to Vivek Pandey for investigation. I suspect if you see a lot of these exceptions then incremental won't work at all.
            Hide
            vivek Vivek Pandey added a comment -

            I am getting, this error, will try later on from home, SJC office internet

            Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/jenkins/images. You may want to check your internet connection or if you are behind a proxy.
            make: *** [build] Error 1
            

            Likely a partial branch that results in code barfing up not able computing endNode (has not ended yet) but needs to get the last executed node to compute timing info.

            Show
            vivek Vivek Pandey added a comment - I am getting, this error, will try later on from home, SJC office internet Network timed out while trying to connect to https: //index.docker.io/v1/repositories/library/jenkins/images. You may want to check your internet connection or if you are behind a proxy. make: *** [build] Error 1 Likely a partial branch that results in code barfing up not able computing endNode (has not ended yet) but needs to get the last executed node to compute timing info.
            Hide
            vivek Vivek Pandey added a comment -

            I could not run the demo project. but following script could reproduce it:

            stage 'test'
            parallel 'unit':{
              node{
                echo "Unit testing..."
                sh 'sleep 1000'
              }
            }
            

            Here is the error caused running demo project:

            Successfully built 261ad184f67c
            docker volume create --name=m2repo
            m2repo
            sudo chmod a+rw $(docker volume inspect -f '{{.Mountpoint}}' m2repo)
            Password:
            chmod: /mnt/sda1/var/lib/docker/volumes/m2repo/_data: No such file or directory
            make: *** [volume] Error 1
            
            Show
            vivek Vivek Pandey added a comment - I could not run the demo project. but following script could reproduce it: stage 'test' parallel 'unit' :{ node{ echo "Unit testing..." sh 'sleep 1000' } } Here is the error caused running demo project: Successfully built 261ad184f67c docker volume create --name=m2repo m2repo sudo chmod a+rw $(docker volume inspect -f '{{.Mountpoint}}' m2repo) Password: chmod: /mnt/sda1/ var /lib/docker/volumes/m2repo/_data: No such file or directory make: *** [volume] Error 1
            Hide
            vivek Vivek Pandey added a comment - - edited

            PR submitted https://github.com/jenkinsci/blueocean-plugin/pull/605

            While investigating this issue, discovered couple of bugs in workflow-api, somewhat related with this part of code:

            https://issues.jenkins-ci.org/browse/JENKINS-39839
            https://issues.jenkins-ci.org/browse/JENKINS-39841

            Show
            vivek Vivek Pandey added a comment - - edited PR submitted https://github.com/jenkinsci/blueocean-plugin/pull/605 While investigating this issue, discovered couple of bugs in workflow-api, somewhat related with this part of code: https://issues.jenkins-ci.org/browse/JENKINS-39839 https://issues.jenkins-ci.org/browse/JENKINS-39841
            Hide
            jglick Jesse Glick added a comment -

            Here is the error caused running demo project

            Dunno, I wrote down steps that worked on my machine, but if you are running Mac OS X rather than native Docker on Linux I would not expect it to work.

            Show
            jglick Jesse Glick added a comment - Here is the error caused running demo project Dunno, I wrote down steps that worked on my machine, but if you are running Mac OS X rather than native Docker on Linux I would not expect it to work.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: