Tags:
create new tag
view all tags

Bug: Treeview plugin can cause apache to hang

If a twiki user creates a loop of topic parents, the display of tree view outline mode causes apache to hang due to out of memory error.

Reported error in apache log:
[Tue Mar 29 07:17:11 2005] view: Deep recursion on subroutine "TWiki::Plugins::TreePlugin::ImgNodeFormatter::isNodeLast" at ../lib/TWiki/Plugins/TreePlugin/ImgNodeFormatter.pm line 247., referer: http://twiki.corp.purisma.com/do/search/Howto/?search=CategoryDevEnv&web=Howto&scope=all

Test case

Create three topics:

  • CategoryOne has topic parent of CategoryTwo
  • CategoryTwo has topic parent of CategoryThree
  • CategoryThree has topic parent of CategoryOne

Now the tree view of this is not possible: it is an infinite loop.

The code in Cairo release of TreePlugin does not detect this case and does an infinite recursion. Using apache+speedycgi, twiki hangs with cpu at 100% until apache is killed.

The specific treeview we used was this: %TREEVIEW{topic="CategoryTwo" stoplevel="3" formatting="imageoutline:thread"}%

NOTE: once this kind of rendering problem is introduced, twiki 'search' is not usable since it also seems to trigger the bug.

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: redhat 9.0
Web server: apache 2.0-40
Perl version: 5.8.2
Client OS: MS IE 6 -sp2
Web Browser:  

-- StanleyKnutson - 30 Mar 2005

Impact and Available Solutions

Follow up

Fix record

Discussion

Topic revision: r1 - 2005-03-30 - StanleyKnutson
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.