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 963FA431FBC for ; Sat, 21 Nov 2009 14:27:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 Yj3nSLYXcA1n for ; Sat, 21 Nov 2009 14:26:59 -0800 (PST) Received: from vuizook.err.no (vuizook.err.no [85.19.221.46]) by olra.theworths.org (Postfix) with ESMTP id 556C0431FAE for ; Sat, 21 Nov 2009 14:26:59 -0800 (PST) Received: from cha92-13-88-165-248-19.fbx.proxad.net ([88.165.248.19] helo=jigen) by vuizook.err.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NByPt-0004Z3-U2; Sat, 21 Nov 2009 23:26:56 +0100 Received: from mh by jigen with local (Exim 4.69) (envelope-from ) id 1NByPH-0001IO-BN; Sat, 21 Nov 2009 23:26:15 +0100 Date: Sat, 21 Nov 2009 23:26:15 +0100 From: Mike Hommey To: Carl Worth Message-ID: <20091121222615.GA4925@glandium.org> References: <20091120132625.GA19246@glandium.org> <87y6m0lxym.fsf@yoom.home.cworth.org> <20091120210556.GA25421@glandium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091120210556.GA25421@glandium.org> X-GPG-Fingerprint: A479 A824 265C B2A5 FC54 8D1E DE4B DA2C 54FD 2A58 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] Segfault with weird Message-ID X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 22:27:01 -0000 On Fri, Nov 20, 2009 at 10:05:56PM +0100, Mike Hommey wrote: > On Fri, Nov 20, 2009 at 09:53:37PM +0100, Carl Worth wrote: > > On Fri, 20 Nov 2009 14:26:25 +0100, Mike Hommey wrote: > > > - for some reason, xapian doesn't want to add the document corresponding > > > to this old spam message: notmuch->xapian_db->add_document throws an > > > exception. > > > > I think things had just gone wrong long before then. > > I *did* see it throwing an exception from there. The sad thing is that I > can't reproduce the problem anymore :-/ > > > > I can provide the spam if necessary, or can continue debugging the issue > > > with some guidance. > > > > Thanks for providing it. It turns out that the giant Message-Id value > > wasn't causing the problem. Instead the message was corrupt by having a > > stray new line at the third line. (So GMime is seeing only the first two > > lines of headers). We *used* to have working code to detect this kind of > > file as "not an email" but again, this broke when we changed > > notmuch_message_get_header to return "" instead of NULL for missing > > headers. > > Interestingly, when I first traced on what message the crash was > happening, I did see notmuch having the message-id in the message_id > variable. I just was able to reproduce after starting over. header isn't "", and message_id is correctly filled. I can also confirm the exception is thrown from notmuch->xapian_db->add_document. > FWIW, that was using c05c3f1. With 3ae12b1, I get the following output: Error: A Xapian exception occurred. Halting processing. But I confirm there is no crash, now. Cheers, Mike