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 2FCD0431FBF for ; Fri, 20 Nov 2009 13:06:37 -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 Zp3kZn4AsdNM for ; Fri, 20 Nov 2009 13:06:36 -0800 (PST) Received: from vuizook.err.no (vuizook.err.no [85.19.221.46]) by olra.theworths.org (Postfix) with ESMTP id 75632431FBC for ; Fri, 20 Nov 2009 13:06:36 -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 1NBagZ-0007TC-JH; Fri, 20 Nov 2009 22:06:34 +0100 Received: from mh by jigen with local (Exim 4.69) (envelope-from ) id 1NBag0-0006is-OP; Fri, 20 Nov 2009 22:05:56 +0100 Date: Fri, 20 Nov 2009 22:05:56 +0100 From: Mike Hommey To: Carl Worth Message-ID: <20091120210556.GA25421@glandium.org> References: <20091120132625.GA19246@glandium.org> <87y6m0lxym.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y6m0lxym.fsf@yoom.home.cworth.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: Fri, 20 Nov 2009 21:06:37 -0000 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. FWIW, that was using c05c3f1. I'll see if I can reproduce my segfault again when starting from scratch again, and will also give a try to your patches. Cheers, Mike