Bug: Infinite Recursion in Search
Try the following:
create pages called
and
then create a MeetingMinutesMain that contains:
% SEARCH{"MeetingMinutes" scope="topic" bookview="on" nosearch="on" noheader="on"}%
On my 2001Dec01 installation, I get the following messages in the http error log:
[Mon Dec 10 18:56:22 2001] null: Deep recursion on subroutine "TWiki::handleCommonTags" at ../lib/TWiki/Search.pm line 163.
[Mon Dec 10 18:56:22 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1390.
[Mon Dec 10 18:56:22 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1400.
[Mon Dec 10 18:56:23 2001] null: Deep recursion on subroutine "TWiki::handleCommonTags" at ../lib/TWiki/Search.pm line 164.
[Mon Dec 10 18:56:23 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1390.
[Mon Dec 10 18:56:23 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1400.
[Mon Dec 10 18:56:23 2001] null: Deep recursion on subroutine "TWiki::handleCommonTags" at ../lib/TWiki/Search.pm line 165.
[Mon Dec 10 18:56:23 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1390.
[Mon Dec 10 18:56:23 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1400.
[Mon Dec 10 18:56:23 2001] null: Deep recursion on subroutine "TWiki::handleCommonTags" at ../lib/TWiki/Search.pm line 166.
[Mon Dec 10 18:56:23 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1390.
[Mon Dec 10 18:56:24 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1400.
[Mon Dec 10 18:56:24 2001] null: Deep recursion on subroutine "TWiki::handleCommonTags" at ../lib/TWiki/Search.pm line 402.
[Mon Dec 10 18:56:24 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1390.
[Mon Dec 10 18:56:24 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1400.
[Mon Dec 10 18:56:24 2001] null: Deep recursion on subroutine "TWiki::handleCommonTags" at ../lib/TWiki/Search.pm line 403.
[Mon Dec 10 18:56:24 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1390.
[Mon Dec 10 18:56:24 2001] null: Deep recursion on subroutine "TWiki::handleInternalTags" at ../lib/TWiki.pm line 1400.
...
I have worked around it by changing the search string to:
% SEARCH{"TwikiTest[0-9]" scope="topic" regex="on" bookview="on" nosearch="on" noheader="on"}%
but before I figured out what was happening my apache server (w/ mod_perl) gobbled most of my swap space and consumed all of my cpu cycles 8-(.
The apache server version:
Apache/1.3.12 (Unix) (Red Hat/Linux) mod_ssl/2.6.6
OpenSSL/0.9.5a mod_perl/1.24
I was able to recover by stopping the web page load and restarting the httpd services.
Can somebody try this out and see if its just my installation or if its reproducable in other places.
Thanks.
-- rouilj
--
JohnRouillard - 10 Dec 2001
This bug still exists in
BeijingRelease based code.
--
MS - 20 Jul 2003
I came across this too, couldn't decide if it was really a bug since it
was trying to
give what I had asked for
. I came up with the same workaround. In another context
I came to prefer the variant regex:
%SEARCH{ "%TOPIC%.+$" scope="topic" order="topic" regex="on" ...
--
DickFurnas - 07 Dec 2003
The same happened at our location. A colleague was playing around with queries, wrote a recursive one - didn’t get any output and left it at that… Unfortunately he left it only after 10 tries or so, bringing our server almost to a halt. Took us a while before realizing the server was slow (by default we pick on IT / network - sorry guys
) - and why this was the case.
I have been actively promoting the use of queries to organize reporting, improve accessibility.... This infinite recursive thing kind’ a tempers my enthusiasm… Not all of my TWiki users are experienced software developers that smell a recursion issue 5min before seeing it.
A quick search on the web suggests
Apache-Watchdog-RunAway might at least catch the problem at the server side. Any experience with this script?
--
HansPype - 17 Feb 2004
Problem still exists in version 1572. Only happens when bookview is on. Simply create
MeetingMinutes and paste the expression above into it. Search related, so I'm assigning it to Peter, as he's the expert in that area.
See also:
Searched: CairoBugsInSearch
Bug: Infinite Recursion in Search Try the following: create pages called MeetingMinutes1 and MeetingMinutes2 then create a MeetingMinutesMain...
Is this bug causing you small problems or big problems? If you really want it fixed, indicate here: 8 JamesMollison 21 Aug 2005 9 JacobEisinger 13 Apr...
--
CrawfordCurrie - 12 Jul 2004
This is fixed as of yesterday. In
SVN.
--
PeterThoeny - 30 Jul 2004
Note that MAIN is still subject to infinite recursion (trying visiting the front page of the
TestCases web using MAIN and you'll see).
DEVELOP has fixed these problems (though that isn't to say there aren't more!) by fixing tag expansion.
The form attached to this topic relates to these more recent fixes.
--
CrawfordCurrie - 12 Jan 2005