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

StackOverflowError in plugin manager on 1.596.1

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core

      Workaround

      Update to subversion 2.5.7, scm-api 0.2 and mapdb-api 1.0.1.0 via plugin managers upload functionality on advanced tab. Make sure you are using 1.596.* first.

      Issue

      Crunching community update center metadata seems to cause stack overflow in hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion.

      Can be triggered by artifactdeployer. There is a dependency cycle between workflow-scm-step and subversion plugin, in case subversion is outdated and workflow-scm-step not installed:

      {
          "buildDate": "Jun 09, 2016",
          "dependencies":     [
                      {
                  "name": "git",
                  "optional": true,
                  "version": "2.3.5"
              },
                      {
                  "name": "perforce",
                  "optional": true,
                  "version": "1.3.7"
              },
                      {
                  "name": "workflow-step-api",
                  "optional": false,
                  "version": "2.0"
              },
                      {
                  "name": "p4",
                  "optional": true,
                  "version": "1.3.3"
              },
                      {
                  "name": "maven-plugin",
                  "optional": true,
                  "version": "1.521"
              },
                      {
                  "name": "workflow-cps",
                  "optional": false,
                  "version": "2.0"
              },
                      {
                  "name": "ivy",
                  "optional": true,
                  "version": "1.17"
              },
                      {
                  "name": "credentials",
                  "optional": true,
                  "version": "1.22"
              },
                      {
                  "name": "subversion",
                  "optional": true,
                  "version": "2.5"
              },
                      {
                  "name": "flexible-publish",
                  "optional": true,
                  "version": "0.12"
              },
                      {
                  "name": "jenkins-multijob-plugin",
                  "optional": true,
                  "version": "1.13"
              },
                      {
                  "name": "gradle",
                  "optional": false,
                  "version": "1.15"
              },
                      {
                  "name": "ant",
                  "optional": true,
                  "version": "1.2"
              },
                      {
                  "name": "jira",
                  "optional": true,
                  "version": "2.2"
              }
          ],
          "developers": [    {
              "developerId": "yossis",
              "email": "yossis@jfrog.org",
              "name": "Yossi Shaul"
          }],
          "excerpt": "This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.",
          "gav": "org.jenkins-ci.plugins:artifactory:2.5.0",
          "labels": ["pipeline"],
          "name": "artifactory",
          "previousTimestamp": "2016-01-12T10:55:22.00Z",
          "previousVersion": "2.4.7",
          "releaseTimestamp": "2016-06-09T18:19:22.00Z",
          "requiredCore": "1.521",
          "scm": "github.com",
          "sha1": "iF3EiEMmbxKaW5l4xcY7we2bJeA=",
          "title": "Jenkins Artifactory Plugin",
          "url": "http://updates.jenkins-ci.org/download/plugins/artifactory/2.5.0/artifactory.hpi",
          "version": "2.5.0",
          "wiki": "https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin"
      }
      

      Can be reporoduced by:

      def pluginname = 'artifactory'
      
      Jenkins.instance.updateCenter.sites.each {
        println "Site url ${it.url}"
        println it.getJSONObject().getJSONObject("plugins").get(pluginname).toString(4)
        
        subversion = it.getPlugin("subversion")
        wscps = it.getPlugin("workflow-scm-step")
        println "${subversion.name} ${subversion.installed?.version}"
        println "${wscps.name} ${wscps.installed?.version}"
        
        it = it.getPlugin(pluginname)
        println "\tplugin ${it.name}"
        println "\t${it.neededDependencies.collect { it.name }}"
        println "\t${isNeededDependenciesCompatibleWithInstalledVersion(it)}"
      }
      
      return null;
      
      boolean isNeededDependenciesCompatibleWithInstalledVersion(plugin) {
        println "inspect ${plugin.name}"
        println "    deps ${plugin.getNeededDependencies().collect { it.name }}"
                  for (p in plugin.getNeededDependencies()) {
                      if (!p.isCompatibleWithInstalledVersion() || !isNeededDependenciesCompatibleWithInstalledVersion(p))
                          return false;
                  }
                  return true;
              }
      

      While it work in 1.609.3, it seems like an accident to me as there is unnecesary recursion as well, though not infinite.

          [JENKINS-36239] StackOverflowError in plugin manager on 1.596.1

          Oliver Gondža created issue -
          Oliver Gondža made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: core [ 15738 ]
          Key Original: SECURITY-318 New: JENKINS-36239
          Workflow Original: Security v1.2 [ 172932 ] New: JNJira [ 172933 ]
          Project Original: Security Issues [ 10180 ] New: Jenkins [ 10172 ]
          Status Original: Untriaged [ 10001 ] New: Open [ 1 ]
          Oliver Gondža made changes -
          Description Original: Crunching community update center metadata seems to cause stack overflow in {{hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion}}. There is a dependency cycle between workflow-scm-step and subversion plugin.

          Can be triggered by artifactdeployer:
          {noformat}
          {
              "buildDate": "Jun 09, 2016",
              "dependencies": [
                          {
                      "name": "git",
                      "optional": true,
                      "version": "2.3.5"
                  },
                          {
                      "name": "perforce",
                      "optional": true,
                      "version": "1.3.7"
                  },
                          {
                      "name": "workflow-step-api",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "p4",
                      "optional": true,
                      "version": "1.3.3"
                  },
                          {
                      "name": "maven-plugin",
                      "optional": true,
                      "version": "1.521"
                  },
                          {
                      "name": "workflow-cps",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "ivy",
                      "optional": true,
                      "version": "1.17"
                  },
                          {
                      "name": "credentials",
                      "optional": true,
                      "version": "1.22"
                  },
                          {
                      "name": "subversion",
                      "optional": true,
                      "version": "2.5"
                  },
                          {
                      "name": "flexible-publish",
                      "optional": true,
                      "version": "0.12"
                  },
                          {
                      "name": "jenkins-multijob-plugin",
                      "optional": true,
                      "version": "1.13"
                  },
                          {
                      "name": "gradle",
                      "optional": false,
                      "version": "1.15"
                  },
                          {
                      "name": "ant",
                      "optional": true,
                      "version": "1.2"
                  },
                          {
                      "name": "jira",
                      "optional": true,
                      "version": "2.2"
                  }
              ],
              "developers": [ {
                  "developerId": "yossis",
                  "email": "yossis@jfrog.org",
                  "name": "Yossi Shaul"
              }],
              "excerpt": "This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.",
              "gav": "org.jenkins-ci.plugins:artifactory:2.5.0",
              "labels": ["pipeline"],
              "name": "artifactory",
              "previousTimestamp": "2016-01-12T10:55:22.00Z",
              "previousVersion": "2.4.7",
              "releaseTimestamp": "2016-06-09T18:19:22.00Z",
              "requiredCore": "1.521",
              "scm": "github.com",
              "sha1": "iF3EiEMmbxKaW5l4xcY7we2bJeA=",
              "title": "Jenkins Artifactory Plugin",
              "url": "http://updates.jenkins-ci.org/download/plugins/artifactory/2.5.0/artifactory.hpi",
              "version": "2.5.0",
              "wiki": "https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin"
          }
          {noformat}

          Can be reporoduced by:
          {noformat}
          Jenkins.instance.updateCenter.sites.each {
            println "Site url ${it.url}"
            println it.getJSONObject().getJSONObject("plugins").get('artifactory').toString(4)
            it = it.getPlugin('artifactory')
            println "\tplugin ${it.name}"
            println "\t${it.neededDependencies.collect { it.name }}"
            println "\t${isNeededDependenciesCompatibleWithInstalledVersion(it)}"
          }

          return null;

          boolean isNeededDependenciesCompatibleWithInstalledVersion(plugin) {
            println "inspect ${plugin.name}"
                      for (p in plugin.getNeededDependencies()) {
                          println "dep ${p.name}"
                          if (!p.isCompatibleWithInstalledVersion() || !isNeededDependenciesCompatibleWithInstalledVersion(p))
                              return false;
                      }
                      return true;
                  }
          {noformat}

          While it work in 1.609.3, it seems like an accident to me and there is unnecesary recursion, though not infinite.
          New: Crunching community update center metadata seems to cause stack overflow in {{hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion}}. There is a dependency cycle between workflow-scm-step and subversion plugin.

          Can be triggered by artifactdeployer:
          {noformat}
          {
              "buildDate": "Jun 09, 2016",
              "dependencies": [
                          {
                      "name": "git",
                      "optional": true,
                      "version": "2.3.5"
                  },
                          {
                      "name": "perforce",
                      "optional": true,
                      "version": "1.3.7"
                  },
                          {
                      "name": "workflow-step-api",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "p4",
                      "optional": true,
                      "version": "1.3.3"
                  },
                          {
                      "name": "maven-plugin",
                      "optional": true,
                      "version": "1.521"
                  },
                          {
                      "name": "workflow-cps",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "ivy",
                      "optional": true,
                      "version": "1.17"
                  },
                          {
                      "name": "credentials",
                      "optional": true,
                      "version": "1.22"
                  },
                          {
                      "name": "subversion",
                      "optional": true,
                      "version": "2.5"
                  },
                          {
                      "name": "flexible-publish",
                      "optional": true,
                      "version": "0.12"
                  },
                          {
                      "name": "jenkins-multijob-plugin",
                      "optional": true,
                      "version": "1.13"
                  },
                          {
                      "name": "gradle",
                      "optional": false,
                      "version": "1.15"
                  },
                          {
                      "name": "ant",
                      "optional": true,
                      "version": "1.2"
                  },
                          {
                      "name": "jira",
                      "optional": true,
                      "version": "2.2"
                  }
              ],
              "developers": [ {
                  "developerId": "yossis",
                  "email": "yossis@jfrog.org",
                  "name": "Yossi Shaul"
              }],
              "excerpt": "This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.",
              "gav": "org.jenkins-ci.plugins:artifactory:2.5.0",
              "labels": ["pipeline"],
              "name": "artifactory",
              "previousTimestamp": "2016-01-12T10:55:22.00Z",
              "previousVersion": "2.4.7",
              "releaseTimestamp": "2016-06-09T18:19:22.00Z",
              "requiredCore": "1.521",
              "scm": "github.com",
              "sha1": "iF3EiEMmbxKaW5l4xcY7we2bJeA=",
              "title": "Jenkins Artifactory Plugin",
              "url": "http://updates.jenkins-ci.org/download/plugins/artifactory/2.5.0/artifactory.hpi",
              "version": "2.5.0",
              "wiki": "https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin"
          }
          {noformat}

          Can be reporoduced by:
          {noformat}
          Jenkins.instance.updateCenter.sites.each {
            println "Site url ${it.url}"
            println it.getJSONObject().getJSONObject("plugins").get('artifactory').toString(4)
            it = it.getPlugin('artifactory')
            println "\tplugin ${it.name}"
            println "\t${it.neededDependencies.collect { it.name }}"
            println "\t${isNeededDependenciesCompatibleWithInstalledVersion(it)}"
          }

          return null;

          boolean isNeededDependenciesCompatibleWithInstalledVersion(plugin) {
            println "inspect ${plugin.name}"
                      for (p in plugin.getNeededDependencies()) {
                          println "dep ${p.name}"
                          if (!p.isCompatibleWithInstalledVersion() || !isNeededDependenciesCompatibleWithInstalledVersion(p))
                              return false;
                      }
                      return true;
                  }
          {noformat}

          While it work in 1.609.3, it seems like an accident to me as there is unnecesary recursion as well, though not infinite.
          Oliver Gondža made changes -
          Description Original: Crunching community update center metadata seems to cause stack overflow in {{hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion}}. There is a dependency cycle between workflow-scm-step and subversion plugin.

          Can be triggered by artifactdeployer:
          {noformat}
          {
              "buildDate": "Jun 09, 2016",
              "dependencies": [
                          {
                      "name": "git",
                      "optional": true,
                      "version": "2.3.5"
                  },
                          {
                      "name": "perforce",
                      "optional": true,
                      "version": "1.3.7"
                  },
                          {
                      "name": "workflow-step-api",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "p4",
                      "optional": true,
                      "version": "1.3.3"
                  },
                          {
                      "name": "maven-plugin",
                      "optional": true,
                      "version": "1.521"
                  },
                          {
                      "name": "workflow-cps",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "ivy",
                      "optional": true,
                      "version": "1.17"
                  },
                          {
                      "name": "credentials",
                      "optional": true,
                      "version": "1.22"
                  },
                          {
                      "name": "subversion",
                      "optional": true,
                      "version": "2.5"
                  },
                          {
                      "name": "flexible-publish",
                      "optional": true,
                      "version": "0.12"
                  },
                          {
                      "name": "jenkins-multijob-plugin",
                      "optional": true,
                      "version": "1.13"
                  },
                          {
                      "name": "gradle",
                      "optional": false,
                      "version": "1.15"
                  },
                          {
                      "name": "ant",
                      "optional": true,
                      "version": "1.2"
                  },
                          {
                      "name": "jira",
                      "optional": true,
                      "version": "2.2"
                  }
              ],
              "developers": [ {
                  "developerId": "yossis",
                  "email": "yossis@jfrog.org",
                  "name": "Yossi Shaul"
              }],
              "excerpt": "This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.",
              "gav": "org.jenkins-ci.plugins:artifactory:2.5.0",
              "labels": ["pipeline"],
              "name": "artifactory",
              "previousTimestamp": "2016-01-12T10:55:22.00Z",
              "previousVersion": "2.4.7",
              "releaseTimestamp": "2016-06-09T18:19:22.00Z",
              "requiredCore": "1.521",
              "scm": "github.com",
              "sha1": "iF3EiEMmbxKaW5l4xcY7we2bJeA=",
              "title": "Jenkins Artifactory Plugin",
              "url": "http://updates.jenkins-ci.org/download/plugins/artifactory/2.5.0/artifactory.hpi",
              "version": "2.5.0",
              "wiki": "https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin"
          }
          {noformat}

          Can be reporoduced by:
          {noformat}
          Jenkins.instance.updateCenter.sites.each {
            println "Site url ${it.url}"
            println it.getJSONObject().getJSONObject("plugins").get('artifactory').toString(4)
            it = it.getPlugin('artifactory')
            println "\tplugin ${it.name}"
            println "\t${it.neededDependencies.collect { it.name }}"
            println "\t${isNeededDependenciesCompatibleWithInstalledVersion(it)}"
          }

          return null;

          boolean isNeededDependenciesCompatibleWithInstalledVersion(plugin) {
            println "inspect ${plugin.name}"
                      for (p in plugin.getNeededDependencies()) {
                          println "dep ${p.name}"
                          if (!p.isCompatibleWithInstalledVersion() || !isNeededDependenciesCompatibleWithInstalledVersion(p))
                              return false;
                      }
                      return true;
                  }
          {noformat}

          While it work in 1.609.3, it seems like an accident to me as there is unnecesary recursion as well, though not infinite.
          New: Crunching community update center metadata seems to cause stack overflow in {{hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion}}.

          Can be triggered by artifactdeployer. There is a dependency cycle between workflow-scm-step and subversion plugin, in case subversion is outdated and workflow-scm-step not installed:
          {noformat}
          {
              "buildDate": "Jun 09, 2016",
              "dependencies": [
                          {
                      "name": "git",
                      "optional": true,
                      "version": "2.3.5"
                  },
                          {
                      "name": "perforce",
                      "optional": true,
                      "version": "1.3.7"
                  },
                          {
                      "name": "workflow-step-api",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "p4",
                      "optional": true,
                      "version": "1.3.3"
                  },
                          {
                      "name": "maven-plugin",
                      "optional": true,
                      "version": "1.521"
                  },
                          {
                      "name": "workflow-cps",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "ivy",
                      "optional": true,
                      "version": "1.17"
                  },
                          {
                      "name": "credentials",
                      "optional": true,
                      "version": "1.22"
                  },
                          {
                      "name": "subversion",
                      "optional": true,
                      "version": "2.5"
                  },
                          {
                      "name": "flexible-publish",
                      "optional": true,
                      "version": "0.12"
                  },
                          {
                      "name": "jenkins-multijob-plugin",
                      "optional": true,
                      "version": "1.13"
                  },
                          {
                      "name": "gradle",
                      "optional": false,
                      "version": "1.15"
                  },
                          {
                      "name": "ant",
                      "optional": true,
                      "version": "1.2"
                  },
                          {
                      "name": "jira",
                      "optional": true,
                      "version": "2.2"
                  }
              ],
              "developers": [ {
                  "developerId": "yossis",
                  "email": "yossis@jfrog.org",
                  "name": "Yossi Shaul"
              }],
              "excerpt": "This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.",
              "gav": "org.jenkins-ci.plugins:artifactory:2.5.0",
              "labels": ["pipeline"],
              "name": "artifactory",
              "previousTimestamp": "2016-01-12T10:55:22.00Z",
              "previousVersion": "2.4.7",
              "releaseTimestamp": "2016-06-09T18:19:22.00Z",
              "requiredCore": "1.521",
              "scm": "github.com",
              "sha1": "iF3EiEMmbxKaW5l4xcY7we2bJeA=",
              "title": "Jenkins Artifactory Plugin",
              "url": "http://updates.jenkins-ci.org/download/plugins/artifactory/2.5.0/artifactory.hpi",
              "version": "2.5.0",
              "wiki": "https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin"
          }
          {noformat}

          Can be reporoduced by:
          {noformat}
          def pluginname = 'artifactory'

          Jenkins.instance.updateCenter.sites.each {
            println "Site url ${it.url}"
            println it.getJSONObject().getJSONObject("plugins").get(pluginname).toString(4)
            
            subversion = it.getPlugin("subversion")
            wscps = it.getPlugin("workflow-scm-step")
            println "${subversion.name} ${subversion.installed?.version}"
            println "${wscps.name} ${wscps.installed?.version}"
            
            it = it.getPlugin(pluginname)
            println "\tplugin ${it.name}"
            println "\t${it.neededDependencies.collect { it.name }}"
            println "\t${isNeededDependenciesCompatibleWithInstalledVersion(it)}"
          }

          return null;

          boolean isNeededDependenciesCompatibleWithInstalledVersion(plugin) {
            println "inspect ${plugin.name}"
            println " deps ${plugin.getNeededDependencies().collect { it.name }}"
                      for (p in plugin.getNeededDependencies()) {
                          if (!p.isCompatibleWithInstalledVersion() || !isNeededDependenciesCompatibleWithInstalledVersion(p))
                              return false;
                      }
                      return true;
                  }
          {noformat}

          While it work in 1.609.3, it seems like an accident to me as there is unnecesary recursion as well, though not infinite.
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-35247 [ JENKINS-35247 ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-36361 [ JENKINS-36361 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-36666 [ JENKINS-36666 ]
          Daniel Beck made changes -
          Link New: This issue is related to JENKINS-36729 [ JENKINS-36729 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 172933 ] New: JNJira + In-Review [ 184835 ]
          ikedam made changes -
          Link New: This issue is related to JENKINS-36867 [ JENKINS-36867 ]
          Oliver Gondža made changes -
          Description Original: Crunching community update center metadata seems to cause stack overflow in {{hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion}}.

          Can be triggered by artifactdeployer. There is a dependency cycle between workflow-scm-step and subversion plugin, in case subversion is outdated and workflow-scm-step not installed:
          {noformat}
          {
              "buildDate": "Jun 09, 2016",
              "dependencies": [
                          {
                      "name": "git",
                      "optional": true,
                      "version": "2.3.5"
                  },
                          {
                      "name": "perforce",
                      "optional": true,
                      "version": "1.3.7"
                  },
                          {
                      "name": "workflow-step-api",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "p4",
                      "optional": true,
                      "version": "1.3.3"
                  },
                          {
                      "name": "maven-plugin",
                      "optional": true,
                      "version": "1.521"
                  },
                          {
                      "name": "workflow-cps",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "ivy",
                      "optional": true,
                      "version": "1.17"
                  },
                          {
                      "name": "credentials",
                      "optional": true,
                      "version": "1.22"
                  },
                          {
                      "name": "subversion",
                      "optional": true,
                      "version": "2.5"
                  },
                          {
                      "name": "flexible-publish",
                      "optional": true,
                      "version": "0.12"
                  },
                          {
                      "name": "jenkins-multijob-plugin",
                      "optional": true,
                      "version": "1.13"
                  },
                          {
                      "name": "gradle",
                      "optional": false,
                      "version": "1.15"
                  },
                          {
                      "name": "ant",
                      "optional": true,
                      "version": "1.2"
                  },
                          {
                      "name": "jira",
                      "optional": true,
                      "version": "2.2"
                  }
              ],
              "developers": [ {
                  "developerId": "yossis",
                  "email": "yossis@jfrog.org",
                  "name": "Yossi Shaul"
              }],
              "excerpt": "This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.",
              "gav": "org.jenkins-ci.plugins:artifactory:2.5.0",
              "labels": ["pipeline"],
              "name": "artifactory",
              "previousTimestamp": "2016-01-12T10:55:22.00Z",
              "previousVersion": "2.4.7",
              "releaseTimestamp": "2016-06-09T18:19:22.00Z",
              "requiredCore": "1.521",
              "scm": "github.com",
              "sha1": "iF3EiEMmbxKaW5l4xcY7we2bJeA=",
              "title": "Jenkins Artifactory Plugin",
              "url": "http://updates.jenkins-ci.org/download/plugins/artifactory/2.5.0/artifactory.hpi",
              "version": "2.5.0",
              "wiki": "https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin"
          }
          {noformat}

          Can be reporoduced by:
          {noformat}
          def pluginname = 'artifactory'

          Jenkins.instance.updateCenter.sites.each {
            println "Site url ${it.url}"
            println it.getJSONObject().getJSONObject("plugins").get(pluginname).toString(4)
            
            subversion = it.getPlugin("subversion")
            wscps = it.getPlugin("workflow-scm-step")
            println "${subversion.name} ${subversion.installed?.version}"
            println "${wscps.name} ${wscps.installed?.version}"
            
            it = it.getPlugin(pluginname)
            println "\tplugin ${it.name}"
            println "\t${it.neededDependencies.collect { it.name }}"
            println "\t${isNeededDependenciesCompatibleWithInstalledVersion(it)}"
          }

          return null;

          boolean isNeededDependenciesCompatibleWithInstalledVersion(plugin) {
            println "inspect ${plugin.name}"
            println " deps ${plugin.getNeededDependencies().collect { it.name }}"
                      for (p in plugin.getNeededDependencies()) {
                          if (!p.isCompatibleWithInstalledVersion() || !isNeededDependenciesCompatibleWithInstalledVersion(p))
                              return false;
                      }
                      return true;
                  }
          {noformat}

          While it work in 1.609.3, it seems like an accident to me as there is unnecesary recursion as well, though not infinite.
          New: h2. Workaround

          Update subversion plugin to 2.6 via plugin managers upload functionality on advanced tab. Make sure you are using 1.596.* first.

          h2. Issue

          Crunching community update center metadata seems to cause stack overflow in {{hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion}}.

          Can be triggered by artifactdeployer. There is a dependency cycle between workflow-scm-step and subversion plugin, in case subversion is outdated and workflow-scm-step not installed:
          {noformat}
          {
              "buildDate": "Jun 09, 2016",
              "dependencies": [
                          {
                      "name": "git",
                      "optional": true,
                      "version": "2.3.5"
                  },
                          {
                      "name": "perforce",
                      "optional": true,
                      "version": "1.3.7"
                  },
                          {
                      "name": "workflow-step-api",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "p4",
                      "optional": true,
                      "version": "1.3.3"
                  },
                          {
                      "name": "maven-plugin",
                      "optional": true,
                      "version": "1.521"
                  },
                          {
                      "name": "workflow-cps",
                      "optional": false,
                      "version": "2.0"
                  },
                          {
                      "name": "ivy",
                      "optional": true,
                      "version": "1.17"
                  },
                          {
                      "name": "credentials",
                      "optional": true,
                      "version": "1.22"
                  },
                          {
                      "name": "subversion",
                      "optional": true,
                      "version": "2.5"
                  },
                          {
                      "name": "flexible-publish",
                      "optional": true,
                      "version": "0.12"
                  },
                          {
                      "name": "jenkins-multijob-plugin",
                      "optional": true,
                      "version": "1.13"
                  },
                          {
                      "name": "gradle",
                      "optional": false,
                      "version": "1.15"
                  },
                          {
                      "name": "ant",
                      "optional": true,
                      "version": "1.2"
                  },
                          {
                      "name": "jira",
                      "optional": true,
                      "version": "2.2"
                  }
              ],
              "developers": [ {
                  "developerId": "yossis",
                  "email": "yossis@jfrog.org",
                  "name": "Yossi Shaul"
              }],
              "excerpt": "This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.",
              "gav": "org.jenkins-ci.plugins:artifactory:2.5.0",
              "labels": ["pipeline"],
              "name": "artifactory",
              "previousTimestamp": "2016-01-12T10:55:22.00Z",
              "previousVersion": "2.4.7",
              "releaseTimestamp": "2016-06-09T18:19:22.00Z",
              "requiredCore": "1.521",
              "scm": "github.com",
              "sha1": "iF3EiEMmbxKaW5l4xcY7we2bJeA=",
              "title": "Jenkins Artifactory Plugin",
              "url": "http://updates.jenkins-ci.org/download/plugins/artifactory/2.5.0/artifactory.hpi",
              "version": "2.5.0",
              "wiki": "https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin"
          }
          {noformat}

          Can be reporoduced by:
          {noformat}
          def pluginname = 'artifactory'

          Jenkins.instance.updateCenter.sites.each {
            println "Site url ${it.url}"
            println it.getJSONObject().getJSONObject("plugins").get(pluginname).toString(4)
            
            subversion = it.getPlugin("subversion")
            wscps = it.getPlugin("workflow-scm-step")
            println "${subversion.name} ${subversion.installed?.version}"
            println "${wscps.name} ${wscps.installed?.version}"
            
            it = it.getPlugin(pluginname)
            println "\tplugin ${it.name}"
            println "\t${it.neededDependencies.collect { it.name }}"
            println "\t${isNeededDependenciesCompatibleWithInstalledVersion(it)}"
          }

          return null;

          boolean isNeededDependenciesCompatibleWithInstalledVersion(plugin) {
            println "inspect ${plugin.name}"
            println " deps ${plugin.getNeededDependencies().collect { it.name }}"
                      for (p in plugin.getNeededDependencies()) {
                          if (!p.isCompatibleWithInstalledVersion() || !isNeededDependenciesCompatibleWithInstalledVersion(p))
                              return false;
                      }
                      return true;
                  }
          {noformat}

          While it work in 1.609.3, it seems like an accident to me as there is unnecesary recursion as well, though not infinite.

            Unassigned Unassigned
            olivergondza Oliver Gondža
            Votes:
            6 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: