From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 8381C6DE1DE7 for ; Thu, 23 Feb 2017 03:59:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.005 X-Spam-Level: X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5 tests=[AWL=0.006, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yRUOYumQOd_a for ; Thu, 23 Feb 2017 03:59:57 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id CBF576DE1DD9 for ; Thu, 23 Feb 2017 03:59:56 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1cgs3H-0003b1-18; Thu, 23 Feb 2017 06:59:15 -0500 Received: (nullmailer pid 21251 invoked by uid 1000); Thu, 23 Feb 2017 11:59:51 -0000 From: David Bremner To: Gaute Hope , notmuch@notmuchmail.org Subject: Re: add status value to _notmuch_message_ensure_metadata In-Reply-To: <1487835689.bijpoe2rtt.astroid@strange.none> References: <20170218144551.22925-1-david@tethera.net> <1487582192.57s86yczcg.astroid@strange.none> <1487583702.5ghl7kdkaw.astroid@strange.none> <874lzl4tah.fsf@tethera.net> <1487835689.bijpoe2rtt.astroid@strange.none> Date: Thu, 23 Feb 2017 07:59:51 -0400 Message-ID: <87y3wx2k3s.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Thu, 23 Feb 2017 11:59:57 -0000 Gaute Hope writes: > Ideally if the error could be caught in `notmuch_threads_valid` or > `notmuch_threads_get_thread` I think that would be the clearest, _st > versions would be nice. We can't really control when the exceptions happen, due to lazily reading data from disk. Looking more carefully at the backtrace, the problem is actually inside the library, in particular some descendent of notmuch_threads_get is not properly handling the error from notmuch_message_get_tags. > As I mentioned in > id:1487582192.57s86yczcg.astroid@strange.none it seems that at later > arbitrary iterations (without re-loading the threads object) the > functions return valid data (even `notmuch_thread_get_tags` does). Can > this data be trusted? I feel like this should all be invalid at this > point. > I guess that's up to Xapian to decide, but I imagine anything after the first exception is "undefined behaviour". Data is cached in memory per message in the notmuch layer, so in principle later calls that don't actually reach xapian could succeed.