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

Intermitted failure with JenkinsRule and multi branch pipeline test

    Details

    • Similar Issues:

      Description

      In BlueOcean we have Multi branch pipeline tests that fail randomly, hard to reproduce. Tests do the following steps:

      • Create local git repo with Jennkisfile with simple pipeline, create multiple branches. See MultiBranchPipelineTest.setupScm()
      • Use JenkinsRule to call API that returns DAG built using FlowGraphWalker

      NPE randomly occurs at PipelineStepImpl.java:27

      Line 27 in PipelineStepImpl can't give NPE. So either the stack trace is incorrectly reported and NPE is somewhere else. Since its so random that we are not able to debug. Any insight is appreciated. I have copied workflow-plugin as well as multi-branch-project-plugin, I don't know if there is bug there in these plugins as stack trace is not saying everything but maybe it has something happens during groovy DSL processing or some other file system race condition.

      Here is the complete stack trace reported by Unit. Kohsuke Kawaguchi Its the same issue I discussed the other day where tests random fail executing pipeline multi branch job.

      java.lang.NullPointerException
      at io.jenkins.blueocean.service.embedded.rest.PipelineStepImpl.<init>(PipelineStepImpl.java:27)
      at io.jenkins.blueocean.service.embedded.rest.PipelineStepContainerImpl.iterator(PipelineStepContainerImpl.java:51)
      at org.kohsuke.stapler.export.Range$1.iterator(Range.java:44)
      at org.kohsuke.stapler.export.Property.writeValue(Property.java:221)
      at org.kohsuke.stapler.export.Property.writeValue(Property.java:168)
      at org.kohsuke.stapler.export.Property.writeTo(Property.java:139)
      at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:227)
      at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:223)
      at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:223)
      at org.kohsuke.stapler.export.Property.writeValue(Property.java:279)
      at org.kohsuke.stapler.export.Property.writeValue(Property.java:168)
      at org.kohsuke.stapler.export.Property.writeTo(Property.java:139)
      at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:227)
      at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:223)
      at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:223)
      at org.kohsuke.stapler.export.Model.writeTo(Model.java:198)
      at org.kohsuke.stapler.ResponseImpl.writeOne(ResponseImpl.java:285)
      at org.kohsuke.stapler.ResponseImpl.serveExposedBean(ResponseImpl.java:273)
      at hudson.model.Api.doJson(Api.java:211)
      at io.jenkins.blueocean.rest.pageable.PagedResponse$Processor$1.generateResponse(PagedResponse.java:55)
      at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:124)
      at org.kohsuke.stapler.HttpResponseRenderer$Default.generateResponse(HttpResponseRenderer.java:69)
      at org.kohsuke.stapler.Function.renderResponse(Function.java:119)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:102)
      at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:686)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
      at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:209)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:117)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:499)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

        Attachments

          Activity

          Hide
          stephenconnolly Stephen Connolly added a comment -

          @jglick this was assigned to Oliver Gondža by mistake. Can you take a look?

          Show
          stephenconnolly Stephen Connolly added a comment - @jglick this was assigned to Oliver Gondža by mistake. Can you take a look?
          Hide
          jglick Jesse Glick added a comment -

          A bug in Blue Ocean code. If it is still failing, you will need to track it down there I suppose. Add logging?

          Show
          jglick Jesse Glick added a comment - A bug in Blue Ocean code. If it is still failing, you will need to track it down there I suppose. Add logging?

            People

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

              Dates

              • Created:
                Updated:
                Resolved: