Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Justus Winter <4winter-jNDFPZUTrfQBEfOqpokbeYV0Y/DQsy6Ps0AfqQuZ5sE <at> public.gmane.org>
Subject: Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types
Newsgroups: gmane.mail.notmuch.general
Date: Wednesday 7th December 2011 18:49:31 UTC (over 5 years ago)
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
 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=, 
    atypes=, avalues=0x7fff576594e0, pProc=0x7f5f25e30f70
, 
    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
 
CD: 3ms