Edgewall Software
Modify

Opened 19 years ago

Closed 17 years ago

#3051 closed defect (worksforme)

maximum recursion limit exceeded in trac 0.94

Reported by: frey@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: wiki system Version: 0.10.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Hi, in our trac system is a ticket causing trac to print out the following error - after my collegue has "closed" it as "fixed":

Python traceback

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/cgi_frontend.py", line 130, in run
    dispatch_request(req.path_info, req, env)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 139, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 107, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 211, in process_request
    self._insert_ticket_data(req, db, ticket, reporter_id)
  File "/usr/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 406, in _insert_ticket_data
    changes[-1]['comment'] = wiki_to_html(new, self.env, req, db)
  File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 744, in wiki_to_html
    Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)
  File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 599, in format
    result = re.sub(self.rules, self.replace, line)
  File "/usr/lib/python2.3/sre.py", line 143, in sub
    return _compile(pattern, 0).sub(repl, string, count)
RuntimeError: maximum recursion limit exceeded

The SQL data about the corresponding ticket is as follows:

sqlite> select * from ticket where id=72;
72|bug|1145356210|1145356357|bibliosphere||major|epple|epple||||closed|fixed|cocitations werden nicht angezeigt bei vielen cocitations unter linux|ab etwa 600 pmids werden cocitations nicht mehr angezeigt. Beim Klick auf den Link im edgeview passiert nichts.|

Maybe someone could look into this? Ticket 73 and up are working as expected, 71 and down are ok, too.

We're running Debian Sarge, but installed trac from downloadable sources (0.94).

Thanks a lot, Torben

Attachments (0)

Change History (9)

comment:1 by frey@…, 19 years ago

Ok, it was NOT only the ticket data, he added a comment when closing - a LONG comment, I will attach it here, hopefully it won't break THIS ticket.

72|1145356357|epple|comment||Ab einer bestimmten Länge des links wird dieser request nicht erlaubt:
java.io.IOException: Server returned HTTP response code: 400 for URL: http://test.server.local/cgi-bin/coder/coder.pl?s=32;PROCESS=16309673,11506818,15851630,16380122,16373709,12466023,15467201,15471864,15217394,12606945,16014934,14733733,15963682,15500686,11207214,12193735,15523637,11716482,11162356,10415047,10531359,8074655,15555528,10431661,9041934,15313405,10384106,15623648,15963597,15297372,11466573,15854673,15854663,11082190,15931525,10578230,10781090,15716464,15719215,10598013,15505507,12411406,15735712,15329330,15780952,10623427,12606776,10631313,15763366,9057838,12446609,11412039,15239609,15037818,15351711,10617676,15851377,11969339,10692422,15820709,15963474,10701683,15845610,16456721,15856410,16386242,15876425,11283850,15124245,15905055,15390082,15929167,11588108,11668179,12625875,16334941,16216424,14557269,15649487,11399097,16001969,12065309,15242680,15546960,12907684,15848037,15470067,11949966,15345145,15723090,10956548,15056862,15383566,15857607,15649409,15630188,15630178,16125137,15703837,15630166,15117678,12907607,16155409,11032891,12648158,11040335,15591708,11053030,14512290,15319438,15905586,15972838,11092878,15748625,14762100,15498788,10418820,16243823,11334875,16253229,12388637,10684635,15844661,16310244,16253096,16081677,15860667,16326428,15678086,15735738,15844632,11230753,15476283,15684475,14739579,16046401,11278846,15197583,15684432,11981761,9765276,15240720,12145100,11123339,12324457,12894587,11069240,11238631,14742695,16142402,11270638,11978490,11680608,15668340,12177064,11007963,15501771,12215492,15315973,12417253,15456896,14973242,12827217,12529332,15485688,11572998,12144946,16299228,16110250,15626591,16408121,14633657,14985981,16203115,10671533,15479233,12349897,12349896,12839952,15882800,11672585,15322259,12064806,10210266,11356937,15322248,12923200,15024367,15655349,10751555,11289656,12628505,12727794,11748375,10706690,10825178,15229295,15575215,11821258,16202995,15120378,16103692,11158257,12871860,11853875,15571975,16254210,15639233,11880271,11683522,15161979,16516846,12388178,12865424,9950682,14572610,14607840,9223587,16183703,15161935,12807725,15488631,16061956,15780087,12826907,12028436,11795524,12062631,12432912,11062012,12107235,10600759,12695520,10594346,15917731,16244433,12721113,15126565,15379601,12842821,15155382,12208745,9514889,10101034,12220616,13678782,15289885,12673029,10395693,15811958,15778740,15094475,16116226,11782563,15751079,11164379,15180920,12356282,8573101,12954801,14754878,14514642,16250665,16100121,16202616,12237297,12444159,9710122,15542781,10574921,14684367,11724787,15642051,15225655,10754263,16055227,11350014,12115530,12189195,15513908,10501211,15036657,12544905,15094305,15459441,15728492,12562859,9652398,12471036,12650403,11090541,10594073,15203187,12586294,15158337,12621554,12573534,16256955,12615711,12006564,14966134,14559351,16282556,15280016,12672646,12683421,15997464,12016133,12573452,12695514,12708493,15901350,16083916,10946303,12076960,12746218,10453032,16061484,14994385,12424787,15311968,16115920,12361987,16356124,11522796,14738598,15763541,14664905,12771929,14645683,12797548,15331118,9620167,10491379,9655393,15821150,10462530,12934647,15465602,12912808,15741054,15917216,10638668,10545778,12176102,16269535,12031964,11714866,15917189,12208114,12086399,12086398,12086396,12743010,12355443,14507857,12576442,14667999,11708426,15193289,15843495,11042196,15997235,10882039,9722548,7945196,15234907,14988266,14581482,11266376,14645533,11971025,11602676,8537402,14530214,14667940,14587863,11352824,15106733,16093250,12794156,15523106,15020231,16387899,15148333,9568691,15635170,16365453,16099597,15862573,14630924,11788351,11961302,15013753,11592942,8995303,11692225,10209230,16029077,15872117,16115539,15138622,9514153,15183459,15199473,16416603,9321951,14517215,11756226,15529353,11278967,11509575,11250126,15007244,15913690,10952241,16275626,15993751,11509550,12236620,16256382,9520467,15964894,12428761,10638278,11083494,15779087,16272348,14555539,16336399,15298620,12893162,15836713,15157676,16317159,12588866,12031542,9824673,11909825,12707358,12230110,8579596,12857884,10827178,16272277,11310828,10208989,12806619,12960358,15007072,8181472,15919917,12883469,14645117,12960330,12771343,14529784,11179444,16195339,16204946,12784118,11826407,12130685,11755922,11121721,12773299,9686761,12604692,15596291,15455341,11381123,16176003,11534855,16534736,16534731,14709015,14532848,15266333,16284883,15067740,16230421,15355999,11489969,16457818,14584040,12354747,16198345,12012021,8424659,10195917,16457781,15794755,10942208,12012007,12623776,12646188,12011987,11095928,10211885,12562875,16377638,11518681,10564178,15461561,12639713,12204102,15294995,14503852,16025269,15016316,12517975,12517972,12421878,10919656,12485915,9266823,15057913,11742805,12485900,14657518,15256475,15547942,16050801,15157161,12831777,16095631,10669746,11380809,14980980,14504089,9680006,12622742,9990673,15653566,9414121,12444157,9414112,11813157,10768977,9561442,15567061,12738799,14633677,15576654,9580637,14519659,12844482,12882915,15576632,14672923,15265936,12123780,12626645,10419767,15733543,14622099,14751545,15852038,11880315,14764680,11313375,10438953,15659838,16146692,15659835,15368354,11527948,12101284,12767507,11726530,12860389,10666314,12062820,11457450,14561156,16428503,11835400,15067222,14996749,15496409,15755849,11079466,14996729,15291404,14980710,11108281,11723253,16210649,15784648,9679714,16092118,15890324,16319525,9465095,15013430,10884021,15016835,15570007,11290798,9916892,15047127,11396478,11905754,12901877,16210570,12021045,15758944,15489888,15093887,15112579,11399641,11069722,11444469,12437573,10656529,16207319,12225989,12113880,12837757,10480347,9372101,11556546,11306704,15387324,15213311,16168844,10454683,15118249,15131058,15566646,16005433,12145811,11409114,10232679,15316751
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149)
        at java.net.URL.openStream(URL.java:1007) ....

Solution: get in post umgewandelt

comment:2 by sid, 18 years ago

Keywords: needinfo added

This looks very similar to #2468, but that fix went into 0.9.3, so probably is not exactly the same thing. If you upgrade to the latest 0.9-stable or 0.10, does this error still occur for that ticket?

comment:3 by jsnell@…, 18 years ago

i experienced this in 0.9.6:

raceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 206, in handler
    dispatch_request(mpr.path_info, mpr, env)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 139, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 107, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/trac/ticket/report.py", line 113, in process_request
    resp = self._render_view(req, db, id)
  File "/usr/lib/python2.3/site-packages/trac/ticket/report.py", line 347, in _render_view
    absurls=(format == 'rss'))
  File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 751, in wiki_to_html
    Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)
  File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 600, in format
    result = re.sub(self.rules, self.replace, line)
  File "/usr/lib/python2.3/sre.py", line 143, in sub
    return _compile(pattern, 0).sub(repl, string, count)
RuntimeError: maximum recursion limit exceeded

and 0.10.3:

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/trac/ticket/report.py", line 88, in process_request
    resp = self._render_view(req, db, id)
  File "/usr/lib/python2.3/site-packages/trac/ticket/report.py", line 332, in _render_view
    absurls=(format == 'rss'))
  File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 999, in wiki_to_html
    Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)
  File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 822, in format
    result = re.sub(self.wiki.rules, self.replace, line)
  File "/usr/lib/python2.3/sre.py", line 143, in sub
    return _compile(pattern, 0).sub(repl, string, count)
RuntimeError: maximum recursion limit exceeded

Pasting a large stack trace into a ticket from PHP seemed to trigger this. A kludge:

822,823c822
<           # result = re.sub(self.wiki.rules, self.replace, line)
<             result = line
---
>             result = re.sub(self.wiki.rules, self.replace, line)

comment:4 by Christian Boos, 18 years ago

Component: ticket systemwiki
Milestone: 0.10.4

I would be interested in getting that PHP stack trace for further testing. If you can't attach it here, would you mind sending it directly to me? (see ChristianBoos for the e-mail).

comment:5 by Christian Boos, 18 years ago

Keywords: needinfo removed
Milestone: 0.10.4
Resolution: worksforme
Status: newclosed

Well, without the specific text that caused the problem, there's no way we can fix the issue.

However, a few Wiki engine regexp bugs have been fixed in 0.10.x, so I believe that these issues should be gone, with 0.10.3. This is the case for the text given in comment:1, for example.

If not, feel free to reopen and provide the relevant wiki text which triggers the bug.

comment:6 by anonymous, 18 years ago

using 0.10.4 I got same error, also with large stack trace in ticket comments.

This patch fixed my problem (based on above comment):

—- formatter.py.orig 2007-04-25 13:30:07.000000000 -0500 +++ formatter.py 2007-04-25 13:29:50.000000000 -0500 @@ -821,7 +821,10 @@

self.in_list_item = False self.in_quote = False # Throw a bunch of regexps on the problem

  • result = re.sub(self.wiki.rules, self.replace, line)

+ try: + result = re.sub(self.wiki.rules, self.replace, line) + except RuntimeError: + result = line

if not self.in_list_item:

self.close_list()

in reply to:  6 comment:7 by anonymous, 18 years ago

Replying to anonymous:

using 0.10.4 I got same error, also with large stack trace in ticket comments.

This patch fixed my problem (based on above comment):

Sorry. forgot the verbatim wrappers.

--- formatter.py.orig   2007-04-25 13:30:07.000000000 -0500
+++ formatter.py        2007-04-25 13:29:50.000000000 -0500
@@ -821,7 +821,10 @@
             self.in_list_item = False
             self.in_quote = False
             # Throw a bunch of regexps on the problem
-            result = re.sub(self.wiki.rules, self.replace, line)
+            try:
+                result = re.sub(self.wiki.rules, self.replace, line)
+            except RuntimeError:
+                result = line

             if not self.in_list_item:
                 self.close_list()

comment:8 by Christian Boos, 18 years ago

Keywords: needinfo added
Resolution: worksforme
Status: closedreopened
Version: 0.9.40.10.4

Please paste here the text which triggered the problem (wrap it also in a block, in case the error would happen in this Trac as well).

comment:9 by Emmanuel Blot, 17 years ago

Keywords: needinfo removed
Resolution: worksforme
Status: reopenedclosed

No news from anonymous for over 3 months. Restoring the original status for this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.