Comment 0 for bug 707079

Revision history for this message
Diogo Matsubara (matsubara) wrote :

The update_db.py script is failing with the following traceback:

Traceback (most recent call last):
 File "bin/update_db", line 41, in <module>
   oopstools.scripts.update_db.main()
 File "/srv/lp-oops.canonical.com/cgi-bin/lpoops/src/oopstools/scripts/update_db.py", line 16, in main
   for oops in oops_store.find_oopses(start_date):
 File "/srv/lp-oops.canonical.com/cgi-bin/lpoops/src/oopstools/oops/dboopsloader.py", line 113, in find_oopses
   oops = self._load_oops(datedir, filename)
 File "/srv/lp-oops.canonical.com/cgi-bin/lpoops/src/oopstools/oops/dboopsloader.py", line 128, in _load_oops
   os.path.join(datedir, filename))
 File "/srv/lp-oops.canonical.com/cgi-bin/lpoops/src/oopstools/oops/models.py", line 515, in from_pathname
   data, reqvars, statements, traceback = _parse_msg(msg)
 File "/srv/lp-oops.canonical.com/cgi-bin/lpoops/src/oopstools/oops/models.py", line 412, in _parse_msg
   exception_type, msg.getheader('exception-value'), prefix)
 File "/srv/lp-oops.canonical.com/cgi-bin/lpoops/src/oopstools/oops/models.py", line 362, in _normalize_exception_value
   evalue = replace_variables(evalue)
 File "/srv/lp-oops.canonical.com/cgi-bin/lpoops/src/oopstools/oops/helpers.py", line 87, in replace_variables
   s = re.sub(r"'(?:\\\\|\\[^\\]|[^'])*'", '$STRING', s)
 File "/usr/lib/python2.6/re.py", line 151, in sub
   return _compile(pattern, 0).sub(repl, string, count)
MemoryError

This is caused by an 196M OOPS report which contains a huge SQL statement.