CPU spike with performance issues or crash due to StackOverflowError and ChildtabsMacro

Still need help?

The Atlassian Community is here for you.

Ask the community

This Knowledge Base article was written specifically for the Atlassian Server platform. Due to the Functional differences in Atlassian Cloud, the contents of this article cannot be applied to Atlassian Cloud applications.

Problem

When a specific page that contains the Child Tabs macro (part of the Navitabs add-on) is being loaded, CPU usage spikes to 100% and the following appears in the atlassian-confluence.log :

2015-08-25 16:54:08,034 ERROR [ajp-bio-127.0.0.1-8010-exec-26] [content.render.xhtml.DefaultRenderer] render Error rendering content for view: Error creating bean with name 'com.atlassian.confluence.plugins.templates.transformer.StorageToViewTemplateVariablesTransformer': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.confluence.plugins.templates.transformer.StorageToViewTemplateVariablesTransformer]: Constructor threw exception; nested exception is java.lang.StackOverflowError
 -- referer: http://confluence/display/PS/6.+Status+Reports | url: /pages/viewpage.action | userName: ayrm | action: viewpage | page: 10814148
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.confluence.plugins.templates.transformer.StorageToViewTemplateVariablesTransformer': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.confluence.plugins.templates.transformer.StorageToViewTemplateVariablesTransformer]: Constructor threw exception; nested exception is java.lang.StackOverflowError

The full stack trace would have the following classes:

at ch.bitvoodoo.confluence.plugins.navitabs.ChildtabsMacro.convertPagesToTabs(ChildtabsMacro.java:147)
	at ch.bitvoodoo.confluence.plugins.navitabs.ChildtabsMacro.execute(ChildtabsMacro.java:124)

Diagnosis

Environment

  • This KB only applies to instances with the Navitabs Add-On deployed

Diagnostic Steps

  • Try to enable safe-mode in Confluence Admin >> Manage Add-Ons to see if the issue is resolved. If yes, try to enable just the Navitabs add-on to see if the issue comes back. If yes, the resolution below would be applicable. 
  • Get the storage format of the page, via ... >> View Storage Format (note that this is only possible with the Navitabs macro disabled, otherwise the page would not even load). You will see something like this:

    <ac:structured-macro ac:name="childtabs"><ac:parameter ac:name="root"><ac:link><ri:page ri:content-title="RootWithChildTabs" /></ac:link></ac:parameter></ac:structured-macro>

    In this example, the "RootWithChildTabs" page contains another childtabs macro with the root set to the current page, thus, causing an infinite loop

Cause

Infinite loop caused by the Root Page parameter in the Child Tabs macro:

Resolution

Edit the page (while in Safe Mode with Navitabs add-on disabled). Then remove the said macro from the page. Alternatively, you can remove the macro from the root page as well, to avoid the infinite loop

Last modified on Apr 7, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.