[Buildbot-commits] [Buildbot] #2005: SQLAlchemy Operational errors with SQLite: Database is locked

Buildbot nobody at buildbot.net
Tue Jun 21 09:50:51 UTC 2011


#2005: SQLAlchemy Operational errors with SQLite: Database is locked
----------------------+-----------------------
Reporter:  abompard   |      Owner:
    Type:  undecided  |     Status:  new
Priority:  major      |  Milestone:  undecided
 Version:  0.8.4      |   Keywords:  database
----------------------+-----------------------
 Since the switch to SQLAlchemy in 0.8.4, I get many tracebacks in the log
 such as:
 {{{
 2011-06-21 11:04:46+0200 [-] while marking build requests as completed
 Traceback (most recent call last):
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 269, in errback
             self._startRunCallbacks(fail)
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 312, in _startRunCallbacks
             self._runCallbacks()
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 328, in _runCallbacks
             self.result = callback(self.result, *args, **kw)
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 614, in gotResult
             _deferGenerator(g, deferred)
         --- <exception caught here> ---
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 589, in _deferGenerator
             result = g.next()
           File "/usr/lib/python2.5/site-
 packages/buildbot/process/builder.py", line 583, in
 _maybeBuildsetsComplete
             wfd.getResult()
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 568, in getResult
             self.result.raiseException()
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 589, in _deferGenerator
             result = g.next()
           File "/usr/lib/python2.5/site-packages/buildbot/master.py", line
 974, in maybeBuildsetComplete
             brdicts = wfd.getResult()
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 568, in getResult
             self.result.raiseException()
           File "/usr/lib/python2.5/site-packages/buildbot/db/pool.py",
 line 127, in thd
             rv = callable(conn, *args, **kwargs)
           File "/usr/lib/python2.5/site-
 packages/buildbot/db/buildrequests.py", line 140, in thd
             res = conn.execute(q)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1191, in execute
             params)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1271, in _execute_clauseelement
             return self.__execute_context(context)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1302, in __execute_context
             context.parameters[0], context=context)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1401, in _cursor_execute
             context)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1394, in _cursor_execute
             context)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/default.py", line 299, in do_execute
             cursor.execute(statement, parameters)
         sqlalchemy.exc.OperationalError: (OperationalError) database is
 locked u'SELECT buildrequests.id, buildrequests.buildsetid,
 buildrequests.buildername, buildrequests.priority,
 buildrequests.claimed_at, buildrequests.claimed_by_name,
 buildrequests.claimed_by_incarnation, buildrequests.complete,
 buildrequests.results, buildrequests.submitted_at,
 buildrequests.complete_at \nFROM buildrequests \nWHERE
 buildrequests.buildsetid = ?' (20438,)
 }}}

 or

 {{{
 in maybeStartBuild for <Builder ''unit-mes5-64'' at 55811896>
         Traceback (most recent call last):
         Failure: twisted.internet.defer.FirstError:
 FirstError(<twisted.python.failure.Failure <class
 'sqlalchemy.exc.OperationalError'>>, 7)

 2011-06-21 11:09:03+0200 [-] Unhandled error in Deferred:
 2011-06-21 11:09:03+0200 [-] Unhandled Error
         Traceback (most recent call last):
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 269, in errback
             self._startRunCallbacks(fail)
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 312, in _startRunCallbacks
             self._runCallbacks()
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 328, in _runCallbacks
             self.result = callback(self.result, *args, **kw)
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 614, in gotResult
             _deferGenerator(g, deferred)
         --- <exception caught here> ---
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 589, in _deferGenerator
             result = g.next()
           File "/usr/lib/python2.5/site-
 packages/buildbot/process/buildrequest.py", line 108, in _make_br
             buildset = wfd.getResult()
           File "/usr/lib64/python2.5/site-
 packages/twisted/internet/defer.py", line 568, in getResult
             self.result.raiseException()
           File "/usr/lib/python2.5/site-packages/buildbot/db/pool.py",
 line 127, in thd
             rv = callable(conn, *args, **kwargs)
           File "/usr/lib/python2.5/site-
 packages/buildbot/db/buildsets.py", line 157, in thd
             res = conn.execute(q)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1191, in execute
             params)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1271, in _execute_clauseelement
             return self.__execute_context(context)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1302, in __execute_context
             context.parameters[0], context=context)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1401, in _cursor_execute
             context)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/base.py", line 1394, in _cursor_execute
             context)
           File "/usr/lib/python2.5/site-
 packages/sqlalchemy/engine/default.py", line 299, in do_execute
             cursor.execute(statement, parameters)
         sqlalchemy.exc.OperationalError: (OperationalError) database is
 locked u'SELECT buildsets.id, buildsets.external_idstring,
 buildsets.reason, buildsets.sourcestampid, buildsets.submitted_at,
 buildsets.complete, buildsets.complete_at, buildsets.results \nFROM
 buildsets \nWHERE buildsets.id = ?' (20448,)
 }}}

 I'll attach my (anonymized) log to this ticket for further investigation.

 It looks like it can cause the builds to be re-tried lated, on buildbot
 restart for example.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2005>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list