Opened 11 years ago

Last modified 9 years ago

#11190 closed defect

Error "OverflowError: regular expression code size limit exceeded" — at Initial Version

Reported by: dbussert@… Owned by: Noah Kantrowitz
Priority: normal Component: HierWikiPlugin
Severity: critical Keywords:
Cc: Trac Release: 1.0

Description

Using the 0.12 release on Trac 1.0, I've gotten a critical error on nearly every Trac page (wiki and others), "OverflowError: regular expression code size limit exceeded".

The traceback is:

File "/opt/bitnami/.tmp/Trac-1.0-py2.7.egg-tmp/trac/wiki/templates/wiki_view.html", line 49, in <Expression u'wiki_to_html(context, text)'>

<div id="wikipage" class="trac-content" py:content="wiki_to_html(context, text)" />

File "/opt/bitnami/apps/trac/lib/Trac-1.0-py2.7.egg/trac/wiki/formatter.py", line 1546, in format_to_html

return HtmlFormatter(env, context, wikidom).generate(escape_newlines)

File "/opt/bitnami/apps/trac/lib/Trac-1.0-py2.7.egg/trac/wiki/formatter.py", line 1501, in generate

escape_newlines)

File "/opt/bitnami/apps/trac/lib/Trac-1.0-py2.7.egg/trac/wiki/formatter.py", line 1283, in format

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

File "/opt/bitnami/apps/trac/lib/Trac-1.0-py2.7.egg/trac/wiki/parser.py", line 175, in rules

self._prepare_rules()

File "/opt/bitnami/apps/trac/lib/Trac-1.0-py2.7.egg/trac/wiki/parser.py", line 204, in _prepare_rules

rules = re.compile('(?:' + '|'.join(syntax) + ')', re.UNICODE)

File "/opt/bitnami/python/lib/python2.7/re.py", line 190, in compile

return _compile(pattern, flags)

File "/opt/bitnami/python/lib/python2.7/re.py", line 240, in _compile

p = sre_compile.compile(pattern, flags)

File "/opt/bitnami/python/lib/python2.7/sre_compile.py", line 523, in compile

groupindex, indexgroup

And from what I can tell its happening in _update(self, pagename), because the pages array used to create the regular expression has 500 items, and somehow that is reaching the limit of Python's RE.

Change History (0)

Note: See TracTickets for help on using tickets.