From: David Bremner Date: Fri, 6 Sep 2013 00:17:20 +0000 (+2100) Subject: Re: segfault with xapian 1.3.1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7e70ee7d3d54d5f3dad42830046e158399a8e140;p=notmuch-archives.git Re: segfault with xapian 1.3.1 --- diff --git a/90/86346ea7ece7216862b43f6365de0623df997e b/90/86346ea7ece7216862b43f6365de0623df997e new file mode 100644 index 000000000..4a74a41b2 --- /dev/null +++ b/90/86346ea7ece7216862b43f6365de0623df997e @@ -0,0 +1,246 @@ +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 2BAF7429E2E + for ; Thu, 5 Sep 2013 17:17:35 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 KA6-eqvOA4UA for ; + Thu, 5 Sep 2013 17:17:29 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 9CCCA429E29 + for ; Thu, 5 Sep 2013 17:17:29 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1VHjjo-0001kb-G1; Thu, 05 Sep 2013 21:17:24 -0300 +Received: (nullmailer pid 30738 invoked by uid 1000); Fri, 06 Sep 2013 + 00:17:20 -0000 +From: David Bremner +To: "Jason A. Donenfeld" , notmuch ML + +Subject: Re: segfault with xapian 1.3.1 +In-Reply-To: + +References: + +User-Agent: Notmuch/0.16+37~g9701e9c (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Thu, 05 Sep 2013 21:17:20 -0300 +Message-ID: <87txhypzvz.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="=-=-=" +Cc: Olly Betts +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: Fri, 06 Sep 2013 00:17:35 -0000 + +--=-=-= +Content-Type: text/plain + +"Jason A. Donenfeld" writes: + +> As discussed on IRC, notmuch segfaults with 1.3.1 but not with 1.2.5 on +> notmuch-new: +> +> Program received signal SIGSEGV, Segmentation fault. +> 0x00007ffff75a5367 in Xapian::TermIterator::skip_to(std::string const&) () +> from /usr/lib64/libxapian-1.3.so.1 +> (gdb) bt + +I managed to duplicate this problem on Debian testing by rebuilding +Olly's packages (https://launchpad.net/~ojwb/+archive/xapian-1.3) for +sid and running the following script in the ./test subdirectory + +,---- +| test_description='"notmuch new" segfault' +| . test-lib.sh +| +| generate_message +| gdb notmuch < +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-linux-gnu". +For bug reporting instructions, please see: +... +Reading symbols from /home/bremner/software/upstream/notmuch/notmuch...done. +(gdb) Starting program: /home/bremner/software/upstream/notmuch/notmuch new +[Thread debugging using libthread_db enabled] +Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". + +Program received signal SIGSEGV, Segmentation fault. +0x00007ffff709ba37 in Xapian::TermIterator::skip_to (this=0x7fffffffdc10, term=...) + at ../api/termiterator.cc:145 +(gdb) #0 0x00007ffff709ba37 in Xapian::TermIterator::skip_to (this=0x7fffffffdc10, + term=...) at ../api/termiterator.cc:145 +No locals. +#1 0x0000000000422959 in _notmuch_message_get_term (message=0x6833e0, i=..., + end=..., prefix=0x434644 "XREPLYTO") at lib/message.cc:271 + prefix_len = 8 + value = 0x6810a0 "\001" + term = {static npos = , + _M_dataplus = {> = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0x67eaa8 "XFDIRENTRY2:msg-001"}} +#2 0x0000000000422d1b in _notmuch_message_ensure_metadata (message=0x6833e0) + at lib/message.cc:347 + i = {internal = 0x0} + end = {internal = 0x0} + thread_prefix = 0x4346a0 "G" + replyto_prefix = 0x434644 "XREPLYTO" + __PRETTY_FUNCTION__ = "void _notmuch_message_ensure_metadata(notmuch_message_t*)" + tag_prefix = 0x4346a6 "K" + id_prefix = 0x4346ae "Q" + filename_prefix = 0x434670 "XFDIRENTRY" +#3 0x0000000000422f18 in notmuch_message_get_message_id (message=0x6833e0) + at lib/message.cc:390 +No locals. +#4 0x000000000041f14e in _notmuch_database_link_message (notmuch=0x666240, + message=0x6833e0, message_file=0x666140) at lib/database.cc:1676 + status = NOTMUCH_STATUS_SUCCESS + stored_id = {static npos = , + _M_dataplus = {> = {<__gnu_cxx::new_allocator> = {}, }, + _M_p = 0x7ffff702c3d8 ""}} + message_id = 0x6832c0 "Tmail" + thread_id = 0x0 + metadata_key = 0x67ea80 "" +#5 0x000000000041f769 in notmuch_database_add_message (notmuch=0x666240, + filename=0x666090 "/home/bremner/software/upstream/notmuch/test/tmp.backtrace/mail/msg-001", message_ret=0x7fffffffdee8) at lib/database.cc:1837 + message_file = 0x666140 + message = 0x6833e0 + private_status = NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND + from = 0x67ee00 "Notmuch Test Suite " + ret = NOTMUCH_STATUS_SUCCESS + ret2 = NOTMUCH_STATUS_SUCCESS + to = 0x67eec0 "Notmuch Test Suite " + message_id = 0x67eaa0 "\001" + date = 0x0 + header = 0x67ef10 "" + subject = 0x6823c0 "Test message #1" +#6 0x000000000040e91c in add_files (notmuch=0x666240, + path=0x664a80 "/home/bremner/software/upstream/notmuch/test/tmp.backtrace/mail", state=0x7fffffffe1d0) at notmuch-new.c:507 + dir = 0x0 + entry = 0x665d50 + next = 0x666090 "/home/bremner/software/upstream/notmuch/test/tmp.backtrace/mail/msg-001" + fs_mtime = 1378426382 + db_mtime = 0 + status = NOTMUCH_STATUS_SUCCESS + ret = NOTMUCH_STATUS_SUCCESS + message = 0x0 + fs_entries = 0x6811d0 + i = 2 + num_fs_entries = 4 + entry_type = 32768 + directory = 0x0 + db_files = 0x0 + db_subdirs = 0x0 + stat_time = 1378426382 + st = {st_dev = 65031, st_ino = 3451162, st_nlink = 3, st_mode = 16877, + st_uid = 1000, st_gid = 1000, __pad0 = 0, st_rdev = 0, st_size = 4096, + st_blksize = 4096, st_blocks = 8, st_atim = {tv_sec = 1378426382, + tv_nsec = 0}, st_mtim = {tv_sec = 1378426382, tv_nsec = 0}, st_ctim = { + tv_sec = 1378426382, tv_nsec = 0}, __unused = {0, 0, 0}} + is_maildir = 0 + tag = 0x7fffffffe480 +#7 0x000000000040fa12 in notmuch_new_command (config=0x661eb0, argc=1, + argv=0x7fffffffe490) at notmuch-new.c:949 + notmuch = 0x666240 + add_files_state = {output_is_a_tty = 0, verbose = 0, debug = 0, + new_tags = 0x665ef0, new_tags_length = 2, new_ignore = 0x665fe0, + new_ignore_length = 0, total_files = 1, processed_files = 1, + added_messages = 0, removed_messages = 0, renamed_messages = 0, + tv_start = {tv_sec = 1378426382, tv_usec = 768704}, + removed_files = 0x681a10, removed_directories = 0x665d30, + directory_mtimes = 0x665c00, synchronize_flags = 1} + elapsed = 2.1219957909652723e-314 + tv_now = {tv_sec = 0, tv_usec = 0} + tv_start = {tv_sec = 0, tv_usec = 140737488348288} + ret = 0 + st = {st_dev = 4294967295, st_ino = 140737353968080, + st_nlink = 140737328394192, st_mode = 4160580048, st_uid = 32767, + st_gid = 160, __pad0 = 0, st_rdev = 67, st_size = 128, st_blksize = 0, + st_blocks = 0, st_atim = {tv_sec = 0, tv_nsec = 0}, st_mtim = { + tv_sec = 210453397510, tv_nsec = 472446402651}, st_ctim = { + tv_sec = 532575944823, tv_nsec = 0}, __unused = {6546568, 0, 6548008}} + db_path = 0x664a80 "/home/bremner/software/upstream/notmuch/test/tmp.backtrace/mail" + dot_notmuch_path = 0x0 + action = {__sigaction_handler = {sa_handler = 0x40db03 , + sa_sigaction = 0x40db03 }, sa_mask = {__val = { + 0 }}, sa_flags = 268435456, sa_restorer = 0x0} + f = 0x7fffffffe480 + opt_index = 1 + i = 32767 + timer_is_active = 0 + no_hooks = 0 + options = {{opt_type = NOTMUCH_OPT_BOOLEAN, output_var = 0x7fffffffe1d4, + name = 0x432339 "verbose", arg_id = 118, keywords = 0x0}, { + opt_type = NOTMUCH_OPT_BOOLEAN, output_var = 0x7fffffffe1d8, + name = 0x432341 "debug", arg_id = 100, keywords = 0x0}, { + opt_type = NOTMUCH_OPT_BOOLEAN, output_var = 0x7fffffffe07c, + name = 0x432347 "no-hooks", arg_id = 110, keywords = 0x0}, { + opt_type = NOTMUCH_OPT_END, output_var = 0x0, name = 0x0, arg_id = 0, + keywords = 0x0}} +#8 0x000000000040a519 in main (argc=2, argv=0x7fffffffe488) at notmuch.c:303 + local = 0x64b090 + talloc_report = 0x42fcfd <__libc_csu_init+93> "H\203\303\001H9\353u\352H\213\\$\bH\213l$\020L\213d$\030L\213l$ L\213t$(L\213|$0H\203\304\070\303\017\037\200" + command_name = 0x7fffffffe7d1 "new" + command = 0x63ee00 + config_file_name = 0x0 + config = 0x661eb0 + print_help = 0 + print_version = 0 + opt_index = 1 + ret = 0 + options = {{opt_type = NOTMUCH_OPT_BOOLEAN, output_var = 0x7fffffffe354, + name = 0x4303a7 "help", arg_id = 104, keywords = 0x0}, { + opt_type = NOTMUCH_OPT_BOOLEAN, output_var = 0x7fffffffe350, + name = 0x430c99 "version", arg_id = 118, keywords = 0x0}, { + opt_type = NOTMUCH_OPT_STRING, output_var = 0x7fffffffe358, + name = 0x430368 "config", arg_id = 99, keywords = 0x0}, { + opt_type = NOTMUCH_OPT_END, output_var = 0x0, name = 0x0, arg_id = 0, + keywords = 0x0}} +(gdb) quit +A debugging session is active. + + Inferior 1 [process 30499] will be killed. + +Quit anyway? (y or n) [answered Y; input not from terminal] + FATAL + +Unexpected exit while executing ./backtrace.sh. Exit code 0. + +--=-=-=--