Re: GLib-ERROR Mesage Running notmuch new
authorAustin Clements <amdragon@MIT.EDU>
Fri, 16 Dec 2011 21:38:15 +0000 (16:38 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:56 +0000 (09:40 -0800)
fb/6bed66a8914691f605f6fadabc66b0f3374d14 [new file with mode: 0644]

diff --git a/fb/6bed66a8914691f605f6fadabc66b0f3374d14 b/fb/6bed66a8914691f605f6fadabc66b0f3374d14
new file mode 100644 (file)
index 0000000..860a081
--- /dev/null
@@ -0,0 +1,144 @@
+Return-Path: <amdragon@mit.edu>\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 537B6429E21\r
+       for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 13:36:56 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 4sDArJ7zlP68 for <notmuch@notmuchmail.org>;\r
+       Fri, 16 Dec 2011 13:36:55 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
+       [18.7.68.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 85D79431FD0\r
+       for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 13:36:55 -0800 (PST)\r
+X-AuditID: 12074424-b7fae6d000000906-cf-4eebb9f6c43e\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 64.81.02310.6F9BBEE4; Fri, 16 Dec 2011 16:36:54 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id pBGLasrB030442; \r
+       Fri, 16 Dec 2011 16:36:54 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBGLaq4g017823\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Fri, 16 Dec 2011 16:36:53 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1RbfTr-0005Ki-7b; Fri, 16 Dec 2011 16:38:15 -0500\r
+Date: Fri, 16 Dec 2011 16:38:15 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Nathan Edson <nedson@nedson.net>\r
+Subject: Re: GLib-ERROR Mesage Running notmuch new\r
+Message-ID: <20111216213815.GD19427@mit.edu>\r
+References: <20111216200714.GA25170@newb> <20111216204529.GA19427@mit.edu>\r
+       <20111216211237.GA27860@newb> <20111216211734.GB19427@mit.edu>\r
+       <20111216212622.GA29172@newb>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <20111216212622.GA29172@newb>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmplleLIzCtJLcpLzFFi42IR4hRV1v2287WfwcOvwhYtu9exW1y/OZPZ\r
+       gcnj8sYZjB7PVt1iDmCK4rJJSc3JLEst0rdL4MpYt/0IY8EnmYqZO96zNTBuFe9i5OSQEDCR\r
+       mN9whB3CFpO4cG89WxcjF4eQwD5Gic2HG1kgnA2MEs+mHIVyTjJJrGz6xgjhLGGUmP7xIiNI\r
+       P4uAqsTc52fBbDYBDYlt+5eD2SICKhKb//SC7WAWkJb49ruZCcQWFjCSWHB3NiuIzSugI/Hm\r
+       93ZWiKHrGSUal3cxQyQEJU7OfMIC0awlcePfS6BmDrBBy/9xgIQ5gcK/pn9nA7FFgXZNObmN\r
+       bQKj0Cwk3bOQdM9C6F7AyLyKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI11wvN7NELzWldBMjKLTZ\r
+       XVR2MDYfUjrEKMDBqMTDm1n92k+INbGsuDL3EKMkB5OSKO/e7UAhvqT8lMqMxOKM+KLSnNTi\r
+       Q4wSHMxKIrxOVUA53pTEyqrUonyYlDQHi5I4b8Ouh35CAumJJanZqakFqUUwWRkODiUJXmtg\r
+       DAsJFqWmp1akZeaUIKSZODhBhvMADVcDqeEtLkjMLc5Mh8ifYlSUEufNB0kIgCQySvPgemGp\r
+       5xWjONArwrwaIFU8wLQF1/0KaDAT0ODtYS9ABpckIqSkGhhZUwqmynxKafRtqxH8bMrXLaP8\r
+       T0EgXLyZpyF5rvqJ9oQjB57qK9vlvp6gfzNus9rXK+eqbnytjN3L2VHqeXhpx6rYE19MOZvS\r
+       mIR8X8a1/95atSrstmdMkd+G52ZJBatUgmbUHGVc8W22JqfmMYfJ0Qopx6K3SUimyyyZlfE6\r
+       rXJD1vX7EkosxRmJhlrMRcWJAE5nSaEYAwAA\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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, 16 Dec 2011 21:36:56 -0000\r
+\r
+Quoth Nathan Edson on Dec 16 at  1:26 pm:\r
+> On 12/16/11, Austin Clements wrote:\r
+> > Quoth Nathan Edson on Dec 16 at  1:12 pm:\r
+> > > > Since you're now building notmuch from source, could you build it with\r
+> > > > make clean && make CFLAGS=-g and run it under gdb again to get a\r
+> > > > backtrace?  I don't understand why strace didn't show it opening any\r
+> > > > mail, but with debug symbols the backtrace should hopefully tell us\r
+> > > > that.\r
+> > > \r
+> > > First, thanks for your help!  Perhaps I am making progress...\r
+> > > \r
+> > > Here is what I get:\r
+> > > \r
+> > > yabai@newb:~$ gdb --args notmuch new\r
+> > > GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2\r
+> > > Copyright (C) 2010 Free Software Foundation, Inc.\r
+> > > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r
+> > > This is free software: you are free to change and redistribute it.\r
+> > > There is NO WARRANTY, to the extent permitted by law.  Type "show copying"\r
+> > > and "show warranty" for details.\r
+> > > This GDB was configured as "i686-linux-gnu".\r
+> > > For bug reporting instructions, please see:\r
+> > > <http://www.gnu.org/software/gdb/bugs/>...\r
+> > > Reading symbols from /usr/local/bin/notmuch...done.\r
+> > > (gdb) run\r
+> > > Starting program: /usr/local/bin/notmuch new\r
+> > > [Thread debugging using libthread_db enabled]\r
+> > > \r
+> > > GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to allocate 2147483648 bytes\r
+> > > aborting...\r
+> > > \r
+> > > Program received signal SIGABRT, Aborted.\r
+> > > 0xb7fe1424 in __kernel_vsyscall ()\r
+> > > (gdb) bt\r
+> > > #0  0xb7fe1424 in __kernel_vsyscall ()\r
+> > > #1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6\r
+> > > #2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6\r
+> > > #3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0\r
+> > > #4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0\r
+> > > #5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0\r
+> > > #6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0\r
+> > > #7  0xb7e50d5d in g_array_append_vals () from /lib/i386-linux-gnu/libglib-2.0.so.0\r
+> > > #8  0xb7e520c0 in g_byte_array_append () from /lib/i386-linux-gnu/libglib-2.0.so.0\r
+> > > #9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2\r
+> > > #10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2\r
+> > > #11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2\r
+> > > #12 0xb7f829ea in g_mime_parser_construct_message () from /usr/lib/libgmime-2.4.so.2\r
+> > > #13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, \r
+> > >     filename=0x80d0600 "/home/yabai/Mail/old.mail") at lib/index.cc:437\r
+> > > #14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, \r
+> > >     filename=0x80d0600 "/home/yabai/Mail/old.mail", message_ret=0xbffff414) at lib/database.cc:1734\r
+> > \r
+> > Ah!  It did show up in the strace.  /home/yabai/Mail/old.mail appears\r
+> > to be the offending file.  What's in it?\r
+> \r
+> This is my file full of old mail.  I believe it is in mbox format. It contains approximately 40K emails...could the format of this file affect things?  Orginally, this mail was exported from Apple Mail.\r
+\r
+notmuch doesn't support mbox files, but an mbox file looks enough like\r
+a maildir message that notmuch will *try* to index it (but as a\r
+single, gigantic message).  This is certainly the cause of the\r
+failure.  The immediate solution is to move this file out of the tree\r
+you're indexing with notmuch.\r
+\r
+Still, notmuch should fail more gracefully and you are probably\r
+hitting a real gmime bug (given that it's trying to allocate\r
+(unsigned)-1 bytes of memory).  How big is old.mail?\r