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 7BC7B431FB6 for ; Fri, 28 Jan 2011 08:35:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.698 X-Spam-Level: X-Spam-Status: No, score=-0.698 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=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 YQ8KLddUJvuA for ; Fri, 28 Jan 2011 08:35:06 -0800 (PST) Received: from mail-vw0-f53.google.com (mail-vw0-f53.google.com [209.85.212.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 7929A431FB5 for ; Fri, 28 Jan 2011 08:35:06 -0800 (PST) Received: by vws8 with SMTP id 8so1299179vws.26 for ; Fri, 28 Jan 2011 08:35:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=3XBKkErOTfs11dGXuzaBWWgyfgh3B+fBA/kHEbj+bJU=; b=sm9twBYvjoTfULT4bfdYLEEaKdoAqkfmmQ7Zs5n2nEoqlcdSNDYE7tsWATUExdS4EW m0Z/UpPYs4AwL3sQ6mGPsI1JgQALl52P2J8ZOsZY5xWT2Aqub6nLLWAcZq6f22/Fm9Yo jGKFORst4hKE1ygO/u2KhlHOtnVLHOis5AXPU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=bQ1LeVrHyBP4SVoS8fT3GPxjkbVOSU8KW80prwaKc/9bJ2Uhf9a8phKVyA2dcWrTsH VWVS1JbiiXINF8sHs9ND+UluH3juKciuTyW0u57db/eZD5apyRPFD2gxctQE1VbQ51gI e7ljifzLe0VG9aXmnIfZ9M7G8Wjir+N1q+HEY= MIME-Version: 1.0 Received: by 10.229.90.200 with SMTP id j8mr371587qcm.268.1296232503187; Fri, 28 Jan 2011 08:35:03 -0800 (PST) Sender: amdragon@gmail.com Received: by 10.229.97.143 with HTTP; Fri, 28 Jan 2011 08:35:03 -0800 (PST) In-Reply-To: <87d3nhe3g9.fsf@steelpick.2x.cz> References: <87d3nhe3g9.fsf@steelpick.2x.cz> Date: Fri, 28 Jan 2011 11:35:03 -0500 X-Google-Sender-Auth: OvtkSP21LeXb3LPBBwXljMNq7vs Message-ID: Subject: Re: Xapian locking errors with custom query parser From: Austin Clements To: Michal Sojka Content-Type: multipart/alternative; boundary=001636aa2b74e61969049aeaa589 Cc: notmuch@notmuchmail.org 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: Fri, 28 Jan 2011 16:35:07 -0000 --001636aa2b74e61969049aeaa589 Content-Type: text/plain; charset=ISO-8859-1 This should most definitely not happen. I'll look in to it. On Fri, Jan 28, 2011 at 5:18 AM, Michal Sojka wrote: > Hi Austin, > > when I switched to using your custom query parser I started experiencing > "Unable to get write lock" errors when I run my initial tagging script. > I thought that this was because I run the script while processing the > mail in Emacs, but today I realized that this happens even without Emacs > and that it can be reproduced by a simple command below. > > i=0; while notmuch tag +xxx tag:whatever; do i=$((i+1)); echo $i; done > > It seems that sometimes the unlocking of the Xapian database happens > somewhat lazily and when the subsequent command starts I get: > > A Xapian exception occurred opening database: Unable to get write lock on > /home/wsh/mail/.notmuch/xapian: already locked > > This happens almost regularly after a few iterations of the loop even if > the query doesn't match anything. > > Do you have an idea what may cause this? > > Can you reproduce this on your system? > > The version I use can be obtained from > > git://rtime.felk.cvut.cz/notmuch.git custom-query-pasrser > > Thanks > -Michal > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch > --001636aa2b74e61969049aeaa589 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This should most definitely not happen. =A0I'll look in to it.

<= div class=3D"gmail_quote">On Fri, Jan 28, 2011 at 5:18 AM, Michal Sojka <sojkam1@fel.cvut.= cz> wrote:
Hi Austin,

when I switched to using your custom query parser I started experiencing "Unable to get write lock" errors when I run my initial tagging s= cript.
I thought that this was because I run the script while processing the
mail in Emacs, but today I realized that this happens even without Emacs and that it can be reproduced by a simple command below.

i=3D0; while notmuch tag +xxx tag:whatever; do i=3D$((i+1)); echo $i; done<= br>
It seems that sometimes the unlocking of the Xapian database happens
somewhat lazily and when the subsequent command starts I get:

A Xapian exception occurred opening database: Unable to get write lock on /= home/wsh/mail/.notmuch/xapian: already locked

This happens almost regularly after a few iterations of the loop even if the query doesn't match anything.

Do you have an idea what may cause this?

Can you reproduce this on your system?

The version I use can be obtained from

=A0git://rtime.felk.cvut.cz/notmuch.git custom-query-pasrser

Thanks
-Michal
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch

--001636aa2b74e61969049aeaa589--