Modify

Opened 17 months ago

Last modified 17 months ago

#11190 new defect

Error "OverflowError: regular expression code size limit exceeded"

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

Description (last modified by jun66j5)

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.

Attachments (0)

Change History (1)

comment:1 Changed 17 months ago by jun66j5

  • Description modified (diff)

Add Comment

Modify Ticket

Action
as new The owner will remain coderanger.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.