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 CA6BA429E25 for ; Sun, 4 Dec 2011 09:35:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 RHlxP5EbJO+A for ; Sun, 4 Dec 2011 09:35:46 -0800 (PST) Received: from mail-gy0-f181.google.com (mail-gy0-f181.google.com [209.85.160.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B9FB6429E21 for ; Sun, 4 Dec 2011 09:35:46 -0800 (PST) Received: by ghbg18 with SMTP id g18so5313407ghb.26 for ; Sun, 04 Dec 2011 09:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:content-transfer-encoding:user-agent; bh=dmAXVZWjj8D6bM3A56k/eXEHhrC1Y1Jw1Z0ASrjmF38=; b=xXmpUmFpxlFCxXopJjgnpwXTYnDun6Gry1S0+HKyTQAAUR3uc29lwz3WEQu9YgWVKX kkxIHcGSP5eEsC4NNjmOMrS2fL/ruuyaeNHqUK6l//9voUkDn1tffyxLlhdZFzCLUqmd BtIT8aDRsE4iKAQyL+GjqmRH4Cfs5PzqqbgWA= Received: by 10.236.76.136 with SMTP id b8mr8391564yhe.9.1323020145020; Sun, 04 Dec 2011 09:35:45 -0800 (PST) Received: from localhost ([187.35.51.138]) by mx.google.com with ESMTPS id j25sm26641984yhm.12.2011.12.04.09.35.42 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Dec 2011 09:35:43 -0800 (PST) Date: Sun, 4 Dec 2011 15:35:39 -0200 From: Kazuo Teramoto To: notmuch@notmuchmail.org Subject: notmuch seg. fault on _thread_add_message Message-ID: <20111204173539.GA4411@sophie> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Sun, 04 Dec 2011 17:35:47 -0000 Hi! Following an alot bug report [1] I created a small python script that causes a segmentation fault in notmuch: ======================================================================== #!/usr/bin/env python2 import notmuch db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE) q_new = notmuch.Query(db, 'tag:inbox') for t in q_new.search_threads(): pass ======================================================================== With gdb I get the following ======================================================================== GNU gdb (GDB) 7.3.1 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/bin/python2...(no debugging symbols found)...done. (gdb) run /tmp/test_notmuch.py Starting program: /usr/bin/python2 /tmp/test_notmuch.py [Thread debugging using libthread_db enabled] (process:16579): GLib-GObject-CRITICAL **: gtype.c:2715: You forgot to call g_type_init() (process:16579): GLib-GObject-CRITICAL **: g_object_newv: assertion `G_TYPE_IS_OBJECT (object_type)' failed (process:16579): GLib-GObject-CRITICAL **: gtype.c:2715: You forgot to call g_type_init() (process:16579): GLib-GObject-CRITICAL **: gtype.c:2715: You forgot to call g_type_init() (process:16579): GLib-GObject-CRITICAL **: g_object_newv: assertion `G_TYPE_IS_OBJECT (object_type)' failed Program received signal SIGSEGV, Segmentation fault. 0x00007ffff4deb86e in decode_addrspec (in=0x7fffffffac80) at internet-address.c:1459 1459 ((InternetAddressMailbox *) mailbox)->addr = addr->str; (gdb) bt #0 0x00007ffff4deb86e in decode_addrspec (in=0x7fffffffac80) at internet-address.c:1459 #1 0x00007ffff4debb1d in decode_address (in=0x7fffffffacf0) at internet-address.c:1558 #2 0x00007ffff4debe83 in internet_address_list_parse_string (str=0x7b1bc0 "Jani Nikula ") at internet-address.c:1692 #3 0x00007ffff503257b in _thread_add_message (thread=0x7d87f0, message=0x6d9480) at lib/thread.cc:236 #4 0x00007ffff5032d7b in _notmuch_thread_create (ctx=0x7cadd0, notmuch=0x615590, seed_doc_id=6515, match_set=0xe65528, sort=NOTMUCH_SORT_NEWEST_FIRST) at lib/thread.cc:470 #5 0x00007ffff503165b in notmuch_threads_get (threads=0xe65510) at lib/query.cc:392 #6 0x00007ffff6636e34 in ffi_call_unix64 () from /usr/lib/libffi.so.5 #7 0x00007ffff6636855 in ffi_call () from /usr/lib/libffi.so.5 #8 0x00007ffff684a1f7 in _ctypes_callproc () from /usr/lib/python2.7/lib-dynload/_ctypes.so #9 0x00007ffff6843a86 in ?? () from /usr/lib/python2.7/lib-dynload/_ctypes.so #10 0x00007ffff7a67683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0 #11 0x00007ffff7afcbda in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0 #12 0x00007ffff7aff8ef in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0 #13 0x00007ffff7a8c15c in function_call () from /usr/lib/libpython2.7.so.1.0 #14 0x00007ffff7a67683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0 #15 0x00007ffff7a762bf in instancemethod_call () from /usr/lib/libpython2.7.so.1.0 #16 0x00007ffff7a67683 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0 #17 0x00007ffff7abd002 in call_method () from /usr/lib/libpython2.7.so.1.0 #18 0x00007ffff7af9b1f in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0 #19 0x00007ffff7aff8ef in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0 #20 0x00007ffff7affa22 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.1.0 #21 0x00007ffff7b19d8c in run_mod () from /usr/lib/libpython2.7.so.1.0 #22 0x00007ffff7b1ab90 in PyRun_FileExFlags () from /usr/lib/libpython2.7.so.1.0 #23 0x00007ffff7b1b60f in PyRun_SimpleFileExFlags () from /usr/lib/libpython2.7.so.1.0 #24 0x00007ffff7b2cd25 in Py_Main () from /usr/lib/libpython2.7.so.1.0 #25 0x00007ffff749b14d in __libc_start_main () from /lib/libc.so.6 #26 0x00000000004006a1 in _start () (gdb) list 1454 g_string_free (addr, TRUE); 1455 return NULL; 1456 } 1457 1458 mailbox = g_object_newv (INTERNET_ADDRESS_TYPE_MAILBOX, 0, NULL); 1459 ((InternetAddressMailbox *) mailbox)->addr = addr->str; 1460 g_string_free (addr, FALSE); 1461 1462 return mailbox; 1463 } (gdb) info locals mailbox = 0x0 start = 0x7b1bcd "jani@nikula.org>" inptr = 0x7b1bdc ">" word = 0x7b1bcd "jani@nikula.org>" got_local = 1 addr = 0x8f8d20 len = 4 (gdb) frame 3 #3 0x00007ffff503257b in _thread_add_message (thread=0x7d87f0, message=0x6d9480) at lib/thread.cc:236 236 list = internet_address_list_parse_string (from); (gdb) l 231 xstrdup (notmuch_message_get_message_id (message)), 232 message); 233 234 from = notmuch_message_get_header (message, "from"); 235 if (from) 236 list = internet_address_list_parse_string (from); 237 238 if (list) { 239 address = internet_address_list_get_address (list, 0); 240 if (address) { (gdb) info locals list = 0x0 from = 0x7b1bc0 "Jani Nikula " tags = 0x7b2850 tag = 0x7fffffffad60 "\300\033{" address = 0x7b2850 author = 0x7fffffffafa8 "" clean_author = 0x6d9480 "\220Ua" (gdb) ======================================================================== Is the NULL on mailbox ok? This code is from gmime. I'm using gmime 2.4.28 and notmuch from git (0.10+58~g1c81e8f). Regards, Kazuo. [1]: https://github.com/pazz/alot/issues/142 -- “The journey is more important than the destination—that’s part of life, if you only live for getting to the end, you’re almost always disappointed.” Donald E. Knuth