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

Multibranch pipeline: StackOverflowException in BranchJobProperty#hasPermission

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins 2.64 on Linux, latest version of all plugins (pipeline, declarative, blue ocean etc)
    • Similar Issues:

      Description

      A declarative multibranch pipeline causes StackOverflowException in
      org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot "JenkinsUI-StackOverflowException.png" and stacktrace "SOE in Jenkins UI" below.

      The SOE occurred for the first time after making this change to Jenkinsfile:

      diff --git a/Jenkinsfile b/Jenkinsfile
      index f4e5053..b7f412f 100644
      --- a/Jenkinsfile
      +++ b/Jenkinsfile
      @@ -1,7 +1,9 @@
       @Library('my-shared-library') _
       
       pipeline {
      -    agent any
      +    agent {
      +        label 'test'
      +    }
           
           options {
               timestamps()
      

      The previous commit applied these changes (basically copied from gitlab-plugin README), which may also be relevant:

      diff --git a/Jenkinsfile b/Jenkinsfile
      index 5f2ecb2..f4e5053 100644
      --- a/Jenkinsfile
      +++ b/Jenkinsfile
      @@ -5,7 +5,7 @@ pipeline {
           
           options {
               timestamps()
      -        //[$class: 'GitLabConnectionProperty', gitLabConnection: 'my-gitlab-connection'] // Needed? How to do in declarative pipelines?
      +        gitLabConnection('my-gitlab-connection')
               //skipDefaultCheckout() // if checkout should be done manually later one
               buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '185', numToKeepStr: ''))
               
      @@ -13,6 +13,10 @@ pipeline {
               //   "Additional behaviours" > "Checkout to specific local branch"
           }
           
      +    triggers {
      +            gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
      +    }
      +    
           tools {
               jdk 'jdk8'
               maven 'maven3.3.x'
      

      The first SOE stacktrace occurring in jenkins.log is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

      Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

      Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

      SOE in Jenkins UI
      java.lang.StackOverflowError
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      [...]
      
      First and second SOE in jenkins.log
      Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
      INFO: WebHook called with url: /project/<pipeline-name>
      Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
      INFO: gitlab web hook triggered for
         - repo url: git@git.<git-url>.git
         - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
         - with payload:
      {
      [... http post payload from gitlab ...]
      }
      Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
      INFO: matching projects:
         - <some-jenkins-job-name>
      Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
      WARNING: no project references the given repo url and commit branch
      Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
      INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
      Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
      WARNING: Error while serving https://ci.company.com/view/<view-name>/job/<build-pipeline-name>/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
      java.lang.reflect.InvocationTargetException
              at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
              at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
              at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
              at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
              at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
              at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
              at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
              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:841)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
              at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
              at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
              at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
              at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
              at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
              at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
              at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
              at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
              at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
              at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
              at org.eclipse.jetty.server.Server.handle(Server.java:564)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
              at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
              at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
              at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
              at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
              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:748)
      Caused by: java.lang.StackOverflowError
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      
      [...]
      
      Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
      INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
      Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
      SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
      java.lang.StackOverflowError
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
              at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
      
      [...]
      

      A few hours before this SOE occurred I upgraded several plugins. However after upgrading and restarting Jenkins, the same pipeline has built successfully several times. Also I tried downgrading all of them again, with no success.

      I also tried to downgrade the following plugins based on feedback from jenkins-users mailinglist, but that did not help either:

      • "Dashboard for Blue Ocean" plugin from 1.0.1 to 1.0.0
      • "External Monitor Job Type Plugin" from 1.7 to 1.6

        Attachments

          Issue Links

            Activity

            stefanthurnherr Stefan Thurnherr created issue -
            stefanthurnherr Stefan Thurnherr made changes -
            Field Original Value New Value
            Description A declarative multibranch pipeline causes StackOverflowException in {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}} when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot XY and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code|title=First and second SOE in jenkins.log}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}
            A declarative multibranch pipeline causes StackOverflowException in {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}} when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot XY and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code|title='First and second SOE in jenkins.log'}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}
            stefanthurnherr Stefan Thurnherr made changes -
            Description A declarative multibranch pipeline causes StackOverflowException in {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}} when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot XY and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code|title='First and second SOE in jenkins.log'}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}
            A declarative multibranch pipeline causes StackOverflowException in {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}} when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot XY and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code:java|title='First and second SOE in jenkins.log'}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}
            stefanthurnherr Stefan Thurnherr made changes -
            stefanthurnherr Stefan Thurnherr made changes -
            Description A declarative multibranch pipeline causes StackOverflowException in {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}} when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot XY and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code:java|title='First and second SOE in jenkins.log'}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}
            A declarative multibranch pipeline causes StackOverflowException in
            {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}}
            when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot "JenkinsUI-StackOverflowException.png" and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code:java|title='First and second SOE in jenkins.log'}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}
            stefanthurnherr Stefan Thurnherr made changes -
            Description A declarative multibranch pipeline causes StackOverflowException in
            {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}}
            when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot "JenkinsUI-StackOverflowException.png" and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code:java|title='First and second SOE in jenkins.log'}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}
            A declarative multibranch pipeline causes StackOverflowException in
            {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}}
            when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot "JenkinsUI-StackOverflowException.png" and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code:java|title=First and second SOE in jenkins.log}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}
            stefanthurnherr Stefan Thurnherr made changes -
            Description A declarative multibranch pipeline causes StackOverflowException in
            {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}}
            when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot "JenkinsUI-StackOverflowException.png" and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code:java|title=First and second SOE in jenkins.log}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}
            A declarative multibranch pipeline causes StackOverflowException in
            {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}}
            when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot "JenkinsUI-StackOverflowException.png" and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code:java|title=First and second SOE in jenkins.log}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}

            A few hours before this SOE occurred I upgraded several plugins. However after upgrading and restarting Jenkins, the same pipeline has built successfully several times. Also I tried downgrading all of them again, with no success.

            I also tried to downgrade the following plugins based on [feedback from jenkins-users mailinglist|https://groups.google.com/d/msg/jenkinsci-users/lAyx4kof0wU/YbzjqxCWCAAJ], but that did not help either:
            * "Dashboard for Blue Ocean" plugin from 1.0.1 to 1.0.0
            * "External Monitor Job Type Plugin" from 1.7 to 1.6
            stefanthurnherr Stefan Thurnherr made changes -
            Environment Jenkins 2.64 on Linux Jenkins 2.64 on Linux, latest version of all plugins (pipeline, blue ocean etc)
            stefanthurnherr Stefan Thurnherr made changes -
            Environment Jenkins 2.64 on Linux, latest version of all plugins (pipeline, blue ocean etc) Jenkins 2.64 on Linux, latest version of all plugins (pipeline, declarative, blue ocean etc)
            stefanthurnherr Stefan Thurnherr made changes -
            Description A declarative multibranch pipeline causes StackOverflowException in
            {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}}
            when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot "JenkinsUI-StackOverflowException.png" and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code:java|title=First and second SOE in jenkins.log}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}

            A few hours before this SOE occurred I upgraded several plugins. However after upgrading and restarting Jenkins, the same pipeline has built successfully several times. Also I tried downgrading all of them again, with no success.

            I also tried to downgrade the following plugins based on [feedback from jenkins-users mailinglist|https://groups.google.com/d/msg/jenkinsci-users/lAyx4kof0wU/YbzjqxCWCAAJ], but that did not help either:
            * "Dashboard for Blue Ocean" plugin from 1.0.1 to 1.0.0
            * "External Monitor Job Type Plugin" from 1.7 to 1.6
            A declarative multibranch pipeline causes StackOverflowException in
            {{org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)}}
            when clicking on the pipeline in the (old/not-blue-ocean) Jenkins UI to show the list of branches - see attached screenshot "JenkinsUI-StackOverflowException.png" and stacktrace "SOE in Jenkins UI" below.

            The SOE occurred for the first time after making this change to Jenkinsfile:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index f4e5053..b7f412f 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -1,7 +1,9 @@
             @Library('my-shared-library') _
             
             pipeline {
            - agent any
            + agent {
            + label 'test'
            + }
                 
                 options {
                     timestamps()
            {code}

            The previous commit applied these changes (basically copied from gitlab-plugin README), which may also be relevant:
            {code}
            diff --git a/Jenkinsfile b/Jenkinsfile
            index 5f2ecb2..f4e5053 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -5,7 +5,7 @@ pipeline {
                 
                 options {
                     timestamps()
            - //[$class: 'GitLabConnectionProperty', gitLabConnection: 'my-gitlab-connection'] // Needed? How to do in declarative pipelines?
            + gitLabConnection('my-gitlab-connection')
                     //skipDefaultCheckout() // if checkout should be done manually later one
                     buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '185', numToKeepStr: ''))
                     
            @@ -13,6 +13,10 @@ pipeline {
                     // "Additional behaviours" > "Checkout to specific local branch"
                 }
                 
            + triggers {
            + gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
            + }
            +
                 tools {
                     jdk 'jdk8'
                     maven 'maven3.3.x'
            {code}

            The first SOE stacktrace occurring in {{jenkins.log}} is also pasted below as "First and second SOE in jenkins.log", it shows where the SOE originates from.

            Since then, it is not possible anymore to open this pipeline, always getting the attached screenshot.

            Also the SOE now prints to jenkins.log even when looking at other jobs/views (both freestyle and other pipelines). However those other jobs work fine and dont seem to be affected by the SOE printed to jenkins.log. I can attach some of these other SOE stacktraces if required.

            {code:java|title=SOE in Jenkins UI}
            java.lang.StackOverflowError
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            {code}

            {code:java|title=First and second SOE in jenkins.log}
            Jun 10, 2017 10:29:48 PM com.dabsquared.gitlabjenkins.webhook.GitLabWebHook getDynamic
            INFO: WebHook called with url: /project/<pipeline-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: gitlab web hook triggered for
               - repo url: git@git.<git-url>.git
               - branch: MigrateJenkinsfileToDeclarativePipelineSyntax
               - with payload:
            {
            [... http post payload from gitlab ...]
            }
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            INFO: matching projects:
               - <some-jenkins-job-name>
            Jun 10, 2017 10:29:48 PM org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
            WARNING: no project references the given repo url and commit branch
            Jun 10, 2017 10:29:54 PM jenkins.branch.MultiBranchProject$BranchIndexing run
            INFO: <build-pipeline-name> #20170610.222948 branch indexing action completed: SUCCESS in 5.2 sec
            Jun 10, 2017 10:30:03 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
            WARNING: Error while serving https://ci.company.com/view/&lt;view-name&gt;/job/&lt;build-pipeline-name&gt;/job/MigrateJenkinsfileToDeclarativePipelineSyntax/21/logText/progressiveHtml
            java.lang.reflect.InvocationTargetException
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]

            Jun 10, 2017 10:30:12 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: <build-pipeline-name>/MigrateJenkinsfileToDeclarativePipelineSyntax #21 completed: SUCCESS
            Jun 10, 2017 10:30:13 PM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
            SEVERE: A thread (Thread-5/66) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
            java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)

            [...]
            {code}

            A few hours before this SOE occurred I upgraded several plugins. However after upgrading and restarting Jenkins, the same pipeline has built successfully several times. Also I tried downgrading all of them again, with no success.

            I also tried to downgrade the following plugins based on [feedback from jenkins-users mailinglist|https://groups.google.com/d/msg/jenkinsci-users/lAyx4kof0wU/YbzjqxCWCAAJ], but that did not help either:
            * "Dashboard for Blue Ocean" plugin from 1.0.1 to 1.0.0
            * "External Monitor Job Type Plugin" from 1.7 to 1.6
            Hide
            stefanthurnherr Stefan Thurnherr added a comment - - edited

            The workaround that worked for me:

            1. Delete the whole multibranch job through command-line
            2. Reload configuration from disk -> job disappeared from Jenkins UI, and no more StackOverflowExceptions appeared in jenkins.log when e.g. looking at other jobs that previously caused a SOE in jenkins.log
            3. Re-add the multibranch pipeline as a new job item

            Reproducing this issue:

            • Plugin versions dont seem to play any role here: Despite upgrading all plugins to latest version after having recreated the pipeline, I still didn't get any SOE.
            • I succeeded in reproducing the issue once, the last two changes to Jenkinsfile before it occurred were:
              diff --git a/Jenkinsfile b/Jenkinsfile
              index df719c9..d389b43 100644
              --- a/Jenkinsfile
              +++ b/Jenkinsfile
              @@ -17,9 +17,10 @@ pipeline {
                       //   "Additional behaviours" > "Checkout to specific local branch"
                   }
                   
              -    triggers {
              -            gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
              -    }
              +    // FIXME 2017-06-11: Maybe use this for better jenkins-gitlab integration?
              +    //triggers {
              +    //        gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
              +    //}
                   
                   tools {
                       jdk 'jdk8'
              

            Build was triggered and worked fine with no SOExceptions

            diff --git a/Jenkinsfile b/Jenkinsfile
            index d389b43..9adcfda 100644
            --- a/Jenkinsfile
            +++ b/Jenkinsfile
            @@ -2,10 +2,7 @@
             
             pipeline {
                 
            -    //agent any
            -    agent {
            -        label '' // same as 'agent any'
            -    }
            +    agent any
                 
                 options {
                     timestamps()
            

            SOException occurred in jenkins.log (same as "First SOE in jenkins.log" from issue description) and then others appeared in jenkins.log when clicking other jobs in jenkins.

            But when trying to reproduce a second time with same sequence of commits, it worked just fine. So no reliably reproducing this...

            Show
            stefanthurnherr Stefan Thurnherr added a comment - - edited The workaround that worked for me: Delete the whole multibranch job through command-line Reload configuration from disk -> job disappeared from Jenkins UI, and no more StackOverflowExceptions appeared in jenkins.log when e.g. looking at other jobs that previously caused a SOE in jenkins.log Re-add the multibranch pipeline as a new job item Reproducing this issue: Plugin versions dont seem to play any role here: Despite upgrading all plugins to latest version after having recreated the pipeline, I still didn't get any SOE. I succeeded in reproducing the issue once, the last two changes to Jenkinsfile before it occurred were: diff --git a/Jenkinsfile b/Jenkinsfile index df719c9..d389b43 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,9 +17,10 @@ pipeline { // "Additional behaviours" > "Checkout to specific local branch" } - triggers { - gitlab(triggerOnPush: true , triggerOnMergeRequest: true , branchFilterType: 'All' ) - } + // FIXME 2017-06-11: Maybe use this for better jenkins-gitlab integration? + //triggers { + // gitlab(triggerOnPush: true , triggerOnMergeRequest: true , branchFilterType: 'All' ) + //} tools { jdk 'jdk8' Build was triggered and worked fine with no SOExceptions diff --git a/Jenkinsfile b/Jenkinsfile index d389b43..9adcfda 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,10 +2,7 @@ pipeline { - //agent any - agent { - label '' // same as ' agent any' - } + agent any options { timestamps() SOException occurred in jenkins.log (same as "First SOE in jenkins.log" from issue description) and then others appeared in jenkins.log when clicking other jobs in jenkins. But when trying to reproduce a second time with same sequence of commits, it worked just fine. So no reliably reproducing this...
            stefanthurnherr Stefan Thurnherr made changes -
            Priority Blocker [ 1 ] Critical [ 2 ]
            Hide
            abayer Andrew Bayer added a comment -

            Wow, that's nuts. What version of pipeline-model-definition do you have installed? 1.1.5? I don't think that'd cause this, but I want to be sure of versions.

            Show
            abayer Andrew Bayer added a comment - Wow, that's nuts. What version of pipeline-model-definition do you have installed? 1.1.5? I don't think that'd cause this, but I want to be sure of versions.
            Hide
            abayer Andrew Bayer added a comment -

            Also, any chance you might have a backup of the multibranch config.xml (and even better, the individual branch's config.xml) from when it was hitting the SOE?

            Show
            abayer Andrew Bayer added a comment - Also, any chance you might have a backup of the multibranch config.xml (and even better, the individual branch's config.xml) from when it was hitting the SOE?
            abayer Andrew Bayer made changes -
            Assignee Andrew Bayer [ abayer ]
            Hide
            abayer Andrew Bayer added a comment -

            I take it back - I'm pretty sure this is Declarative's fault after all. Working on a fix.

            Show
            abayer Andrew Bayer added a comment - I take it back - I'm pretty sure this is Declarative's fault after all. Working on a fix.
            abayer Andrew Bayer made changes -
            Component/s pipeline-model-definition-plugin [ 21706 ]
            Component/s workflow-multibranch-plugin [ 21465 ]
            Hide
            abayer Andrew Bayer added a comment -

            So what I think is happening here is that we're inadvertently adding a second instance of BranchJobProperty, which is decorating the other's ACL and ending up in the infinite loops. Trying to figure out how to reproduce this now.

            Show
            abayer Andrew Bayer added a comment - So what I think is happening here is that we're inadvertently adding a second instance of BranchJobProperty , which is decorating the other's ACL and ending up in the infinite loops. Trying to figure out how to reproduce this now.
            Hide
            stefanthurnherr Stefan Thurnherr added a comment - - edited

            Andrew Bayer pipeline-model-definition (and API) are both v1.1.5.

            I have the config.xml from when the SOE occurred. the jobs/<pipeline-name>/branches/<branch-name>/config.xml has many-megabytes size and contains lots of these sections at the end (yes, the <jenkins.model.BuildDiscarderProperty> is also duplicated many times):

            <jenkins.model.BuildDiscarderProperty>
                  <strategy class="hudson.tasks.LogRotator">
                    <daysToKeep>185</daysToKeep>
                    <numToKeep>-1</numToKeep>
                    <artifactDaysToKeep>-1</artifactDaysToKeep>
                    <artifactNumToKeep>-1</artifactNumToKeep>
                  </strategy>
                </jenkins.model.BuildDiscarderProperty>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <jenkins.model.BuildDiscarderProperty reference="../jenkins.model.BuildDiscarderProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <jenkins.model.BuildDiscarderProperty reference="../jenkins.model.BuildDiscarderProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <jenkins.model.BuildDiscarderProperty reference="../jenkins.model.BuildDiscarderProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <jenkins.model.BuildDiscarderProperty reference="../jenkins.model.BuildDiscarderProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <jenkins.model.BuildDiscarderProperty reference="../jenkins.model.BuildDiscarderProperty"/>
            
            [...]
            
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <jenkins.model.BuildDiscarderProperty reference="../jenkins.model.BuildDiscarderProperty"/>
                <jenkins.model.BuildDiscarderProperty>
                  <strategy class="hudson.tasks.LogRotator">
                    <daysToKeep>185</daysToKeep>
                    <numToKeep>-1</numToKeep>
                    <artifactDaysToKeep>-1</artifactDaysToKeep>
                    <artifactNumToKeep>-1</artifactNumToKeep>
                  </strategy>
                </jenkins.model.BuildDiscarderProperty>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
            
            [...]
            
            Show
            stefanthurnherr Stefan Thurnherr added a comment - - edited Andrew Bayer pipeline-model-definition (and API) are both v1.1.5. I have the config.xml from when the SOE occurred. the jobs/<pipeline-name>/branches/<branch-name>/config.xml has many-megabytes size and contains lots of these sections at the end (yes, the <jenkins.model.BuildDiscarderProperty> is also duplicated many times): <jenkins.model.BuildDiscarderProperty> <strategy class= "hudson.tasks.LogRotator" > <daysToKeep>185</daysToKeep> <numToKeep>-1</numToKeep> <artifactDaysToKeep>-1</artifactDaysToKeep> <artifactNumToKeep>-1</artifactNumToKeep> </strategy> </jenkins.model.BuildDiscarderProperty> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <jenkins.model.BuildDiscarderProperty reference= "../jenkins.model.BuildDiscarderProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <jenkins.model.BuildDiscarderProperty reference= "../jenkins.model.BuildDiscarderProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <jenkins.model.BuildDiscarderProperty reference= "../jenkins.model.BuildDiscarderProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <jenkins.model.BuildDiscarderProperty reference= "../jenkins.model.BuildDiscarderProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <jenkins.model.BuildDiscarderProperty reference= "../jenkins.model.BuildDiscarderProperty" /> [...] <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <jenkins.model.BuildDiscarderProperty reference= "../jenkins.model.BuildDiscarderProperty" /> <jenkins.model.BuildDiscarderProperty> <strategy class= "hudson.tasks.LogRotator" > <daysToKeep>185</daysToKeep> <numToKeep>-1</numToKeep> <artifactDaysToKeep>-1</artifactDaysToKeep> <artifactNumToKeep>-1</artifactNumToKeep> </strategy> </jenkins.model.BuildDiscarderProperty> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> [...]
            abayer Andrew Bayer made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            Hide
            abayer Andrew Bayer added a comment -

            PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/161 - can't figure out how to reproduce this to test it, annoyingly, but I'm 99% sure this fixes it regardless...

            Show
            abayer Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/161 - can't figure out how to reproduce this to test it, annoyingly, but I'm 99% sure this fixes it regardless...
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR #161 (Web Link)" [ 17113 ]
            Hide
            abayer Andrew Bayer added a comment -

            Stefan Thurnherr Perfect! That confirms the problem. Refining the fix a little, but I'm on the right path. Thanks!

            Show
            abayer Andrew Bayer added a comment - Stefan Thurnherr Perfect! That confirms the problem. Refining the fix a little, but I'm on the right path. Thanks!
            Hide
            stefanthurnherr Stefan Thurnherr added a comment -

            Andrew Bayer great thanks for the quick response! As mentioned above, I'm not able to reliably reproduce it either. Let me know if you have any ideas how to do it.

            This has occurred for a small-codebase pipeline only so far, just crossing my fingers that it won't occur on our bigger-codebase pipeline with many branches with ongoing work.

            Show
            stefanthurnherr Stefan Thurnherr added a comment - Andrew Bayer great thanks for the quick response! As mentioned above, I'm not able to reliably reproduce it either. Let me know if you have any ideas how to do it. This has occurred for a small-codebase pipeline only so far, just crossing my fingers that it won't occur on our bigger-codebase pipeline with many branches with ongoing work.
            Hide
            abayer Andrew Bayer added a comment -

            Stefan Thurnherr - it'll probably show up there eventually as well, buuuuuut I think I've got the fix nailed down. Just gotta get it reviewed and then I'll do a release. If you end up hitting it before then, let me know and I'll get you a SNAPSHOT build.

            Show
            abayer Andrew Bayer added a comment - Stefan Thurnherr - it'll probably show up there eventually as well, buuuuuut I think I've got the fix nailed down. Just gotta get it reviewed and then I'll do a release. If you end up hitting it before then, let me know and I'll get you a SNAPSHOT build.
            Hide
            hay Georges Y added a comment -

            I have the same problem reported on JENKINS-44804

            I just remembered that this occurred a few commits after merging two branches.

             

            This is the master branch config.xml

            <?xml version='1.0' encoding='UTF-8'?>
            <flow-definition plugin="workflow-job@2.11">
              <actions/>
              <keepDependencies>false</keepDependencies>
              <properties>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty plugin="workflow-multibranch@2.15">
                  <branch plugin="branch-api@2.0.10">
                    <sourceId>888eebba-ff28-4fda-b1c5-646b8e2dc979</sourceId>
                    <head plugin="scm-api@2.1.1">
                      <name>master</name>
                    </head>
                    <scm class="hudson.plugins.git.GitSCM" plugin="git@3.3.0">
                      <configVersion>2</configVersion>
                      <userRemoteConfigs>
                        <hudson.plugins.git.UserRemoteConfig>
                          <name>origin</name>
                          <refspec>+refs/heads/*:refs/remotes/origin/*</refspec>
                          <url>ssh://git@gitlab.ci.duskforest.xyz:2222/websites/minecraft.ha3.eu.git</url>
                          <credentialsId>jenkins-pipeline-2</credentialsId>
                        </hudson.plugins.git.UserRemoteConfig>
                      </userRemoteConfigs>
                      <branches class="singleton-list">
                        <hudson.plugins.git.BranchSpec>
                          <name>master</name>
                        </hudson.plugins.git.BranchSpec>
                      </branches>
                      <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
                      <submoduleCfg class="empty-list"/>
                      <extensions/>
                    </scm>
                    <properties/>
                    <actions>
                      <jenkins.scm.api.metadata.PrimaryInstanceMetadataAction plugin="scm-api@2.1.1"/>
                    </actions>
                  </branch>
                </org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
              </properties>
              <definition class="org.jenkinsci.plugins.workflow.multibranch.SCMBinder" plugin="workflow-multibranch@2.15">
                <scriptPath>Jenkinsfile</scriptPath>
              </definition>
              <triggers/>
              <disabled>false</disabled>
            </flow-definition>
            

            This is the angular-variant branch, but I'm not gonna paste the config file here:

            rose /data/docker-data/df-ci-blueocean/jobs/minecraft.ha3.eu/branches/angular-variant # cat config.xml | sort | uniq -c
                  1   <actions/>
                  1         <actions/>
                  1       </branch>
                  1           </branches>
                  1           <branches class="singleton-list">
                  1       <branch plugin="branch-api@2.0.10">
                  1           <configVersion>2</configVersion>
                  1               <credentialsId>jenkins-pipeline-2</credentialsId>
                  1   </definition>
                  1   <definition class="org.jenkinsci.plugins.workflow.multibranch.SCMBinder" plugin="workflow-multibranch@2.15">
                  1   <disabled>false</disabled>
                  1           <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
                  1           <extensions/>
                  1 </flow-definition>
                  1 <flow-definition plugin="workflow-job@2.11">
                  1         </head>
                  1         <head plugin="scm-api@2.1.1">
                  1             </hudson.plugins.git.BranchSpec>
                  1             <hudson.plugins.git.BranchSpec>
                  1             </hudson.plugins.git.UserRemoteConfig>
                  1             <hudson.plugins.git.UserRemoteConfig>
                  1   <keepDependencies>false</keepDependencies>
                  1           <name>angular-variant</name>
                  1               <name>angular-variant</name>
                  1               <name>origin</name>
                  1     </org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty>
                  1     <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty plugin="workflow-multibranch@2.15">
             762521     <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
                  1   </properties>
                  1   <properties>
                  1         <properties/>
                  1               <refspec>+refs/heads/*:refs/remotes/origin/*</refspec>
                  1         </scm>
                  1         <scm class="hudson.plugins.git.GitSCM" plugin="git@3.3.0">
                  1     <scriptPath>Jenkinsfile</scriptPath>
                  1         <sourceId>888eebba-ff28-4fda-b1c5-646b8e2dc979</sourceId>
                  1           <submoduleCfg class="empty-list"/>
                  1   <triggers/>
                  1               <url>ssh://git@gitlab.ci.duskforest.xyz:2222/websites/minecraft.ha3.eu.git</url>
                  1           </userRemoteConfigs>
                  1           <userRemoteConfigs>
                  1 <?xml version='1.0' encoding='UTF-8'?>
            

             

            If this helps, this is the Jenkinsfile of the master branch prior to the merge:

            pipeline {
                agent any
                stages {
                    stage('Create Docker image') {
                        agent {
                            label 'docker'
                        }
                        steps {
                            sh 'docker build -t duskforest.xyz:5000/app-minecraft-ha3-eu .'
                            withCredentials([usernamePassword(credentialsId: 'regcenter', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
                                sh '''
                                    docker login -u $USER -p $PASS duskforest.xyz:5000
                                    docker push duskforest.xyz:5000/app-minecraft-ha3-eu
                                '''
                            }
                        }
                    }
                }
                post {
                    success {
                        updateGitlabCommitStatus name: 'jenkins', state: 'success'
                    }
                    failure {
                        updateGitlabCommitStatus name: 'jenkins', state: 'failed'
                    }
                    unstable {
                        updateGitlabCommitStatus name: 'jenkins', state: 'failed'
                    }
                }
            }
            

            This is the Jenkinsfile of the angular-variant branch which was merged. There are about 20 commits in this branch.

            pipeline {
                agent any
                stages {
                    stage('Clean') {
                        agent any
                        steps {
                            sh 'ls'
                            dir('dist') {
                                deleteDir()
                            }
                            dir('pack') {
                                deleteDir()
                            }
                        }
                    }
                    stage('Build') {
                        agent {
                            docker 'duskforest.xyz:5000/slave-ng2'
                        }
                        steps {
                            sh '''
                                JS_HASH=`date -u +%FT%T%z`
                                ls
                                #sed -i "s/__HASH__/$JS_HASH/g" ./src/app/services/update.service.ts
                                #sed -i "s/__HASH__/$JS_HASH/g" ./src/assets/version.json
                                #sed -i "s/__HASH__/$JS_HASH/g" ./src/app/components/home/home.component.html
                            '''
                            sh '''
                                yarn install; yarn run ng build -- --prod --aot --no-sourcemap
                            '''
                        }
                    }
                    stage('Create Distributable') {
                        agent any
                        steps {
                            sh 'mkdir -p pack'
                            zip zipFile: 'pack/dist.zip', dir: 'dist'
                            archive 'pack/dist.zip'
                        }
                    }
                    stage('Create Docker image') {
                        agent {
                            label 'docker'
                        }
                        steps {
                            sh 'docker build -t duskforest.xyz:5000/app-minecraft-ha3-eu-experimental .'
                            withCredentials([usernamePassword(credentialsId: 'regcenter', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
                                sh '''
                                    docker login -u $USER -p $PASS duskforest.xyz:5000
                                    docker push duskforest.xyz:5000/app-minecraft-ha3-eu-experimental
                                '''
                            }
                        }
                    }
                }
                post {
                    success {
                        updateGitlabCommitStatus name: 'jenkins', state: 'success'
                    }
                    failure {
                        updateGitlabCommitStatus name: 'jenkins', state: 'failed'
                    }
                    unstable {
                        updateGitlabCommitStatus name: 'jenkins', state: 'failed'
                    }
                }
            }
            

            I don't know if this will help or not.

            Show
            hay Georges Y added a comment - I have the same problem reported on JENKINS-44804 I just remembered that this occurred a few commits after merging two branches.   This is the master branch config.xml <?xml version= '1.0' encoding= 'UTF-8' ?> <flow-definition plugin= "workflow-job@2.11" > <actions/> <keepDependencies> false </keepDependencies> <properties> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty plugin= "workflow-multibranch@2.15" > <branch plugin= "branch-api@2.0.10" > <sourceId>888eebba-ff28-4fda-b1c5-646b8e2dc979</sourceId> <head plugin= "scm-api@2.1.1" > <name>master</name> </head> <scm class= "hudson.plugins.git.GitSCM" plugin= "git@3.3.0" > <configVersion>2</configVersion> <userRemoteConfigs> <hudson.plugins.git.UserRemoteConfig> <name>origin</name> <refspec>+refs/heads/*:refs/remotes/origin/*</refspec> <url>ssh: //git@gitlab.ci.duskforest.xyz:2222/websites/minecraft.ha3.eu.git</url> <credentialsId>jenkins-pipeline-2</credentialsId> </hudson.plugins.git.UserRemoteConfig> </userRemoteConfigs> <branches class= "singleton-list" > <hudson.plugins.git.BranchSpec> <name>master</name> </hudson.plugins.git.BranchSpec> </branches> <doGenerateSubmoduleConfigurations> false </doGenerateSubmoduleConfigurations> <submoduleCfg class= "empty-list" /> <extensions/> </scm> <properties/> <actions> <jenkins.scm.api.metadata.PrimaryInstanceMetadataAction plugin= "scm-api@2.1.1" /> </actions> </branch> </org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> </properties> <definition class= "org.jenkinsci.plugins.workflow.multibranch.SCMBinder" plugin= "workflow-multibranch@2.15" > <scriptPath>Jenkinsfile</scriptPath> </definition> <triggers/> <disabled> false </disabled> </flow-definition> This is the angular-variant branch, but I'm not gonna paste the config file here: rose /data/docker-data/df-ci-blueocean/jobs/minecraft.ha3.eu/branches/angular-variant # cat config.xml | sort | uniq -c 1 <actions/> 1 <actions/> 1 </branch> 1 </branches> 1 <branches class= "singleton-list" > 1 <branch plugin= "branch-api@2.0.10" > 1 <configVersion>2</configVersion> 1 <credentialsId>jenkins-pipeline-2</credentialsId> 1 </definition> 1 <definition class= "org.jenkinsci.plugins.workflow.multibranch.SCMBinder" plugin= "workflow-multibranch@2.15" > 1 <disabled> false </disabled> 1 <doGenerateSubmoduleConfigurations> false </doGenerateSubmoduleConfigurations> 1 <extensions/> 1 </flow-definition> 1 <flow-definition plugin= "workflow-job@2.11" > 1 </head> 1 <head plugin= "scm-api@2.1.1" > 1 </hudson.plugins.git.BranchSpec> 1 <hudson.plugins.git.BranchSpec> 1 </hudson.plugins.git.UserRemoteConfig> 1 <hudson.plugins.git.UserRemoteConfig> 1 <keepDependencies> false </keepDependencies> 1 <name>angular-variant</name> 1 <name>angular-variant</name> 1 <name>origin</name> 1 </org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty> 1 <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty plugin= "workflow-multibranch@2.15" > 762521 <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> 1 </properties> 1 <properties> 1 <properties/> 1 <refspec>+refs/heads/*:refs/remotes/origin/*</refspec> 1 </scm> 1 <scm class= "hudson.plugins.git.GitSCM" plugin= "git@3.3.0" > 1 <scriptPath>Jenkinsfile</scriptPath> 1 <sourceId>888eebba-ff28-4fda-b1c5-646b8e2dc979</sourceId> 1 <submoduleCfg class= "empty-list" /> 1 <triggers/> 1 <url>ssh: //git@gitlab.ci.duskforest.xyz:2222/websites/minecraft.ha3.eu.git</url> 1 </userRemoteConfigs> 1 <userRemoteConfigs> 1 <?xml version= '1.0' encoding= 'UTF-8' ?>   If this helps, this is the Jenkinsfile of the master branch prior to the merge: pipeline { agent any stages { stage( 'Create Docker image' ) { agent { label 'docker' } steps { sh 'docker build -t duskforest.xyz:5000/app-minecraft-ha3-eu .' withCredentials([usernamePassword(credentialsId: 'regcenter' , passwordVariable: 'PASS' , usernameVariable: 'USER' )]) { sh ''' docker login -u $USER -p $PASS duskforest.xyz:5000 docker push duskforest.xyz:5000/app-minecraft-ha3-eu ''' } } } } post { success { updateGitlabCommitStatus name: 'jenkins' , state: 'success' } failure { updateGitlabCommitStatus name: 'jenkins' , state: 'failed' } unstable { updateGitlabCommitStatus name: 'jenkins' , state: 'failed' } } } This is the Jenkinsfile of the angular-variant branch which was merged. There are about 20 commits in this branch. pipeline { agent any stages { stage( 'Clean' ) { agent any steps { sh 'ls' dir( 'dist' ) { deleteDir() } dir( 'pack' ) { deleteDir() } } } stage( 'Build' ) { agent { docker 'duskforest.xyz:5000/slave-ng2' } steps { sh ''' JS_HASH=`date -u +%FT%T%z` ls #sed -i "s/__HASH__/$JS_HASH/g" ./src/app/services/update.service.ts #sed -i "s/__HASH__/$JS_HASH/g" ./src/assets/version.json #sed -i "s/__HASH__/$JS_HASH/g" ./src/app/components/home/home.component.html ''' sh ''' yarn install; yarn run ng build -- --prod --aot --no-sourcemap ''' } } stage( 'Create Distributable' ) { agent any steps { sh 'mkdir -p pack' zip zipFile: 'pack/dist.zip' , dir: 'dist' archive 'pack/dist.zip' } } stage( 'Create Docker image' ) { agent { label 'docker' } steps { sh 'docker build -t duskforest.xyz:5000/app-minecraft-ha3-eu-experimental .' withCredentials([usernamePassword(credentialsId: 'regcenter' , passwordVariable: 'PASS' , usernameVariable: 'USER' )]) { sh ''' docker login -u $USER -p $PASS duskforest.xyz:5000 docker push duskforest.xyz:5000/app-minecraft-ha3-eu-experimental ''' } } } } post { success { updateGitlabCommitStatus name: 'jenkins' , state: 'success' } failure { updateGitlabCommitStatus name: 'jenkins' , state: 'failed' } unstable { updateGitlabCommitStatus name: 'jenkins' , state: 'failed' } } } I don't know if this will help or not.
            Hide
            hay Georges Y added a comment - - edited

            Something I noticed is that the quantity of "<org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>" seems to be doubling after each build. Example:

            cat config.xml | sort | uniq -c

            15 <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>

            After a build:

            31 <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>

            After a build:

            63 <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>

             

            So if you want to reproduce the issue, build the job 19 times. I have not tried, but I'm pretty convinced it will work.

            Show
            hay Georges Y added a comment - - edited Something I noticed is that the quantity of "<org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>" seems to be doubling after each build. Example: cat config.xml | sort | uniq -c 15 <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/> After a build: 31 <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/> After a build: 63 <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>   So if you want to reproduce the issue, build the job 19 times. I have not tried, but I'm pretty convinced it will work.
            Hide
            abayer Andrew Bayer added a comment -

            Yup, that's the problem in a nutshell. Just waiting for reviews of the linked PR that should fix this before doing a release.

            Show
            abayer Andrew Bayer added a comment - Yup, that's the problem in a nutshell. Just waiting for reviews of the linked PR that should fix this before doing a release.
            Hide
            abayer Andrew Bayer added a comment -

            Fixed in Declarative 1.1.6, which is being released right now.

            Show
            abayer Andrew Bayer added a comment - Fixed in Declarative 1.1.6, which is being released right now.
            abayer Andrew Bayer made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/bf64f1d17bf51918941f0995b2a3ca3c60aec332
            Log:
            [FIXED JENKINS-44809] Clean up existing job property handling.

            Two aspects - stop re-adding existing job properties defined outside
            of the Jenkinsfile, since they can't have changed, and remove all
            existing instances of a job property class defined inside the
            Jenkinsfile before we add the new instance, to avoid duplication.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/bf64f1d17bf51918941f0995b2a3ca3c60aec332 Log: [FIXED JENKINS-44809] Clean up existing job property handling. Two aspects - stop re-adding existing job properties defined outside of the Jenkinsfile, since they can't have changed, and remove all existing instances of a job property class defined inside the Jenkinsfile before we add the new instance, to avoid duplication.
            Hide
            abayer Andrew Bayer added a comment -

            And thanks, Stefan Thurnherr, for the detailed bug report and info - I could not have solved this anywhere near as fast as I did without your input!

            Show
            abayer Andrew Bayer added a comment - And thanks, Stefan Thurnherr , for the detailed bug report and info - I could not have solved this anywhere near as fast as I did without your input!
            Hide
            stefanthurnherr Stefan Thurnherr added a comment - - edited

            Andrew Bayer I've upgraded the plugins to 1.1.6 (Pipeline: Model API, Pipeline: Declarative Extension Points API, Pipeline: Stage Tags Metadata, Pipeline: Model Definition) now and restarted jenkins. I now can access the multibranch jobs, however I'm still getting StackOverflowExceptions when trying to manually trigger a build. I've attached my branch config.xml afterUpgradeTo1.1.6_config.xml.gz

            Thrown when trying to start a build through Jenkins UI (play button)
            
            Jun 12, 2017 9:21:39 PM org.eclipse.jetty.server.handler.ContextHandler$Context log
             WARNING: Error while serving [https://ci.company.net/view/]<view-name>/job/<pipeline-name>/job/MigrateJenkinsfileToDeclarativePipelineSyntax/build
             java.lang.reflect.InvocationTargetException
             at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
             at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
             at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
             at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
             at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
             at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
             at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
             at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
             at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
             at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
             at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
             at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
             at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
             at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
             at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
             at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
             at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
             at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
             at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
             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:841)
             at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
             at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
             at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
             at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
             at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
             at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
             at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
             at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
             at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
             at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
             at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
             at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
             at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
             at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
             at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
             at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
             at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
             at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
             at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
             at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
             at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
             at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
             at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
             at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
             at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
             at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
             at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
             at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
             at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
             at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
             at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
             at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
             at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
             at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
             at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
             at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
             at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
             at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
             at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
             at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
             at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
             at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
             at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
             at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
             at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
             at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
             at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
             at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
             at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
             at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
             at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
             at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
             at org.eclipse.jetty.server.Server.handle(Server.java:564)
             at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
             at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
             at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
             at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
             at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
             at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
             at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
             at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
             at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
             at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
             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:748)
             Caused by: javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:[file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-2.64.jar!/lib/hudson/project/configurable.jelly:44:64:|file:///var/cache/jenkins/war/WEB-INF/lib/jenkins-core-2.64.jar!/lib/hudson/project/configurable.jelly:44:64:] <j:when> java.lang.StackOverflowError
             at org.kohsuke.stapler.jelly.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:60)
             at jenkins.model.ParameterizedJobMixIn.doBuild(ParameterizedJobMixIn.java:204)
             at org.jenkinsci.plugins.workflow.job.WorkflowJob.doBuild(WorkflowJob.java:301)
             at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
             at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
             ... 88 more
             Caused by: org.apache.commons.jelly.JellyTagException: jar:[file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-2.64.jar!/lib/hudson/project/configurable.jelly:44:64:|file:///var/cache/jenkins/war/WEB-INF/lib/jenkins-core-2.64.jar!/lib/hudson/project/configurable.jelly:44:64:] <j:when> java.lang.StackOverflowError
             at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745)
             at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:289)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
             at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
             at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
             at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
             at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
             at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
             at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
             at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
             at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
             at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
             at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
             at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
             at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
             at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
             at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
             at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
             at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
             at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
             at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
             at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
             at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
             at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
             at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
             at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
             at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
             at org.kohsuke.stapler.jelly.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:55)
             ... 92 more
             Caused by: java.lang.StackOverflowError
             at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:69)
             at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
             at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
             at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
             at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
             at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
             at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
             at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
             at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            
            [...]
            
            Thrown when clicking on another (non-declarative) multibranch pipeline
            WARNING: Caught exception evaluating: action.iconClassName != null ? action.iconClassName + ' icon-md' : action.iconFileName in /job/<some-other-pipeline-name/. 
            Reason: java.lang.reflect.InvocationTargetException
            java.lang.reflect.InvocationTargetException
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:498)
                    at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
                    at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
                    at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
                    at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
                    at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
                    at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
                    at org.apache.commons.jexl.parser.ASTNENode.value(ASTNENode.java:55)
                    at org.apache.commons.jexl.parser.ASTTernaryNode.value(ASTTernaryNode.java:38)
                    at org.apache.commons.jexl.parser.ASTExpression.value(ASTExpression.java:54)
                    at org.apache.commons.jexl.parser.ASTExpressionExpression.value(ASTExpressionExpression.java:56)
                    at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
                    at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
                    at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:121)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                    at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
                    at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
                    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
                    at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
                    at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
                    at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
                    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
                    at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
                    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
                    at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
                    at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
                    at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
                    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
                    at org.kohsuke.stapler.jelly.CompressTag.doTag(CompressTag.java:44)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
                    at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
                    at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
                    at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
                    at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:112)
                    at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:140)
                    at org.kohsuke.stapler.IndexViewDispatcher.dispatch(IndexViewDispatcher.java:30)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:782)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
                    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:841)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
                    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
                    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
                    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
                    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
                    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
                    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
                    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
                    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
                    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
                    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
                    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
                    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
                    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
                    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
                    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
                    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
                    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
                    at org.eclipse.jetty.server.Server.handle(Server.java:564)
                    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
                    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
                    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
                    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
                    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
                    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
                    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
                    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
                    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
                    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:748)
            Caused by: java.lang.StackOverflowError
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:69)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
                    at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            [...]
            
            Show
            stefanthurnherr Stefan Thurnherr added a comment - - edited Andrew Bayer I've upgraded the plugins to 1.1.6 (Pipeline: Model API, Pipeline: Declarative Extension Points API, Pipeline: Stage Tags Metadata, Pipeline: Model Definition) now and restarted jenkins. I now can access the multibranch jobs, however I'm still getting StackOverflowExceptions when trying to manually trigger a build . I've attached my branch config.xml afterUpgradeTo1.1.6_config.xml.gz Thrown when trying to start a build through Jenkins UI (play button) Jun 12, 2017 9:21:39 PM org.eclipse.jetty.server.handler.ContextHandler$Context log WARNING: Error while serving [https: //ci.company.net/view/]<view-name>/job/<pipeline-name>/job/MigrateJenkinsfileToDeclarativePipelineSyntax/build java.lang.reflect.InvocationTargetException at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) 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:841) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) 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:748) Caused by: javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:[file:/ var /cache/jenkins/war/WEB-INF/lib/jenkins-core-2.64.jar!/lib/hudson/project/configurable.jelly:44:64:|file: /// var /cache/jenkins/war/WEB-INF/lib/jenkins-core-2.64.jar!/lib/hudson/project/configurable.jelly:44:64:] <j:when> java.lang.StackOverflowError at org.kohsuke.stapler.jelly.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:60) at jenkins.model.ParameterizedJobMixIn.doBuild(ParameterizedJobMixIn.java:204) at org.jenkinsci.plugins.workflow.job.WorkflowJob.doBuild(WorkflowJob.java:301) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) ... 88 more Caused by: org.apache.commons.jelly.JellyTagException: jar:[file:/ var /cache/jenkins/war/WEB-INF/lib/jenkins-core-2.64.jar!/lib/hudson/project/configurable.jelly:44:64:|file: /// var /cache/jenkins/war/WEB-INF/lib/jenkins-core-2.64.jar!/lib/hudson/project/configurable.jelly:44:64:] <j:when> java.lang.StackOverflowError at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:289) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53) at org.kohsuke.stapler.jelly.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:55) ... 92 more Caused by: java.lang.StackOverflowError at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:69) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) [...] Thrown when clicking on another (non-declarative) multibranch pipeline WARNING: Caught exception evaluating: action.iconClassName != null ? action.iconClassName + ' icon-md' : action.iconFileName in /job/<some-other-pipeline-name/. Reason: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314) at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185) at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75) at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) at org.apache.commons.jexl.parser.ASTNENode.value(ASTNENode.java:55) at org.apache.commons.jexl.parser.ASTTernaryNode.value(ASTTernaryNode.java:38) at org.apache.commons.jexl.parser.ASTExpression.value(ASTExpression.java:54) at org.apache.commons.jexl.parser.ASTExpressionExpression.value(ASTExpressionExpression.java:56) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74) at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:121) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.kohsuke.stapler.jelly.CompressTag.doTag(CompressTag.java:44) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53) at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:112) at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:140) at org.kohsuke.stapler.IndexViewDispatcher.dispatch(IndexViewDispatcher.java:30) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:782) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) 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:841) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) 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:748) Caused by: java.lang.StackOverflowError at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:69) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) [...]
            Hide
            renescheibe René Scheibe added a comment -

            I think you have to once delete & recreate each affected job after the plugin upgrade. If the config.xml is once "broken" even the updated plugin cannot handle it. The updated plugin just does not break the config.xml again.

            Show
            renescheibe René Scheibe added a comment - I think you have to once delete & recreate each affected job after the plugin upgrade. If the config.xml is once "broken" even the updated plugin cannot handle it. The updated plugin just does not break the config.xml again.
            stefanthurnherr Stefan Thurnherr made changes -
            Attachment afterUpgradeTo1.1.6_config.xml.gz [ 38445 ]
            Hide
            stefanthurnherr Stefan Thurnherr added a comment -

            Ah ok from the code changes I understood that the plugin would clean the config.xml automatically i.e. drop all duplicate properties? I can live with recreating the job, but I think that should be stated clearly somewhere. That would mean that basically every declarative pipeline would have to be recreated?

            Show
            stefanthurnherr Stefan Thurnherr added a comment - Ah ok from the code changes I understood that the plugin would clean the config.xml automatically i.e. drop all duplicate properties? I can live with recreating the job, but I think that should be stated clearly somewhere. That would mean that basically every declarative pipeline would have to be recreated?
            Hide
            abayer Andrew Bayer added a comment -

            Stefan Thurnherr - It's supposed to do that, but it does have to run once to fix things. Gimme a couple minutes and I'll have a script you can run in the Jenkins Script Console to do the de-duplication.

            Show
            abayer Andrew Bayer added a comment - Stefan Thurnherr - It's supposed to do that, but it does have to run once to fix things. Gimme a couple minutes and I'll have a script you can run in the Jenkins Script Console to do the de-duplication.
            Hide
            renescheibe René Scheibe added a comment - - edited

            Recreating the jobs is just what I did because I still got the stack overflow as you Stefan Thurnherr.

            Show
            renescheibe René Scheibe added a comment - - edited Recreating the jobs is just what I did because I still got the stack overflow as you Stefan Thurnherr .
            Hide
            stefanthurnherr Stefan Thurnherr added a comment - - edited

            Actually the config.xml seems to have fixed itself now, not sure what triggered it but I have not recreated the job. Either by waiting a few minutes, or by trying to trigger the job manually, or by the automatic periodic reindexing of the multibranch pipeline...

            Show
            stefanthurnherr Stefan Thurnherr added a comment - - edited Actually the config.xml seems to have fixed itself now, not sure what triggered it but I have not recreated the job . Either by waiting a few minutes, or by trying to trigger the job manually, or by the automatic periodic reindexing of the multibranch pipeline...
            Hide
            abayer Andrew Bayer added a comment -

            René Scheibe - Yeah, I forgot to account for the jobs that had so many properties already on them that they couldn't ever actually run in the first place!

            The following script, run in the Jenkins Script Console, will de-duplicate all job properties from all Pipeline jobs on a master:

            import org.jenkinsci.plugins.workflow.job.WorkflowJob
            
            Jenkins.instance.items.each { j ->
              if (j instanceof WorkflowJob) {
                Set<String> seenProps = new HashSet<>()
                
                j.getAllProperties().each { p ->
                  j.removeProperty(p)
                  if (!seenProps.contains(p.descriptor.id)) {
                    seenProps.add(p.descriptor.id)
                    j.addProperty(p)
                  }
                }
              }
            }
            
            Show
            abayer Andrew Bayer added a comment - René Scheibe - Yeah, I forgot to account for the jobs that had so many properties already on them that they couldn't ever actually run in the first place! The following script, run in the Jenkins Script Console, will de-duplicate all job properties from all Pipeline jobs on a master: import org.jenkinsci.plugins.workflow.job.WorkflowJob Jenkins.instance.items.each { j -> if (j instanceof WorkflowJob) { Set< String > seenProps = new HashSet<>() j.getAllProperties().each { p -> j.removeProperty(p) if (!seenProps.contains(p.descriptor.id)) { seenProps.add(p.descriptor.id) j.addProperty(p) } } } }
            Hide
            abayer Andrew Bayer added a comment -

            Stefan Thurnherr - Quantum! =)

            Show
            abayer Andrew Bayer added a comment - Stefan Thurnherr - Quantum! =)
            Hide
            stefanthurnherr Stefan Thurnherr added a comment -

            Andrew Bayer  works like a charm now, thanks for the release!

            Show
            stefanthurnherr Stefan Thurnherr added a comment - Andrew Bayer    works like a charm now, thanks for the release!
            Hide
            abayer Andrew Bayer added a comment -

            Stefan Thurnherr - Sorry for all the hassle! I appreciate your patience!

            Show
            abayer Andrew Bayer added a comment - Stefan Thurnherr - Sorry for all the hassle! I appreciate your patience!
            stefanthurnherr Stefan Thurnherr made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-44804 [ JENKINS-44804 ]
            anthonymastrean Anthony Mastrean made changes -
            Attachment image-2017-06-20-11-11-52-044.png [ 38541 ]
            Hide
            anthonymastrean Anthony Mastrean added a comment -

            I encountered this problem yesterday. I updated the relevant plugins and restarted Jenkins, but the multibranch pipeline job page and all children still show the exception. What do I have to do to clear this up?

            Show
            anthonymastrean Anthony Mastrean added a comment - I encountered this problem yesterday. I updated the relevant plugins and restarted Jenkins, but the multibranch pipeline job page and all children still show the exception. What do I have to do to clear this up?
            Show
            abayer Andrew Bayer added a comment - Anthony Mastrean Either wait for the jobs to build on their own or see https://issues.jenkins-ci.org/browse/JENKINS-44809?focusedCommentId=302837&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-302837
            Hide
            alwynpan Alwyn Pan added a comment -

            Andrew Bayer thank you for your quick fix. I have updated the plug-in, and ran the script you provided. However, I still got the errors when I click the pipeline. Can you please help? Thank you.

             

             

            Show
            alwynpan Alwyn Pan added a comment - Andrew Bayer thank you for your quick fix. I have updated the plug-in, and ran the script you provided. However, I still got the errors when I click the pipeline. Can you please help? Thank you.    
            alwynpan Alwyn Pan made changes -
            Attachment 2017-06-23_12-21-01.png [ 38615 ]
            Hide
            jplemelin JP Lemelin added a comment - - edited

            Alwyn Pan, I face up with the same problem, we also had to manually clean your config.xml of ours jobs.

             I my case  jobs/<pipeline-name>/branches/<branch-name>/config.xml had huge size (some had more than 300mb!!) I just remove all instance of the following line (more than 3.5 millions of line!)

            <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>

             I hope this will help you!

            Show
            jplemelin JP Lemelin added a comment - - edited Alwyn Pan , I face up with the same problem, we also had to manually clean your config.xml of ours jobs.  I my case  jobs/<pipeline-name>/branches/<branch-name>/config.xml had huge size (some had more than 300mb!!) I just remove all instance of the following line (more than 3.5 millions of line!) <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" />  I hope this will help you!
            Hide
            abayer Andrew Bayer added a comment - - edited

            Alwyn Pan Hmmm... the script worked for me to clean up jobs, and that's definitely the symptom of the problem it cleans up. Maybe try this version, which has some diagnostic information:

            import org.jenkinsci.plugins.workflow.job.WorkflowJob
            import jenkins.branch.OrganizationFolder
            import jenkins.branch.MultiBranchProject
            
            Jenkins.instance.allItems.each { j ->
              if (j instanceof WorkflowJob || j instanceof OrganizationFolder || j instanceof MultiBranchProject) {
                Set<String> multiples = new HashSet<>()
                Set<String> seenProps = new HashSet<>()
                
                j.getAllProperties().each { p ->
                  j.removeProperty(p)
                  if (!seenProps.contains(p.descriptor.id)) {
                    seenProps.add(p.descriptor.id)
                    j.addProperty(p)
                  } else {
                    multiples.add(p.descriptor.id)
                  }
                }
                if (!multiples.isEmpty()) {
                  println "FIXED: Job ${j.name} had duplicate properties: ${multiples}"
                } else {
                  println " - job ${j.name} did not have duplicate properties."
                }
              }
            }
            

            And see if the job you're getting the exception on is listed as fixed or not...

            Show
            abayer Andrew Bayer added a comment - - edited Alwyn Pan Hmmm... the script worked for me to clean up jobs, and that's definitely the symptom of the problem it cleans up. Maybe try this version, which has some diagnostic information: import org.jenkinsci.plugins.workflow.job.WorkflowJob import jenkins.branch.OrganizationFolder import jenkins.branch.MultiBranchProject Jenkins.instance.allItems.each { j -> if (j instanceof WorkflowJob || j instanceof OrganizationFolder || j instanceof MultiBranchProject) { Set< String > multiples = new HashSet<>() Set< String > seenProps = new HashSet<>() j.getAllProperties().each { p -> j.removeProperty(p) if (!seenProps.contains(p.descriptor.id)) { seenProps.add(p.descriptor.id) j.addProperty(p) } else { multiples.add(p.descriptor.id) } } if (!multiples.isEmpty()) { println "FIXED: Job ${j.name} had duplicate properties: ${multiples}" } else { println " - job ${j.name} did not have duplicate properties." } } } And see if the job you're getting the exception on is listed as fixed or not...
            Hide
            jplemelin JP Lemelin added a comment -

            Andrew Bayer  It'll not handle the case of OrganizationFolder  (jenkins.branch.OrganizationFolder)

            Show
            jplemelin JP Lemelin added a comment - Andrew Bayer   It'll not handle the case of OrganizationFolder  (jenkins.branch.OrganizationFolder)
            Hide
            abayer Andrew Bayer added a comment -

            JP Lemelin Huh - I didn't think this could have happened to the OrganizationFolder itself, just the jobs nested within it. Alrightie, tweaking the script above to handle that properly.

            Show
            abayer Andrew Bayer added a comment - JP Lemelin Huh - I didn't think this could have happened to the OrganizationFolder itself, just the jobs nested within it. Alrightie, tweaking the script above to handle that properly.
            Hide
            jplemelin JP Lemelin added a comment - - edited

            Andrew Bayer I confirm, it only happened to the nested jobs. 

            Show
            jplemelin JP Lemelin added a comment - - edited Andrew Bayer  I confirm, it only happened to the nested jobs. 
            Hide
            abayer Andrew Bayer added a comment -

            Alwyn Pan Looking forward to hearing if the new script does the trick for you - let me know what its output is if it doesn't work after running a couple times.

            Show
            abayer Andrew Bayer added a comment - Alwyn Pan Looking forward to hearing if the new script does the trick for you - let me know what its output is if it doesn't work after running a couple times.
            Hide
            jplemelin JP Lemelin added a comment -

             

             

            // Iterate over all job of a Organization
            import org.jenkinsci.plugins.workflow.job.WorkflowJob
            import jenkins.branch.OrganizationFolder
            
            Jenkins.instance.items.each { i ->
              if (i instanceof OrganizationFolder) {
                println "-OrganizationFolder: ${i.name}"
            
                i.getItems().each { j ->
                  println " -Repo:${j.name}"
            
                  j.getItems().each { k ->
                    println " -job ${k.name}"
                  }
                }
              }
            }
            

            In my case `k` is a instance of `org.jenkinsci.plugins.workflow.job.WorkflowJob`

             

             

            Show
            jplemelin JP Lemelin added a comment -     // Iterate over all job of a Organization import org.jenkinsci.plugins.workflow.job.WorkflowJob import jenkins.branch.OrganizationFolder Jenkins.instance.items.each { i -> if (i instanceof OrganizationFolder) { println "-OrganizationFolder: ${i.name}" i.getItems().each { j -> println " -Repo:${j.name}" j.getItems().each { k -> println " -job ${k.name}" } } } } In my case `k` is a instance of `org.jenkinsci.plugins.workflow.job.WorkflowJob`    
            Hide
            abayer Andrew Bayer added a comment -

            Aaah, yeah. Needed allItems.

            Show
            abayer Andrew Bayer added a comment - Aaah, yeah. Needed allItems .
            Hide
            jplemelin JP Lemelin added a comment -

             Indeed! allItems will list all nested jobs.

            Show
            jplemelin JP Lemelin added a comment -  Indeed! allItems will list all nested jobs.
            alwynpan Alwyn Pan made changes -
            Attachment image-2017-06-24-10-25-56-507.png [ 38630 ]
            alwynpan Alwyn Pan made changes -
            Attachment image-2017-06-24-10-27-18-582.png [ 38631 ]
            Hide
            alwynpan Alwyn Pan added a comment -

            Thank you so much Andrew Bayer and JP Lemelin. I had a good read of the previous threads (sorry, I should have done this before posting the question) and figured out the duplication of `<org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>` could be the issue. In my case, I had 5.6 million lines of duplication. I removed them and restarted Jenkins, it seems everything is working again.

            Is that anything else I need to do?

            Also I have noticed there are four jobs stuck in the Build History and I can't find a way to cancel it. Is there anything I can do about it?

             

            Thank you again for your prompt replies.

             

             

             

            Show
            alwynpan Alwyn Pan added a comment - Thank you so much Andrew Bayer and JP Lemelin . I had a good read of the previous threads (sorry, I should have done this before posting the question) and figured out the duplication of `<org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>` could be the issue. In my case, I had 5.6 million lines of duplication. I removed them and restarted Jenkins, it seems everything is working again. Is that anything else I need to do? Also I have noticed there are four jobs stuck in the Build History and I can't find a way to cancel it. Is there anything I can do about it?   Thank you again for your prompt replies.      
            Hide
            alwynpan Alwyn Pan added a comment - - edited

            Andrew Bayer I have tried your script

            // code import org.jenkinsci.plugins.workflow.job.WorkflowJob
            import jenkins.branch.OrganizationFolder
            import jenkins.branch.MultiBranchProject
            
            Jenkins.instance.allItems.each { j ->
            if (j instanceof WorkflowJob || j instanceof OrganizationFolder || j instanceof MultiBranchProject) {
            Set<String> multiples = new HashSet<>()
            Set<String> seenProps = new HashSet<>()
            
            j.getAllProperties().each { p ->
            j.removeProperty(p)
            if (!seenProps.contains(p.descriptor.id)) {
            seenProps.add(p.descriptor.id)
            j.addProperty(p)
            } else {
            multiples.add(p.descriptor.id)
            }
            }
            if (!multiples.isEmpty()) {
            println "FIXED: Job ${j.name} had duplicate properties: ${multiples}"
            } else {
            println " - job ${j.name} did not have duplicate properties."
            }
            }
            }
            

            And I got this error:

            // code groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject.getAllProperties() is applicable for argument types: () values: []
            Possible solutions: getProperties(), getProperties()
            	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
            	at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49)
            	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
            	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
            	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
            	at Script1$_run_closure1.doCall(Script1.groovy:10)
            	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            	at java.lang.reflect.Method.invoke(Method.java:498)
            	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
            	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
            	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
            	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
            	at groovy.lang.Closure.call(Closure.java:414)
            	at groovy.lang.Closure.call(Closure.java:430)
            	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
            	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
            	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
            	at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
            	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
            	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
            	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
            	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
            	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
            	at Script1.run(Script1.groovy:5)
            	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
            	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
            	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
            	at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142)
            	at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114)
            	at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
            	at hudson.util.RemotingDiagnostics.executeGroovy(RemotingDiagnostics.java:111)
            	at jenkins.model.Jenkins._doScript(Jenkins.java:4336)
            	at jenkins.model.Jenkins.doScript(Jenkins.java:4308)
            	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
            	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
            	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
            	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
            	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
            	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
            	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
            	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
            	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 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:49)
            	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
            	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
            	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
            	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
            	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
            	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
            	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
            	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
            	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
            	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
            	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
            	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
            	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
            	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
            	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
            	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
            	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
            	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:82)
            	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 winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
            	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)

            Can you please also have a look? Thank you.

            Show
            alwynpan Alwyn Pan added a comment - - edited Andrew Bayer I have tried your script // code import org.jenkinsci.plugins.workflow.job.WorkflowJob import jenkins.branch.OrganizationFolder import jenkins.branch.MultiBranchProject Jenkins.instance.allItems.each { j -> if (j instanceof WorkflowJob || j instanceof OrganizationFolder || j instanceof MultiBranchProject) { Set< String > multiples = new HashSet<>() Set< String > seenProps = new HashSet<>() j.getAllProperties().each { p -> j.removeProperty(p) if (!seenProps.contains(p.descriptor.id)) { seenProps.add(p.descriptor.id) j.addProperty(p) } else { multiples.add(p.descriptor.id) } } if (!multiples.isEmpty()) { println "FIXED: Job ${j.name} had duplicate properties: ${multiples}" } else { println " - job ${j.name} did not have duplicate properties." } } } And I got this error: // code groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject.getAllProperties() is applicable for argument types: () values: [] Possible solutions: getProperties(), getProperties() at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) at Script1$_run_closure1.doCall(Script1.groovy:10) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024) at groovy.lang.Closure.call(Closure.java:414) at groovy.lang.Closure.call(Closure.java:430) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056) at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at Script1.run(Script1.groovy:5) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594) at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142) at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114) at hudson.remoting.LocalChannel.call(LocalChannel.java:45) at hudson.util.RemotingDiagnostics.executeGroovy(RemotingDiagnostics.java:111) at jenkins.model.Jenkins._doScript(Jenkins.java:4336) at jenkins.model.Jenkins.doScript(Jenkins.java:4308) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) 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 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:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) 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:82) 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 winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) 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) Can you please also have a look? Thank you.
            Hide
            abayer Andrew Bayer added a comment -

            Whoops - change if (j instanceof WorkflowJob || j instanceof OrganizationFolder || j instanceof MultiBranchProject) to if (j instanceof WorkflowJob).

            Show
            abayer Andrew Bayer added a comment - Whoops - change if (j instanceof WorkflowJob || j instanceof OrganizationFolder || j instanceof MultiBranchProject) to if (j instanceof WorkflowJob) .
            Hide
            gaieges Evin Callahan added a comment -

            Andrew Bayer thanks for writing up a script to resolve the messed up jobs. Super helpful!

            I'm running into a problem where one of my branches for a job already has a ton of entries like this:

            <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference="../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty"/>
            

            And so when I try running your script as it is above in the comments of this ticket, I get a stack overflow:

            java.lang.StackOverflowError
            	at org.acegisecurity.providers.AbstractAuthenticationToken.equals(AbstractAuthenticationToken.java:79)
            	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:69)
            	at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77)
            .. repeats x5000
            

            Do I need to go in and delete this job entirely for it to work?

            Show
            gaieges Evin Callahan added a comment - Andrew Bayer thanks for writing up a script to resolve the messed up jobs. Super helpful! I'm running into a problem where one of my branches for a job already has a ton of entries like this: <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty reference= "../org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty" /> And so when I try running your script as it is above in the comments of this ticket, I get a stack overflow: java.lang.StackOverflowError at org.acegisecurity.providers.AbstractAuthenticationToken.equals(AbstractAuthenticationToken.java:79) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:69) at org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty$1.hasPermission(BranchJobProperty.java:77) .. repeats x5000 Do I need to go in and delete this job entirely for it to work?
            Hide
            abayer Andrew Bayer added a comment -

            You've upgraded to the latest release of Pipeline: Model Definition? (which is currently 1.1.7) And you ran that script from the Jenkins Script Console but still got that error? Hrm. Well, if you need to, you can manually edit the file containing all those duplicates and remove all those lines, then restart Jenkins?

            Show
            abayer Andrew Bayer added a comment - You've upgraded to the latest release of Pipeline: Model Definition ? (which is currently 1.1.7) And you ran that script from the Jenkins Script Console but still got that error? Hrm. Well, if you need to, you can manually edit the file containing all those duplicates and remove all those lines, then restart Jenkins?
            Hide
            gaieges Evin Callahan added a comment -

            Yessir to all of the above - Pipeline 1.1.7 and Jenkins 2.66.

            Removing all the duplicate entries from a broken job's config.xml files actually does work, so thank you. I noticed that it's with specific jobs (ie one job may break while the other wont).

            However, after fixing that one job, and trying your script again, it fails in the same way. I presume this is because I have the same problem in other jobs / branches. I do have some of those duplicate entries in other config.xml files, so I'll just go in and delete the ones that have the duplicates manually for now.

            Show
            gaieges Evin Callahan added a comment - Yessir to all of the above - Pipeline 1.1.7 and Jenkins 2.66. Removing all the duplicate entries from a broken job's config.xml files actually does work, so thank you . I noticed that it's with specific jobs (ie one job may break while the other wont). However, after fixing that one job, and trying your script again, it fails in the same way. I presume this is because I have the same problem in other jobs / branches. I do have some of those duplicate entries in other config.xml files, so I'll just go in and delete the ones that have the duplicates manually for now.
            Hide
            abayer Andrew Bayer added a comment -

            Oy! As ridiculous as this sounds, you could probably disable security very briefly, run the script, and re-enable it, but that's probably stupid. =)

            Another also fairly stupid option could be something like this:

            cd $JENKINS_HOME/jobs
            find . -name config.xml -exec sed -i .bak '/<org\.jenkinsci\.plugins\.workflow\.multibranch\.BranchJobProperty reference=\"\.\.\/org\.jenkinsci\.plugins\.workflow\.multibranch\.BranchJobProperty\"\/>/d' {} \;
            # Restart Jenkins
            

            Wouldn't deal with any other massively duplicated property, but it would unblock you from running the script/running the jobs, which should suffice. Just a thought/possibility.

            Show
            abayer Andrew Bayer added a comment - Oy! As ridiculous as this sounds, you could probably disable security very briefly, run the script, and re-enable it, but that's probably stupid. =) Another also fairly stupid option could be something like this: cd $JENKINS_HOME/jobs find . -name config.xml -exec sed -i .bak '/<org\.jenkinsci\.plugins\.workflow\.multibranch\.BranchJobProperty reference=\ "\.\.\/org\.jenkinsci\.plugins\.workflow\.multibranch\.BranchJobProperty\" \/>/d' {} \; # Restart Jenkins Wouldn't deal with any other massively duplicated property, but it would unblock you from running the script/running the jobs, which should suffice. Just a thought/possibility.
            Hide
            gaieges Evin Callahan added a comment -

            I actually ended up doing something along the lines of your sed command after finding the biggest offenders via this:

            find ./jobs -name 'config.xml' -exec grep -H BranchJobProperty {} \; | uniq -c | sort -n
            

            And then manually removing the big offenders. Once I did that, I was able to run your script and things are working peachy now!

            Thanks again!

            Show
            gaieges Evin Callahan added a comment - I actually ended up doing something along the lines of your sed command after finding the biggest offenders via this: find ./jobs -name 'config.xml' -exec grep -H BranchJobProperty {} \; | uniq -c | sort -n And then manually removing the big offenders. Once I did that, I was able to run your script and things are working peachy now! Thanks again!
            Hide
            alwynpan Alwyn Pan added a comment -

            Andrew Bayer is that a way to stop / clean these jobs stucked in the history? Thank you.

             

            Show
            alwynpan Alwyn Pan added a comment - Andrew Bayer is that a way to stop / clean these jobs stucked in the history? Thank you.  
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-44850 [ JENKINS-44850 ]

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                stefanthurnherr Stefan Thurnherr
              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: