Re: [notmuch] Segfault with weird Message-ID
authorMike Hommey <mh+notmuch@glandium.org>
Fri, 20 Nov 2009 21:05:56 +0000 (22:05 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:37 +0000 (09:35 -0800)
fc/297f21685d166b973e4429df73465d7e10c9b3 [new file with mode: 0644]

diff --git a/fc/297f21685d166b973e4429df73465d7e10c9b3 b/fc/297f21685d166b973e4429df73465d7e10c9b3
new file mode 100644 (file)
index 0000000..710ec37
--- /dev/null
@@ -0,0 +1,83 @@
+Return-Path: <mh@glandium.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 2FCD0431FBF\r
+       for <notmuch@notmuchmail.org>; Fri, 20 Nov 2009 13:06:37 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Zp3kZn4AsdNM for <notmuch@notmuchmail.org>;\r
+       Fri, 20 Nov 2009 13:06:36 -0800 (PST)\r
+Received: from vuizook.err.no (vuizook.err.no [85.19.221.46])\r
+       by olra.theworths.org (Postfix) with ESMTP id 75632431FBC\r
+       for <notmuch@notmuchmail.org>; Fri, 20 Nov 2009 13:06:36 -0800 (PST)\r
+Received: from cha92-13-88-165-248-19.fbx.proxad.net ([88.165.248.19]\r
+       helo=jigen)\r
+       by vuizook.err.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)\r
+       (Exim 4.69) (envelope-from <mh@glandium.org>)\r
+       id 1NBagZ-0007TC-JH; Fri, 20 Nov 2009 22:06:34 +0100\r
+Received: from mh by jigen with local (Exim 4.69) (envelope-from <mh@jigen>)\r
+       id 1NBag0-0006is-OP; Fri, 20 Nov 2009 22:05:56 +0100\r
+Date: Fri, 20 Nov 2009 22:05:56 +0100\r
+From: Mike Hommey <mh+notmuch@glandium.org>\r
+To: Carl Worth <cworth@cworth.org>\r
+Message-ID: <20091120210556.GA25421@glandium.org>\r
+References: <20091120132625.GA19246@glandium.org>\r
+       <87y6m0lxym.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87y6m0lxym.fsf@yoom.home.cworth.org>\r
+X-GPG-Fingerprint: A479 A824 265C B2A5 FC54  8D1E DE4B DA2C 54FD 2A58\r
+User-Agent: Mutt/1.5.20 (2009-06-14)\r
+Cc: notmuch@notmuchmail.org\r
+Subject: Re: [notmuch] Segfault with weird Message-ID\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 20 Nov 2009 21:06:37 -0000\r
+\r
+On Fri, Nov 20, 2009 at 09:53:37PM +0100, Carl Worth wrote:\r
+> On Fri, 20 Nov 2009 14:26:25 +0100, Mike Hommey <mh+notmuch@glandium.org> wrote:\r
+> > - for some reason, xapian doesn't want to add the document corresponding\r
+> >   to this old spam message: notmuch->xapian_db->add_document throws an\r
+> >   exception.\r
+> \r
+> I think things had just gone wrong long before then.\r
+\r
+I *did* see it throwing an exception from there. The sad thing is that I\r
+can't reproduce the problem anymore :-/\r
+\r
+> > I can provide the spam if necessary, or can continue debugging the issue\r
+> > with some guidance.\r
+> \r
+> Thanks for providing it. It turns out that the giant Message-Id value\r
+> wasn't causing the problem. Instead the message was corrupt by having a\r
+> stray new line at the third line. (So GMime is seeing only the first two\r
+> lines of headers). We *used* to have working code to detect this kind of\r
+> file as "not an email" but again, this broke when we changed\r
+> notmuch_message_get_header to return "" instead of NULL for missing\r
+> headers.\r
+\r
+Interestingly, when I first traced on what message the crash was\r
+happening, I did see notmuch having the message-id in the message_id\r
+variable.\r
+\r
+FWIW, that was using c05c3f1.\r
+\r
+I'll see if I can reproduce my segfault again when starting from scratch\r
+again, and will also give a try to your patches.\r
+\r
+Cheers,\r
+\r
+Mike\r