--- /dev/null
+Return-Path: <david@tethera.net>\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 9A6E16DE17EE\r
+ for <notmuch@notmuchmail.org>; Mon, 18 Jan 2016 04:25:11 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.309\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.309 tagged_above=-999 required=5 tests=[AWL=0.242,\r
+ RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001] 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 kXW4jvx62y_V for <notmuch@notmuchmail.org>;\r
+ Mon, 18 Jan 2016 04:25:07 -0800 (PST)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 166956DE17DC\r
+ for <notmuch@notmuchmail.org>; Mon, 18 Jan 2016 04:25:06 -0800 (PST)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1aL8rB-0004AY-4E; Mon, 18 Jan 2016 07:24:25 -0500\r
+Received: (nullmailer pid 29568 invoked by uid 1000);\r
+ Mon, 18 Jan 2016 12:25:00 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Gaute Hope <eg@gaute.vetsj.com>, notmuch@notmuchmail.org\r
+Subject: Re: talloc_abort in notmuch_thread_get_tags () when db has been\r
+ modified\r
+In-Reply-To: <1453106256-astroid-0-0ubhau8qws-26019@strange>\r
+References: <1453106256-astroid-0-0ubhau8qws-26019@strange>\r
+User-Agent: Notmuch/0.21+26~g9404723 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Mon, 18 Jan 2016 08:25:00 -0400\r
+Message-ID: <87k2n72hyb.fsf@zancas.localnet>\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: Mon, 18 Jan 2016 12:25:11 -0000\r
+\r
+Gaute Hope <eg@gaute.vetsj.com> writes:\r
+\r
+> Hi,\r
+>\r
+> a user of astroid [0] ran into a issue [1] (full trace at issue) where\r
+> reading a long query causes a talloc_abort in notmuch_thread_get_tags\r
+> (). 'notmuch new' is running at the same time, and most likely a thread\r
+> in the query has been modified since the query was done. Note that a\r
+> notmuch_thread_get_authors () call returns NULL without causing a full\r
+> crash. The code causing the crash is:\r
+>\r
+> ```\r
+> for (tags = notmuch_thread_get_tags (nm_thread);\r
+> notmuch_tags_valid (tags);\r
+> notmuch_tags_move_to_next (tags))\r
+> {\r
+> tag = notmuch_tags_get (tags); // tag belongs to tags\r
+> }\r
+>\r
+> // or db.cc:508 in astroid/src.\r
+> ```\r
+>\r
+\r
+The most likely cause of such a crash looks to me like nm_thread is NULL\r
+or corrupted when passed in to get_tags. It's used without checking as a\r
+talloc context, and that call to talloc never returns.\r