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

StackOverflowError in plugin manager on 1.596.1

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            olivergondza Oliver Gondža created issue -
            olivergondza Oliver Gondža made changes -
            Field Original Value New Value
            Project Security Issues [ 10180 ] Jenkins [ 10172 ]
            Key SECURITY-318 JENKINS-36239
            Workflow Security v1.2 [ 172932 ] JNJira [ 172933 ]
            Status Untriaged [ 10001 ] Open [ 1 ]
            Component/s core [ 15593 ]
            Component/s core [ 15738 ]
            olivergondza Oliver Gondža made changes -
            Description 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.
            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.
            olivergondza Oliver Gondža made changes -
            Description 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.
            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.
            Hide
            jglick Jesse Glick added a comment -

            Probably already fixed by the workflow-scm-step update, no?

            Show
            jglick Jesse Glick added a comment - Probably already fixed by the workflow-scm-step update, no?
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-35247 [ JENKINS-35247 ]
            Hide
            inb Ian Norton added a comment -

            I get this on 1.596.3 with the SVN plugin fully updated and no workflow plugins at all

            Show
            inb Ian Norton added a comment - I get this on 1.596.3 with the SVN plugin fully updated and no workflow plugins at all
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-36361 [ JENKINS-36361 ]
            Hide
            jglick Jesse Glick added a comment -

            JENKINS-36666 shows another core bug, though I think they are distinct.

            Show
            jglick Jesse Glick added a comment - JENKINS-36666 shows another core bug, though I think they are distinct.
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-36666 [ JENKINS-36666 ]
            Hide
            jglick Jesse Glick added a comment -

            I started 2.14-SNAPSHOT on a new home and ran that script, but did not get any error. Is there something else needed to reproduce this?

            The fix seems pretty obvious—isNeededDependenciesCompatibleWithInstalledVersion needs to delegate to an internal recursive version maintaining a Stack of encountered plugins, so as to cut the cycle short—but without a way to reproduce the problem I am reluctant to write it.

            Show
            jglick Jesse Glick added a comment - I started 2.14-SNAPSHOT on a new home and ran that script, but did not get any error. Is there something else needed to reproduce this? The fix seems pretty obvious— isNeededDependenciesCompatibleWithInstalledVersion needs to delegate to an internal recursive version maintaining a Stack of encountered plugins, so as to cut the cycle short—but without a way to reproduce the problem I am reluctant to write it.
            Hide
            olivergondza Oliver Gondža added a comment -

            > I started 2.14-SNAPSHOT on a new home and ran that script, but did not get any error. Is there something else needed to reproduce this?

            I did not managed to reproduce this on a fresh instance, unfortunately.

            > The fix seems pretty obvious—isNeededDependenciesCompatibleWithInstalledVersion needs to delegate to an internal recursive version maintaining a Stack of encountered plugins, so as to cut the cycle short—but without a way to reproduce the problem I am reluctant to write it.

            Agree.

            Show
            olivergondza Oliver Gondža added a comment - > I started 2.14-SNAPSHOT on a new home and ran that script, but did not get any error. Is there something else needed to reproduce this? I did not managed to reproduce this on a fresh instance, unfortunately. > The fix seems pretty obvious—isNeededDependenciesCompatibleWithInstalledVersion needs to delegate to an internal recursive version maintaining a Stack of encountered plugins, so as to cut the cycle short—but without a way to reproduce the problem I am reluctant to write it. Agree.
            Hide
            jglick Jesse Glick added a comment -

            I tried installing subversion (2.6) from the UC and then shutting down, running

            cp ~/.m2/repository/org/jenkins-ci/plugins/subversion/2.5.7/subversion-2.5.7.hpi war/work/plugins/subversion.jpi && rm -rfv war/work/plugins/workflow-*
            

            and restarting, and then running the script again. Still no luck.

            Show
            jglick Jesse Glick added a comment - I tried installing subversion (2.6) from the UC and then shutting down, running cp ~/.m2/repository/org/jenkins-ci/plugins/subversion/2.5.7/subversion-2.5.7.hpi war/work/plugins/subversion.jpi && rm -rfv war/work/plugins/workflow-* and restarting, and then running the script again. Still no luck.
            Hide
            rsbaker56 Robert Baker added a comment -

            Perhaps related - when the error first appeared I had inadvertently installed a plugin that was not compatible with my Jenkins version (i.e. the plugin required a slightly higher version of Jenkins). I have recently upgraded Jenkins to the required version and now the error seems to have gone away.

            Show
            rsbaker56 Robert Baker added a comment - Perhaps related - when the error first appeared I had inadvertently installed a plugin that was not compatible with my Jenkins version (i.e. the plugin required a slightly higher version of Jenkins). I have recently upgraded Jenkins to the required version and now the error seems to have gone away.
            Hide
            jglick Jesse Glick added a comment -

            Huh, reproducible simply by

            • start 1.596.3 on a fresh home
            • navigate to /pluginManager/

            Not sure why it does not happen using trunk. Perhaps because the update center served to Jenkins has different contents.

            Show
            jglick Jesse Glick added a comment - Huh, reproducible simply by start 1.596.3 on a fresh home navigate to /pluginManager/ Not sure why it does not happen using trunk. Perhaps because the update center served to Jenkins has different contents.
            Hide
            jglick Jesse Glick added a comment -

            Or more likely that subversion was bundled in 1.x.

            Show
            jglick Jesse Glick added a comment - Or more likely that subversion was bundled in 1.x.
            Hide
            jglick Jesse Glick added a comment -

            I suspect that the bug still exists in principle in Jenkins 2.x but users of 2.x are less likely to encounter it.

            Show
            jglick Jesse Glick added a comment - I suspect that the bug still exists in principle in Jenkins 2.x but users of 2.x are less likely to encounter it.
            Hide
            olivergondza Oliver Gondža added a comment -

            Yes, 1.596.3 seems broken out of the box. Have we missed that during testing or it was fine at the time as update center content used to be different?

            Also, 1.609 (weekly) does not seem to be affected.

            Show
            olivergondza Oliver Gondža added a comment - Yes, 1.596.3 seems broken out of the box. Have we missed that during testing or it was fine at the time as update center content used to be different? Also, 1.609 (weekly) does not seem to be affected.
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-36729 [ JENKINS-36729 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 172933 ] JNJira + In-Review [ 184835 ]
            ikedam ikedam made changes -
            Link This issue is related to JENKINS-36867 [ JENKINS-36867 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oliver Gondža
            Path:
            src/test/java/core/PluginManagerTest.java
            http://jenkins-ci.org/commit/acceptance-test-harness/4bcc32130e4ff252548ab331c0ad6765fa54f97e
            Log:
            Reproduce JENKINS-36239

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: src/test/java/core/PluginManagerTest.java http://jenkins-ci.org/commit/acceptance-test-harness/4bcc32130e4ff252548ab331c0ad6765fa54f97e Log: Reproduce JENKINS-36239
            Hide
            olivergondza Oliver Gondža added a comment -

            I have reproduced the problem in ATH[1] with newer versions including latest LTS and weekly - when run against 1.596 update center metadata. I have no idea what is wrong with the metadata but this needs fixing before it bit us on something more recent.

            [1] env JENKINS_JAVA_OPTS="-Dhudson.model.UpdateCenter.updateCenterUrl=http://updates.jenkins-ci.org/1.596/" ./run.sh firefox latest -Dtest=PluginManagerTest

            Show
            olivergondza Oliver Gondža added a comment - I have reproduced the problem in ATH [1] with newer versions including latest LTS and weekly - when run against 1.596 update center metadata. I have no idea what is wrong with the metadata but this needs fixing before it bit us on something more recent. [1] env JENKINS_JAVA_OPTS="-Dhudson.model.UpdateCenter.updateCenterUrl= http://updates.jenkins-ci.org/1.596/ " ./run.sh firefox latest -Dtest=PluginManagerTest
            olivergondza Oliver Gondža made changes -
            Description 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.
            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.
            olivergondza Oliver Gondža made changes -
            Description 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.
            h2. Workaround

            Update subversion plugin to 2.6 including dependencies 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.
            olivergondza Oliver Gondža made changes -
            Description h2. Workaround

            Update subversion plugin to 2.6 including dependencies 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.
            h2. Workaround

            Update subversion plugin to 2.5.7 including dependencies 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.
            olivergondza Oliver Gondža made changes -
            Description h2. Workaround

            Update subversion plugin to 2.5.7 including dependencies 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.
            h2. 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.

            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.
            Hide
            4wire Channy Tremblay added a comment -

            I get the same StackOverflowError in plugin manager on Jenkins ver. 1.583

            Should I open the dump in a separate ticket?

            Show
            4wire Channy Tremblay added a comment - I get the same StackOverflowError in plugin manager on Jenkins ver. 1.583 Should I open the dump in a separate ticket?
            Hide
            olivergondza Oliver Gondža added a comment -

            Channy Tremblay, no need to. It is known to be a bug in multiple Jenkins versions.

            Show
            olivergondza Oliver Gondža added a comment - Channy Tremblay , no need to. It is known to be a bug in multiple Jenkins versions.
            Hide
            4wire Channy Tremblay added a comment -

            Thanks Oliver. Can I use the same workaround as above? I don't want to break too many things and you specified it needed 1.596.*

            Show
            4wire Channy Tremblay added a comment - Thanks Oliver. Can I use the same workaround as above? I don't want to break too many things and you specified it needed 1.596.*
            Hide
            olivergondza Oliver Gondža added a comment -

            Channy Tremblay, Run the attached script in script console (and attach the output in pastebin if it is different what what is reported). It will tell you what plugins are involved in the cycle. Installing/upgrading one of them should prevent that problem from appearing - so better choose some with no dependencies so you can not cause much damage uploading plugin manually. Once plugin manager is fully operational install/update/uninstall what you need but keep at least one of the offended plugins installed.

            Show
            olivergondza Oliver Gondža added a comment - Channy Tremblay , Run the attached script in script console (and attach the output in pastebin if it is different what what is reported). It will tell you what plugins are involved in the cycle. Installing/upgrading one of them should prevent that problem from appearing - so better choose some with no dependencies so you can not cause much damage uploading plugin manually. Once plugin manager is fully operational install/update/uninstall what you need but keep at least one of the offended plugins installed.
            Hide
            vincent_m Vincent Morel added a comment -

            Got something really similar today while trying to update a 1.596 install directly to 2.17.
            Jenkins wouldn't start and crashed with almost the same StackOverflowError but on isNeededDependenciesForNewerJenkins:

            Aug 09, 2016 5:09:25 PM hudson.util.BootFailure publish
            SEVERE: Failed to initialize Jenkins
            hudson.util.HudsonFailedToLoad: java.lang.StackOverflowError
            	at hudson.WebAppMain$3.run(WebAppMain.java:241)
            Caused by: java.lang.StackOverflowError
            	at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
            	at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
            	at java.io.File.exists(File.java:819)
            	at hudson.util.TextFile.exists(TextFile.java:57)
            	at hudson.model.UpdateSite.getData(UpdateSite.java:289)
            	at hudson.model.UpdateSite.getPlugin(UpdateSite.java:349)
            	at hudson.model.UpdateCenter.getPlugin(UpdateCenter.java:611)
            	at hudson.model.UpdateSite$Plugin.getNeededDependencies(UpdateSite.java:733)
            	at hudson.model.UpdateSite$Plugin.isNeededDependenciesForNewerJenkins(UpdateSite.java:800)
            	at hudson.model.UpdateSite$Plugin.isNeededDependenciesForNewerJenkins(UpdateSite.java:801)
            	at hudson.model.UpdateSite$Plugin.isNeededDependenciesForNewerJenkins(UpdateSite.java:801)
            	at hudson.model.UpdateSite$Plugin.isNeededDependenciesForNewerJenkins(UpdateSite.java:801)
            

            I couldn't figure out while at work so I reverted to 1.596 for now.
            Looking back into it from home I just saw I also have this StackOverflowError in the middle of the plugin manager... which made me find this issue.

            Show
            vincent_m Vincent Morel added a comment - Got something really similar today while trying to update a 1.596 install directly to 2.17. Jenkins wouldn't start and crashed with almost the same StackOverflowError but on isNeededDependenciesForNewerJenkins: Aug 09, 2016 5:09:25 PM hudson.util.BootFailure publish SEVERE: Failed to initialize Jenkins hudson.util.HudsonFailedToLoad: java.lang.StackOverflowError at hudson.WebAppMain$3.run(WebAppMain.java:241) Caused by: java.lang.StackOverflowError at java.io.UnixFileSystem.getBooleanAttributes0(Native Method) at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242) at java.io.File.exists(File.java:819) at hudson.util.TextFile.exists(TextFile.java:57) at hudson.model.UpdateSite.getData(UpdateSite.java:289) at hudson.model.UpdateSite.getPlugin(UpdateSite.java:349) at hudson.model.UpdateCenter.getPlugin(UpdateCenter.java:611) at hudson.model.UpdateSite$Plugin.getNeededDependencies(UpdateSite.java:733) at hudson.model.UpdateSite$Plugin.isNeededDependenciesForNewerJenkins(UpdateSite.java:800) at hudson.model.UpdateSite$Plugin.isNeededDependenciesForNewerJenkins(UpdateSite.java:801) at hudson.model.UpdateSite$Plugin.isNeededDependenciesForNewerJenkins(UpdateSite.java:801) at hudson.model.UpdateSite$Plugin.isNeededDependenciesForNewerJenkins(UpdateSite.java:801) I couldn't figure out while at work so I reverted to 1.596 for now. Looking back into it from home I just saw I also have this StackOverflowError in the middle of the plugin manager... which made me find this issue.
            Hide
            4wire Channy Tremblay added a comment - - edited

            The workaround worked for me as well on 1.583

            Note : I encountered an issue with ssh on slave nodes. See JENKINS-25241 for help.

            Show
            4wire Channy Tremblay added a comment - - edited The workaround worked for me as well on 1.583 Note : I encountered an issue with ssh on slave nodes. See JENKINS-25241 for help.
            Hide
            leog Leo Geng added a comment -

            Hi Vincent Morel,

            We are getting the exact same error message while trying to update from 1.587 to 2.7.1.
            Did you find a fix for this issue?

            Show
            leog Leo Geng added a comment - Hi Vincent Morel, We are getting the exact same error message while trying to update from 1.587 to 2.7.1. Did you find a fix for this issue?
            olivergondza Oliver Gondža made changes -
            Assignee Lucie Votypkova [ lvotypkova ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is duplicated by JENKINS-42653 [ JENKINS-42653 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 2903 (Web Link)" [ 19981 ]
            danielbeck Daniel Beck made changes -
            Status In Review [ 10005 ] In Progress [ 3 ]
            danielbeck Daniel Beck made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            jglick Jesse Glick made changes -
            Labels stalled-pr
            lvotypkova Lucie Votypkova made changes -
            Assignee Lucie Votypkova [ lvotypkova ]

              People

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

                Dates

                • Created:
                  Updated: