-
Bug
-
Resolution: Fixed
-
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:
- Create a plugins.txt file that lists the exact plugins to install
- Create a run-jenkins.sh shell script that downloads the plugins and run Jenkins 2.479.2
- Create a directory jobs/my-folder and copy config.xml into the directory
- Run the run-jenkins.sh shell script and complete the setup wizard by creating a new user and installing no additional plugins
- Observe the stack trace when opening the root page
Steps to resolve the problem:
- Modify the plugins.txt file and switch to use the older plugin version
- Run the same steps as above