Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 19F61429E27 for ; Tue, 6 Dec 2011 03:44:48 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DWussa4eLXux for ; Tue, 6 Dec 2011 03:44:47 -0800 (PST) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 484C4429E26 for ; Tue, 6 Dec 2011 03:44:47 -0800 (PST) Received: by eekb57 with SMTP id b57so1595943eek.26 for ; Tue, 06 Dec 2011 03:44:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=message-id:content-type:mime-version:references:to:in-reply-to:from :subject:date; bh=NLOmGwuv61XBT5f0stzWWibhs7vqXfA+rP3UNEg5BXs=; b=AKftbS92LbJ1MquDT884578KStQNkZPhDqJovjG0GG43aUCjUjl/WA92oJI+RKZFDt sxyKRW18B6JZiruJva9lJ/QiGJ9OxN8CEF2tcW36esc83R3TPPVQ9n/yo8Gc5aTZ5+SU R/fZ4rg8LZEb+n9S2cuMF6/PF3NVD77CNfYf8= Received: by 10.14.9.165 with SMTP id 37mr2504189eet.106.1323171884420; Tue, 06 Dec 2011 03:44:44 -0800 (PST) Received: from localhost (dhcp-91-036.inf.ed.ac.uk. [129.215.91.36]) by mx.google.com with ESMTPS id j9sm34009254bkd.2.2011.12.06.03.44.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Dec 2011 03:44:42 -0800 (PST) Message-ID: <4ede002a.0922cc0a.207d.3460@mx.google.com> Content-Type: multipart/mixed; boundary="===============1876771212==" MIME-Version: 1.0 References: <1318198374-926-1-git-send-email-4winter@informatik.uni-hamburg.de> <1318198374-926-2-git-send-email-4winter@informatik.uni-hamburg.de> <4eddf2b1.4288980a.0b74.5557@mx.google.com> <87mxb66jit.fsf@SSpaeth.de> To: Sebastian Spaeth , Justus Winter <4winter@informatik.uni-hamburg.de>, notmuch@notmuchmail.org In-Reply-To: <87mxb66jit.fsf@SSpaeth.de> From: Patrick Totzke Subject: Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types Date: Tue, 06 Dec 2011 11:44:01 +0000 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Dec 2011 11:44:48 -0000 --===============1876771212== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable yes, i can. here's how to reproduce it on master: fire a `notmuch tag +TEST1 '*'`, which should block the db for a while. Then use the attached script to write to the index (this could make a nice second testcase for the bindings in case the test body is large enough). On master, the script fails like this: A Xapian exception occurred opening database: Unable to get write lock on /home/pazz/mail/.notmuch/xapian: already locked Segmentation fault When you reset using `git reset e92b438f46a3a` (to 4winters first patch), t= he script fails like this, which is the intended behaviour: A Xapian exception occurred opening database: Unable to get write lock on /= home/pazz/mail/.notmuch/xapian: already locked Traceback (most recent call last): File "./p.py", line 3, in db =3D notmuch.Database(mode=3Dnotmuch.Database.MODE.READ_WRITE) File "/usr/local/lib/python2.7/dist-packages/notmuch/database.py", line 1= 21, in __init__ self.open(path, mode) File "/usr/local/lib/python2.7/dist-packages/notmuch/database.py", line 1= 73, in open raise NotmuchError(message=3D"Could not open the specified database") notmuch.globals.NotmuchError: Could not open the specified database best, /p Quoting Sebastian Spaeth (2011-12-06 11:12:42) >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 > >Can you confirm that this only occurs with this patch and not without? >To be honest, I don't see how the patch would change things in a way >that make it throw XapianErrors that would not also occur before this >patch. > >Sebastian --===============1876771212== Content-Type: text/x-python; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="exceptiontest.py" #!/usr/bin/python import notmuch db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE) q_new = notmuch.Query(db, '*') for m in q_new.search_messages(): m.add_tag('TEST') --===============1876771212==--