--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 177266DE020D\r
+ for <notmuch@notmuchmail.org>; Thu, 18 Feb 2016 13:34:58 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.189\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.189 tagged_above=-999 required=5 tests=[AWL=-0.566,\r
+ DATE_IN_PAST_06_12=1.103, SPF_NEUTRAL=0.652] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id a_YrTmgYDpF9 for <notmuch@notmuchmail.org>;\r
+ Thu, 18 Feb 2016 13:34:56 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id A09386DE01CA\r
+ for <notmuch@notmuchmail.org>; Thu, 18 Feb 2016 13:34:55 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 819F71000CA;\r
+ Thu, 18 Feb 2016 16:30:34 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>, Eric J <eric@deptj.eu>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: Lost updates to Notmuch database\r
+In-Reply-To: <871t8avnhq.fsf@zancas.localnet>\r
+References: <337393ce5e2484d64f837a44b2c4f2ea32f91295-NM@bruno.deptj.eu>\r
+ <871t8avnhq.fsf@zancas.localnet>\r
+User-Agent: Notmuch/0.21+70~g0bc8909 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Thu, 18 Feb 2016 16:30:34 +0200\r
+Message-ID: <m27fi2nl9x.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 18 Feb 2016 21:34:58 -0000\r
+\r
+On Thu, Feb 18 2016, David Bremner <david@tethera.net> wrote:\r
+\r
+> Eric J <eric@deptj.eu> writes:\r
+>\r
+>> However, if I do it twice, in different processes, at the same time, one\r
+>> file is added and tagged properly, the other is not (totally unfindable\r
+>> by notmuch search). Neither process reports any error, and they both log\r
+>> their actions normally. Actually a third simultaneous process also fails\r
+>> to leave any result in the database.\r
+>\r
+> It should be impossible for more than one process to open a Xapian\r
+> database for writing at the same time. So if the processes are really\r
+> running in parallel, you should be getting error codes from the later\r
+> calls to notmuch_database_open{_verbose}. You claim that's not\r
+> happening, which is puzzling. Maybe you can try to duplicate your\r
+> problem with a tiny C program.\r
+\r
+In addition to that (or even before), you could\r
+\r
+1) be able to reproduce the problem\r
+2) try to reproduce it prefixing the command with ltrace -tt\r
+3) examine carefully the ltrace logs to figure out where the proble lies\r
+\r
+Tomi\r
+\r
+Hmm, Interestingly when I run\r
+\r
+LD_LIBRARY_PATH=~/vc/ext/notmuch/lib ltrace -f -tt ~/vc/ext/notmuch/notmuch-shared new\r
+\r
+I did not see any Xapian references, but when I did\r
+\r
+ltrace -f -tt ~/vc/ext/notmuch/notmuch new\r
+\r
+I did. Interestingly when using libnotmuch.so.4 the xapian interface\r
+is hidden (is it baked inside ~/vc/ext/notmuch/lib/libnotmuch.so.4.3.0 :O)\r
+\r
+\r