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

Stack overflow error attempting to install a plugin to Jenkins 2.249.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: tics-plugin
    • Labels:
      None
    • Environment:
      jenkins/jenkins:2.249.1 docker image
    • Similar Issues:

      Description

      When I try to install a plugin from a new installation of the Jenkins 2.249.1 docker image, the docker console log reports a stack overflow error and never displays the "Install" button.

      Steps I took:

      1. Run Jenkins 2.249.1 in Docker docker run --rm -i -t -p 8080:8080 jenkins/jenkins:2.249.1
      2. Create no user
      3. Install no plugins
      4. Search for 'platformlabeler' from the "Available" tab of "Manage Jenkins" >> "Manage Plugins"
      5. Click the checkbox on the 'platformlabeler' row
      6. Confirm that the console output shows the stack overflow error and no "Install" button is displayed
      2020-10-06 20:18:26.474+0000 [id=73]    WARNING h.i.i.InstallUncaughtExceptionHandler#handleException
      org.apache.commons.jelly.JellyTagException: jar:file:/var/jenkins_home/war/WEB-INF/lib/jenkins-core-2.249.1.jar!/lib/layout/isAdmin.jelly:28:21: <d:invokeBody> java.lang.StackOverflowError
              at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745)
              at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:289)
              at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
              at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
              at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
              at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:100)
              at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
              at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      ... lots of stack trace deleted
      Caused: javax.servlet.ServletException
              at org.kohsuke.stapler.Facet$1.dispatch(Facet.java:249)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
              at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:170)
              at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
      

      Issue was not visible in update center data retrieved 18 hours ago by Jenkins 2.249.1. Became visible in my Jenkins 2.249.1 installation after I pressed "Check now" in the plugin manager.

        Attachments

          Issue Links

            Activity

            markewaite Mark Waite created issue -
            markewaite Mark Waite made changes -
            Field Original Value New Value
            Description When I try to install a plugin from a new installation of the Jenkins 2.249.1 docker image, the docker console log reports a stack overflow error and never displays the "Install" button.

            Steps I took:

            # Run Jenkins 2.249.1 in Docker docker run --rm -i -t -p 8080:8080 jenkins/jenkins:2.249.1
            # Create no user
            # Install no plugins
            # Search for 'platformlabeler' from the "Available" tab of "Manage Jenkins" >> "Manage Plugins"
            # Click the checkbox on the 'platformlabeler' row
            # Confirm that the console output shows the stack overflow error and no "Install" button is displayed

            {noformat}
            2020-10-06 20:18:26.474+0000 [id=73] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException
            org.apache.commons.jelly.JellyTagException: jar:file:/var/jenkins_home/war/WEB-INF/lib/jenkins-core-2.249.1.jar!/lib/layout/isAdmin.jelly:28:21: <d:invokeBody> java.lang.StackOverflowError
                    at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:289)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
                    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:100)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
            ... lots of stack trace deleted
            Caused: javax.servlet.ServletException
                    at org.kohsuke.stapler.Facet$1.dispatch(Facet.java:249)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
                    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:170)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
            {noformat}
            When I try to install a plugin from a new installation of the Jenkins 2.249.1 docker image, the docker console log reports a stack overflow error and never displays the "Install" button.

            Steps I took:

            # Run Jenkins 2.249.1 in Docker docker run --rm -i -t -p 8080:8080 jenkins/jenkins:2.249.1
            # Create no user
            # Install no plugins
            # Search for 'platformlabeler' from the "Available" tab of "Manage Jenkins" >> "Manage Plugins"
            # Click the checkbox on the 'platformlabeler' row
            # Confirm that the console output shows the stack overflow error and no "Install" button is displayed

            {noformat}
            2020-10-06 20:18:26.474+0000 [id=73] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException
            org.apache.commons.jelly.JellyTagException: jar:file:/var/jenkins_home/war/WEB-INF/lib/jenkins-core-2.249.1.jar!/lib/layout/isAdmin.jelly:28:21: <d:invokeBody> java.lang.StackOverflowError
                    at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745)
                    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:289)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
                    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
                    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:100)
                    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
                    at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
            ... lots of stack trace deleted
            Caused: javax.servlet.ServletException
                    at org.kohsuke.stapler.Facet$1.dispatch(Facet.java:249)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
                    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
                    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:170)
                    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
                    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
            {noformat}

            Issue was not visible in update center data retrieved 18 hours ago by Jenkins 2.249.1. Became visible in my Jenkins 2.249.1 installation after I pressed "Check now" in the plugin manager.
            Hide
            jglick Jesse Glick added a comment -

            What is the repeating block of the StackOverflowError? I think you truncated too much for that to be obvious.

            Show
            jglick Jesse Glick added a comment - What is the repeating block of the StackOverflowError ? I think you truncated too much for that to be obvious.
            Hide
            timja Tim Jacomb added a comment -

            I was able to just fetch it with 2.255

            Show
            timja Tim Jacomb added a comment - I was able to just fetch it with 2.255
            griefwar Mariano Benes made changes -
            Link This issue is related to JENKINS-63869 [ JENKINS-63869 ]
            griefwar Mariano Benes made changes -
            Link This issue is related to JENKINS-63869 [ JENKINS-63869 ]
            griefwar Mariano Benes made changes -
            Link This issue is related to JENKINS-63873 [ JENKINS-63873 ]
            griefwar Mariano Benes made changes -
            Link This issue is related to JENKINS-63869 [ JENKINS-63869 ]
            Hide
            danielbeck Daniel Beck added a comment -

            The interesting part was truncated:

            2020-10-06T21:02:15.174326003Z 	at hudson.PluginManager$MetadataCache.of(PluginManager.java:1986)
            2020-10-06T21:02:15.174331803Z 	at hudson.model.UpdateSite$Plugin.getDependenciesIncompatibleWithInstalledVersion(UpdateSite.java:1458)
            2020-10-06T21:02:15.174338603Z 	at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1421)
            2020-10-06T21:02:15.174344803Z 	at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1416)
            2020-10-06T21:02:15.174350503Z 	at hudson.model.UpdateSite$Plugin.lambda$getDependenciesIncompatibleWithInstalledVersion$1(UpdateSite.java:1461)
            2020-10-06T21:02:15.174356403Z 	at hudson.PluginManager$MetadataCache.lambda$of$0(PluginManager.java:1986)
            2020-10-06T21:02:15.174362004Z 	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133) 

            Given this, we might have a circular dependency between plugins?

            Show
            danielbeck Daniel Beck added a comment - The interesting part was truncated: 2020-10-06T21:02:15.174326003Z at hudson.PluginManager$MetadataCache.of(PluginManager.java:1986) 2020-10-06T21:02:15.174331803Z at hudson.model.UpdateSite$Plugin.getDependenciesIncompatibleWithInstalledVersion(UpdateSite.java:1458) 2020-10-06T21:02:15.174338603Z at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1421) 2020-10-06T21:02:15.174344803Z at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1416) 2020-10-06T21:02:15.174350503Z at hudson.model.UpdateSite$Plugin.lambda$getDependenciesIncompatibleWithInstalledVersion$1(UpdateSite.java:1461) 2020-10-06T21:02:15.174356403Z at hudson.PluginManager$MetadataCache.lambda$of$0(PluginManager.java:1986) 2020-10-06T21:02:15.174362004Z at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133) Given this, we might have a circular dependency between plugins?
            Hide
            timja Tim Jacomb added a comment - - edited
            Show
            timja Tim Jacomb added a comment - - edited reproduced on 2.204.6 https://gist.github.com/timja/627f0124fd7dd3df2c58001cebefbb7e
            Hide
            markewaite Mark Waite added a comment -

            The stack overflow message overruns the Jira limit for content.

            See https://home.markwaite.net/~mwaite/stackoverflow.txt for the complete stack session log of a Docker session using Jenkins 2.249.1

            Show
            markewaite Mark Waite added a comment - The stack overflow message overruns the Jira limit for content. See https://home.markwaite.net/~mwaite/stackoverflow.txt for the complete stack session log of a Docker session using Jenkins 2.249.1
            Hide
            timja Tim Jacomb added a comment - - edited

            recent releases:

            mirrorbrain@ip-172-31-33-96:~$ cat /tmp/update-center2-rerecent-releases.json
            {"releases":[{"name":"42crunch-security-audit","version":"3.8"},{"name":"configuration-as-code","version":"1.36.1-beta"}]}
            
            Show
            timja Tim Jacomb added a comment - - edited recent releases: mirrorbrain@ip-172-31-33-96:~$ cat /tmp/update-center2-rerecent-releases.json { "releases" :[{ "name" : "42crunch-security-audit" , "version" : "3.8" },{ "name" : "configuration-as-code" , "version" : "1.36.1-beta" }]}
            timja Tim Jacomb made changes -
            Attachment screenshot-1.png [ 52794 ]
            Hide
            timja Tim Jacomb added a comment -

            These are the last plugins before it starts erroring:

            Show
            timja Tim Jacomb added a comment - These are the last plugins before it starts erroring:
            danielbeck Daniel Beck made changes -
            Assignee Daniel Beck [ danielbeck ]
            danielbeck Daniel Beck made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            danielbeck Daniel Beck made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Component/s tics-plugin [ 28121 ]
            Component/s core [ 15593 ]
            Hide
            danielbeck Daniel Beck added a comment -

            https://github.com/jenkins-infra/update-center2/pull/458

            https://plugins.jenkins.io/tics/#dependencies

            I mean, the dependency onto itself is weird enough, but how do you add TWO?

            Show
            danielbeck Daniel Beck added a comment - https://github.com/jenkins-infra/update-center2/pull/458 https://plugins.jenkins.io/tics/#dependencies I mean, the dependency onto itself is weird enough, but how do you add TWO?
            Hide
            danielbeck Daniel Beck added a comment -

            There's probably a robustness improvement here, both in core and in update-center2, and of course the bug in tics plugin, but I'm using this issue for the current blocker.

            Show
            danielbeck Daniel Beck added a comment - There's probably a robustness improvement here, both in core and in update-center2, and of course the bug in tics plugin, but I'm using this issue for the current blocker.
            Hide
            danielbeck Daniel Beck added a comment -

            Should be resolved in ~5 minutes once we've regenerated the update site metadata.

            Show
            danielbeck Daniel Beck added a comment - Should be resolved in ~5 minutes once we've regenerated the update site metadata.
            jglick Jesse Glick made changes -
            Link This issue relates to HOSTING-1021 [ HOSTING-1021 ]
            Hide
            danielbeck Daniel Beck added a comment -

            …and we're back!

            Might need a click on "Check Now" to get rid of the cached local data. Afterwards, no more stack overflows.

            Show
            danielbeck Daniel Beck added a comment - …and we're back! Might need a click on "Check Now" to get rid of the cached local data. Afterwards, no more stack overflows.
            danielbeck Daniel Beck made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            Hide
            markewaite Mark Waite added a comment -

            Confirmed that it works for me. Thanks for the fast response Daniel Beck!

            Show
            markewaite Mark Waite added a comment - Confirmed that it works for me. Thanks for the fast response Daniel Beck !
            danielbeck Daniel Beck made changes -
            Link This issue is related to INFRA-2755 [ INFRA-2755 ]
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-63883 [ JENKINS-63883 ]
            Hide
            danielbeck Daniel Beck added a comment -

            I filed INFRA-2755 to prevent publication of such plugins in the first place on the infra side, and JENKINS-63883 as a robustness improvement in Jenkins.

            Show
            danielbeck Daniel Beck added a comment - I filed INFRA-2755 to prevent publication of such plugins in the first place on the infra side, and JENKINS-63883 as a robustness improvement in Jenkins.
            georgekappel George Kappel made changes -
            Link This issue is duplicated by JENKINS-63876 [ JENKINS-63876 ]
            markewaite Mark Waite made changes -
            Link This issue is duplicated by JENKINS-63882 [ JENKINS-63882 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              Assignee:
              danielbeck Daniel Beck
              Reporter:
              markewaite Mark Waite
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: