Quoting Justus Winter (2011-12-06 13:51:08) >Quoting Sebastian Spaeth (2011-12-06 13:05:53) >>On Tue, 06 Dec 2011 10:46:31 +0000, Patrick Totzke <patricktotzke@googlemail.com> wrote: >>> This commit breaks raising XapianErrors for me. >>> >>> If I lock the index with some `notmuch tag +test '*'` >>> and try to write to it in alot, i get a segfault and >>> the following on stderr: >>> >>> Xapian exception occurred opening database: Unable to get write lock on >>> /home/pazz/mail/.notmuch/xapian: already locked >> >>Hi Justus, >>I can confirm that this patch breaks as Totzke has described it: >> >>http://git.notmuchmail.org/git/notmuch/commitdiff/3434d194026ff65217d9342ffe511f67fd71e79f >> >>This change makes python segfault with a Xapianerror on stdout rather >>than the python exception that we were seeing before this patch. >> >>- _open.restype = c_void_p >>+ _open.restype = NotmuchDatabaseP >> >> >>As the patch obviously fixed other crashers I would like to not revert >>it. Can you have a look and see if you find a cause of that? > >Yes, I've seen that one as well and could not figure out what causes >it since I thought that I wasn't changing the semantic of the binding. > >I began running alot in gdb since I get segfaults within libnotmuch >from time to time and managed to get a stack trace pointing to >notmuch_database_begin_atomic, but I couldn't figure out what caused >it. #0 0x00007f5f25e30f71 in notmuch_database_begin_atomic () from /home/teythoon/.local/lib/libnotmuch.so.2 #1 0x00007f5f2605ef70 in ffi_call_unix64 () from /usr/lib/python2.7/lib-dynload/_ctypes.so #2 0x00007f5f2605e9eb in ffi_call () from /usr/lib/python2.7/lib-dynload/_ctypes.so #3 0x00007f5f260529c7 in _call_function_pointer (argcount=1, resmem=0x7fff57659500, restype=<optimized out>, atypes=<optimized out>, avalues=0x7fff576594e0, pProc=0x7f5f25e30f70 <notmuch_database_begin_atomic>, flags=4353) at /home/packages/python/2.7/python2.7-2.7.2/Modules/_ctypes/callproc.c:827 with stderr saying: A Xapian exception occurred opening database: Unable to get write lock on /home/teythoon/Maildir/.notmuch/xapian: already locked Justus