• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Setting these two:

$TWiki::cfg{UseLocale} = 1;
$TWiki::cfg{UserInterfaceInternationalisation} = 1;

in LocalSite.cfg makes WebSearch hang in my setup.

Toggling just one or the other works OK; only when both settings are enabled, there is a problem with WebSearch.

Symptom is a runaway apache process eating all available memory at an insane speed smile

I hope this is reproducible - if you need details, please let me know.

SP

In related news, 8001 introduced the same issue for edit.

SP

In WebSearch, the problem can be eliminated by removing line 5:

%IF{"defined search" then='<a href="#" style="text-decoration:none;" onclick="location.hash=\'twikiSearchForm\'; return false;">%ICON{down}% <span class="patternLinkLabel">%MAKETEXT{Modify search}%</span></a>'}%

SP


I had something like this, when using mod_perl. Besides consuming an always increasing amount of memory, eventually an apache process hits 100% CPU and eats all memory. (it was indeed almost always a *.WebSearch request).

I could not find why that was happening, and since my server was asking for death, when I realised that switching back to regular CGI made this weird problem go away, I could not think much.

And, man, if the problem is really that line, that's weird.

SP, does your setup uses mod_perl ?

AT

Actually it's just straight non-heated cgi this time smile

I tried this both on 1.3.33 and 2.0.54 (both non-modperl'ed), and the problem is the same (perl 5.8.4 in both setups).

WebSearchAdvanced has a similar line / construct, which reads:

%IF{" '%URLPARAM{search}%' = '' " then="" else='<a href="#" style="text-decoration:none;" onclick="location.hash=\'twikiSearchForm\'; return false;">%ICON{down}% <span class="patternLinkLabel">%MAKETEXT{"Modify search"}%</span></a>'}% 

.. but which pose no special problem (?!).

Taking out just the %MAKETEXT{Modify search}% bit from line 5 of WebSearch is enough to make things work again. On a sidenote, it actually looks like this string is not defined in TWiki.pot (except for WebSearchAdvanced) - does that present a clue, that it is not taken into the TWiki.pot generation?.

- BTW: I presume you are unable to reproduce the error, AT?

SP

Just to finish off bug report, removing the little %MAKETEXT{help}% from line 54 of edit.pattern.tmpl also makes edit spring into action again (this string is correctly defined in TWiki.pot, so no connection between the two there, apparently).

One thing the two bugs do have in common, though, is that they both are dealing with maketexts that appear directly inside an IF statement - in other template stuff the maketext's seem to have been refactored out, so the IF's are only used to choose between two template definitions (not that I am willing to claim myself able to understand these mechanisms very deeply in any way *g*).

SP

Trying a few regular expression searches, there seems to be a few other places also having IF's and maketexts combined:

data/TWiki/WebLeftBarLogin.txt
data/TWiki/WebLeftBarSearch.txt
templates/preview.pattern.tmpl <- this one has the infinite loop bug as well

The two first leftbar-cases uses alternate syntax'es (mainly use of " or ' for maketext parameters, somewhat like WebSearchAdvanced) which seem to parse up OK, not giving infinite loops - perhaps an inspiration for a fix?

SP

Attached patch against 8029 - added a few apostrophes, seems to work. I'll leave the TWiki.pot juggling up to you smile

SP

Filed Item1266 on the generic case of this bug (DOS attack).

SP

This is better described in Item1266, so I'm discrading it as a duplicate. CC

-- SP, thanks to the report. I'll apply your patch and followup on Item1266 for a real fix.

AT

Heh, went into a bit of brainstorm/dump mode there, happens .. thanks for fixing!

SP

ItemTemplate
Summary UseLocale + UserInterfaceInternationalisation gives runaway process (infinite loop) in WebSearch and edit
ReportedBy SteffenPoulsen
Codebase

SVN Range Tue, 27 Dec 2005 build 7999
AppliesTo Engine
Component

Priority Urgent
CurrentState No Action Required
WaitingFor

Checkins 8032
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch unquoted_maketexts_r8029.patch r3 r2 r1 manage 5.5 K 2005-12-30 - 10:03 SteffenPoulsen Patch against 8029 for unquoted maketexts
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2005-12-30 - SteffenPoulsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback