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

Stacktrace when loading nodes with a unicode/strange character path

    XMLWordPrintable

    Details

    • Epic Link:
    • Similar Issues:

      Description

      This was seen when running the ATH, it creates jobs nested in folders with "strange" names.

      GET http://127.0.0.1:49321/blue/rest/organizations/jenkins/pipelines/anotherFol…r/%E4%B8%89%E7%99%BE/%C3%B1ba/%E4%B8%83/Sohn/branches/master/runs/1/nodes/

      This is a path with lots of odd encoding of unicode stuff.

      Stack trace (if that sheds any light)

      Caused by: java.lang.NullPointerException
      	at org.jenkinsci.plugins.workflow.actions.NotExecutedNodeAction.isExecuted(NotExecutedNodeAction.java:18)
      	at org.jenkinsci.plugins.workflow.pipelinegraphanalysis.StatusAndTiming.computeChunkTiming(StatusAndTiming.java:214)
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor.handleChunkDone(PipelineNodeGraphVisitor.java:230)
      	at org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor.chunkStart(StandardChunkVisitor.java:40)
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor.chunkStart(PipelineNodeGraphVisitor.java:79)
      	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:568)
      	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:553)
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor.<init>(PipelineNodeGraphVisitor.java:73)
      	at io.jenkins.blueocean.rest.impl.pipeline.NodeGraphBuilder$NodeGraphBuilderFactory.getInstance(NodeGraphBuilder.java:37)
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeContainerImpl.<init>(PipelineNodeContainerImpl.java:32)
      	at io.jenkins.blueocean.rest.impl.pipeline.PipelineRunImpl.getNodes(Pipelin
      

        Attachments

          Activity

          Hide
          michaelneale Michael Neale added a comment -

          FYI the stack trace Thor and I were seeing

          Show
          michaelneale Michael Neale added a comment - FYI the stack trace Thor and I were seeing
          Hide
          vivek Vivek Pandey added a comment -

          Michael NealeThorsten Scherler There is something odd, I know I can fix it but need to verify to add a test for it. Can you share the pipeline script exhibiting this problem? Also please send me the unicode name of pipeline.

          Show
          vivek Vivek Pandey added a comment - Michael Neale Thorsten Scherler There is something odd, I know I can fix it but need to verify to add a test for it. Can you share the pipeline script exhibiting this problem? Also please send me the unicode name of pipeline.
          Hide
          michaelneale Michael Neale added a comment -

          Vivek Pandey yes its a tricky one to reproduce unfortunately.

          The way we saw it was running this branch of the ATH even locally:

          https://github.com/jenkinsci/blueocean-acceptance-test/pull/76

          when it runs the folders.js (which creates nested folders) with exotic names, it shows up. Running that branch of the ATH is probably the best way (and once it has failed, you can open the version of jenkins it runs locally to see it direclty)

          Show
          michaelneale Michael Neale added a comment - Vivek Pandey yes its a tricky one to reproduce unfortunately. The way we saw it was running this branch of the ATH even locally: https://github.com/jenkinsci/blueocean-acceptance-test/pull/76 when it runs the folders.js (which creates nested folders) with exotic names, it shows up. Running that branch of the ATH is probably the best way (and once it has failed, you can open the version of jenkins it runs locally to see it direclty)
          Hide
          vivek Vivek Pandey added a comment -

          Not related to unicode in path. Following script cause NPE, this PR fixes that. Similar script in ATH (src/test/resources/multibranch_1 ) fails with same NPE. I think this used to pass on master, perhaps underlying workflow-api was upgraded. In any case MemoryFlowChunk.getLastNode() is returning null that its not supposed to and that resulted in NPE. A non-null check has been added and https://issues.jenkins-ci.org/browse/JENKINS-40200 is raised.

          node {
              stage 'Stage 1'
              stage 'Stage 2'
                 echo 'hello'
          }
          
          Show
          vivek Vivek Pandey added a comment - Not related to unicode in path. Following script cause NPE, this PR fixes that. Similar script in ATH (src/test/resources/multibranch_1 ) fails with same NPE. I think this used to pass on master, perhaps underlying workflow-api was upgraded. In any case MemoryFlowChunk.getLastNode() is returning null that its not supposed to and that resulted in NPE. A non-null check has been added and https://issues.jenkins-ci.org/browse/JENKINS-40200 is raised. node { stage 'Stage 1' stage 'Stage 2' echo 'hello' }

            People

            • Assignee:
              vivek Vivek Pandey
              Reporter:
              michaelneale Michael Neale
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: