monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Unclear error when database is locked


From: Matthew Gregan
Subject: Re: [Monotone-devel] Unclear error when database is locked
Date: Thu, 13 Oct 2005 12:24:32 +1300
User-agent: Mutt/1.5.10i

At 2005-10-13T00:26:02+0200, Wim Oudshoorn wrote:
> A commit from emacs was hanging and a subsequent commit gave the following 
> error:
> 
> monotone: beginning commit on branch 'nl.xs4all.ironhead.graphs'
> terminate called after throwing an instance of 'informative_failure'
> monotone: fatal: signal: SIGABRT (application abort requested)
> monotone: 
> monotone: this is almost certainly a bug in monotone.
> monotone: please send this error message, the output of 'monotone 
> --full-version',
> monotone: and a description of what you were doing to address@hidden
> monotone: wrote debugging log to /Users/woudshoo/src/graph/MT/debug

Thanks for the bug report.  At present, SQLite doesn't expose (or, if it
does, we don't know about and don't use) any external database locking, so
any database lock errors are only detected at the time a call into SQLite
fails due as a result of internal locking (i.e. SQLite performs locks
internally, but we don't have access to that same locking functionality).

We try to report the SQLite error directly back to the user (in this case,
that would be the 'sqlite error: 5: database is locked' error you see in the
debug lock) via a C++ exception.  In this particular case, the exception is
being raised inside one of our C SQLite callbacks, and this is resulting in
std::terminate being called.

There was a change made during 0.23's development that enabled us to throw
exceptions through C stack frames, but this is somewhat compiler and
platform dependant.

Based on your home directory path, it looks like you're running OS X.  Is
that a safe assumption to make?  I would've expected this exception handling
change to work there (considering it's using GCC), but it appears it
doesn't.  I'll look into it further.

> The last part of the MT/debug directory is:
> 
> binding 1 with value '2830c93667a1a7b52af3e4195c394ed6da5e89c7'
> prepared statement DELETE FROM manifests WHERE id = ?
> binding 1 parameters for DELETE FROM manifests WHERE id = ?
> binding 1 with value '2830c93667a1a7b52af3e4195c394ed6da5e89c7'
> sqlite error: 5: database is locked
> ../database.cc:184: detected error 'E(errcode == SQLITE_OK)' violated
> prepared statement ROLLBACK
> binding 0 parameters for ROLLBACK
> sqlite error: 1: cannot rollback transaction - SQL statements in progress
> ../database.cc:184: detected error 'E(errcode == SQLITE_OK)' violated
> 
> monotone version: 0.23
> 
> It seems it can detect that the DB is locked but the error
> message the user sees is not very clear.

Thanks,
-mjg
-- 
Matthew Gregan                     |/
                                  /|                address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]