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 3CBD8431FB6 for ; Fri, 28 Jan 2011 02:18:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 xX2jyeJYkMdb for ; Fri, 28 Jan 2011 02:18:50 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 1B397431FB5 for ; Fri, 28 Jan 2011 02:18:50 -0800 (PST) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 1253119F3316; Fri, 28 Jan 2011 11:18:49 +0100 (CET) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id OAh27e6I705U; Fri, 28 Jan 2011 11:18:47 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 7D14519F3305; Fri, 28 Jan 2011 11:18:47 +0100 (CET) Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 4C6A915C031; Fri, 28 Jan 2011 11:18:47 +0100 (CET) Received: from wsh by steelpick.2x.cz with local (Exim 4.72) (envelope-from ) id 1PilPj-0003Hh-09; Fri, 28 Jan 2011 11:18:47 +0100 From: Michal Sojka To: notmuch@notmuchmail.org Subject: Xapian locking errors with custom query parser User-Agent: Notmuch/0.5-87-g9705d00 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Fri, 28 Jan 2011 11:18:46 +0100 Message-ID: <87d3nhe3g9.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Austin Clements 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 10:18:52 -0000 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