Opened 19 years ago
Closed 17 years ago
#3051 closed defect (worksforme)
maximum recursion limit exceeded in trac 0.94
Reported by: | 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 , 19 years ago
comment:2 by , 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 , 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 , 18 years ago
Component: | ticket system → wiki |
---|---|
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 , 18 years ago
Keywords: | needinfo removed |
---|---|
Milestone: | 0.10.4 |
Resolution: | → worksforme |
Status: | new → closed |
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.
follow-up: 7 comment:6 by , 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()
comment:7 by , 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 , 18 years ago
Keywords: | needinfo added |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
Version: | 0.9.4 → 0.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 , 17 years ago
Keywords: | needinfo removed |
---|---|
Resolution: | → worksforme |
Status: | reopened → closed |
No news from anonymous for over 3 months. Restoring the original status for this ticket.
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.