Opened 15 years ago

Closed 14 years ago

#698 closed defect (fixed)

OperationalError: database is locked

Reported by: sascha_silbe Owned by: bernie
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: bugs.sugarlabs.org Version: Unspecified
Severity: Minor Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description (last modified by erikos)

While trying to modify bug #137, I got the following error. Second try worked fine.
Looks like trac should wait for the lock (up to a timeout of course) and try again instead of bailing out.

How to Reproduce

While doing a POST operation on /ticket/137, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'3f28aa22b769ed9b5a66fecc',
 'action': u'leave',
 'action_reassign_reassign_owner': u'sascha_silbe',
 'action_resolve_resolve_resolution': u'fixed',
 'cnum': u'4',
 'comment': u"hulahop in git seems to work the other way around now: using the full version for the path instead of major.minor only. This works on Fedora and Ubuntu, but breaks on Debian. Any chance we could support both schemes?\r\nI currently need to follow xulrunner closely to ensure security updates are applied in sugar-jhbuild. For CVE-2009-1169 and CVE-2009-1044 I even need to pull distro patches since there's still no new upstream release containing the fixes (1 week and counting).\r\n\r\n",
 'field_cc': u'sascha_silbe',
 'field_component': u'hulahop',
 'field_distribution': u'Ubuntu',
 'field_keywords': u'',
 'field_milestone': u'0.86',
 'field_priority': u'Normal',
 'field_severity': u'Major',
 'field_status_field': u'New',
 'field_summary': u'Use standalone glue not rpath linking for xulrunner',
 'field_type': u'defect',
 'field_version': u'0.83.x',
 'id': u'137',
 'replyto': u'',
 'submit': u'Submit changes',
 'ts': u'2009-02-12 13:24:51+00:00'}

System Information

Trac 0.11.1
Python 2.5.2 (r252:60911, Jul 31 2008, 18:03:07)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
setuptools 0.6c8
SQLite 3.4.2
pysqlite 2.3.2
Genshi 0.5.1

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 170, in process_request
    return self._process_ticket_request(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 494, in _process_ticket_request
    self._do_save(req, ticket, action)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 989, in _do_save
    cnum=internal_cnum):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/model.py", line 260, in save_changes
    (self[name], self.id))
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/sqlite_backend.py", line 58, in execute
    args or [])
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/sqlite_backend.py", line 50, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: database is locked

Change History (3)

comment:1 Changed 15 years ago by erikos

  • Component changed from trac to infrastructure
  • Description modified (diff)
  • Owner changed from erikos to krstic

Infra team, can someone have a look please?

comment:2 Changed 14 years ago by sascha_silbe

  • Component changed from infrastructure to trac
  • Owner changed from krstic to bernie
  • Status changed from new to assigned

This still happens occasionally, e.g. recently to Tabitha (#1745).
Upstream bugs related to this issue are Trac#3446, Trac#3503. It is believed to have been fixed in Trac 0.11.6 (which we run), but only in combination with mod_python >= 3.3.1 (do we use that at all?), SQLite 3.3.8 and PySqlite 2.5.0. Since I don't have shell access I cannot check the latter versions.
It has been pointed out this only happens with sqlite, so we might want to move to PostgreSQL instead; this would also be a small step in preparing Trac for redundant operation. We can do that once it got moved to sunjammer.

comment:3 Changed 14 years ago by bernie

  • Resolution set to fixed
  • Status changed from assigned to closed

We've now moved trac to sunjammer. If the problem persists, please reopen this bug.

Note: See TracTickets for help on using tickets.