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

Folders 6.971.v9a_984fd08864 stack overflow if folder uses branch API metadata folder icon

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • Jenkins 2.479.2 and Jenkins 2.489
      cloudbees-folder:6.971.v9a_984fd08864

      Other plugins as listed in attached plugins.txt

      When I upgraded from folders plugin 6.969.v7d22c6eb_fde1 to folders plugin 6.971.v9a_984fd08864 my Jenkins controllers crash with a stack overflow exception like this:

      2024-12-12 19:58:39.937+0000 [id=20]    WARNING h.ExpressionFactory2$JexlExpression#evaluate: Caught exception evaluating: it.iconClassName in /. Reason: java.lang.reflect.InvocationTargetException
      java.lang.StackOverflowError
              at hudson.ExtensionList.lookup(ExtensionList.java:437)
              at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.relocate.RelocationUI.for_(RelocationUI.java:113)
              at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.relocate.RelocationAction.<init>(RelocationAction.java:78)
              at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.relocate.RelocationAction$TransientActionFactoryImpl.createFor(RelocationAction.java:176)
              at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.relocate.RelocationAction$TransientActionFactoryImpl.createFor(RelocationAction.java:158)
              at hudson.model.Actionable.createFor(Actionable.java:118)
              at hudson.model.Actionable.getAction(Actionable.java:335)
              at PluginClassLoader for branch-api//jenkins.branch.MetadataActionFolderIcon.getIconClassName(MetadataActionFolderIcon.java:76)
              at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.AbstractFolder.getIconClassName(AbstractFolder.java:311)
              at PluginClassLoader for branch-api//jenkins.branch.MetadataActionFolderIcon.getIconClassName(MetadataActionFolderIcon.java:104)
              at PluginClassLoader for cloudbees-folder//com.cloudbees.hudson.plugins.folder.AbstractFolder.getIconClassName(AbstractFolder.java:311)
              at PluginClassLoader for branch-api//jenkins.branch.MetadataActionFolderIcon.getIconClassName(MetadataActionFolderIcon.java:104)
      

      The exception happens if the folder includes the follow XML snippet in its definition:

        <icon class="jenkins.branch.MetadataActionFolderIcon" plugin="branch-api@2.1200.v4b_a_3da_2eb_db_4">
          <owner class="com.cloudbees.hudson.plugins.folder.Folder" reference="../.."/>
        </icon>
      

      That XML snippet is included in many, many folder definitions in my controller.

      Steps to duplicate the problem:

      1. Create a plugins.txt file that lists the exact plugins to install
      2. Create a run-jenkins.sh shell script that downloads the plugins and run Jenkins 2.479.2
      3. Create a directory jobs/my-folder and copy config.xml into the directory
      4. Run the run-jenkins.sh shell script and complete the setup wizard by creating a new user and installing no additional plugins
      5. Observe the stack trace when opening the root page

      Steps to resolve the problem:

      1. Modify the plugins.txt file and switch to use the older plugin version
      2. Run the same steps as above

        1. config.xml
          1.0 kB
        2. plugins.txt
          6 kB
        3. run-jenkins.sh
          0.9 kB

            markewaite Mark Waite
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: