From: Adrian Perez de Castro <aperez@igalia.com>
To: notmuch@notmuchmail.org
Subject: Re: Segfault searching for tags
Date: Thu, 19 Nov 2009 16:45:43 +0100 [thread overview]
Message-ID: <20091119164543.25e7afe5@hikari> (raw)
In-Reply-To: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3328 bytes --]
On Wed, 18 Nov 2009 12:00:10 -0600, Jeffrey wrote:
> Getting the following segfault with 306635c2 on Fedora 12. Seems to
> be happening with any 'tag:' search that returns results. For
> example, 'notmuch search tag:inbox' and 'notmuch search tag:unread'
> segfault but 'notmuch search tag:nosuchtag', 'notmuch search
> subject:logwatch' and 'notmuch search video' seem to work fine.
>
> Core was generated by `/usr/bin/notmuch search --sort=oldest-first tag:inbox'.
> Program terminated with signal 11, Segmentation fault.
> \#0 Xapian::TermIterator::operator* (this=<value optimized out>)
> at api/omtermlistiterator.cc:78
> 78 RETURN(internal->get_termname());
> Current language: auto
> The current source language is "auto; currently c++".
I have hit what I believe is exactly the same problem. In my case, some
results are printed when I execute "notmuch search tag:inbox", and then
the program crashes in the same exact place.
The thing is that in notmuch_message_get_in_reply_to(), line 288, a NULL
instance of Xapian::TermIterator is dereferenced. In my particular case,
the culpript is a cache file of Claws-Mail, as seen in the following GDB
session:
Program received signal SIGSEGV, Segmentation fault.
Xapian::TermIterator::operator* (this=<value optimized out>) at api/omtermlistiterator.cc:78
78 RETURN(internal->get_termname()); Current language: auto
The current source language is "auto; currently c++".
(gdb) bt
#0 Xapian::TermIterator::operator* (this=<value optimized out>) at api/omtermlistiterator.cc:78
#1 0x000000000040f611 in _notmuch_message_get_in_reply_to(message=0x76dcd0) at lib/message.cc:288
#2 0x0000000000412030 in _resolve_thread_relationships (thread=0x6a8b80) at lib/thread.cc:157
#3 0x0000000000412454 in _notmuch_thread_create (ctx=0x65f1b0, notmuch=0x62d320, thread_id= 0x765530 "01b17ddb4479a0dc0b416bb63b92c43d", query_string=0x65f220 "tag:inbox") at lib/thread.cc:285
#4 0x0000000000411982 in notmuch_query_search_threads (query=0x65f1b0, first=100, max_threads=-1) at lib/query.cc:218
#5 0x000000000040924d in do_search_threads (ctx=0x61f140, query=0x65f1b0, sort=NOTMUCH_SORT_NEWEST_FIRST, first=100, max_threads=-1) at notmuch-search.c:40
#6 0x00000000004097ef in notmuch_search_command (ctx=0x61f140, argc=1, argv=0x7fffffffe188) at notmuch-search.c:164
#7 0x00000000004066f1 in main (argc=3, argv=0x7fffffffe178) at notmuch.c:400
(gdb) frame 1
#1 0x000000000040f611 in _notmuch_message_get_in_reply_to (message=0x76dcd0) at lib/message.cc:288
288 in_reply_to = *i;
(gdb) p *message
$1 = {notmuch = 0x62d320, doc_id = 1, frozen = 0, message_id = 0x76db60 "", thread_id = 0x0,
in_reply_to = 0x0, filename = 0x76dc50 "/home/aperez/.mail/inbox/.claws_cache", message_file = 0x0,
replies = 0x76d250, doc = {internal = {dest = 0x76d450}}}
As you can see, there "filename" points to a Claws-Mail cache file, which
is a binary file (I can provide a copy if needed). I suspect that this is
related to the fact that the iterator ends up being NULL somehow.
I will experiment a bit more with this issue -- maybe just avoiding adding
files whose name starts with a dot will suffice as temporary fix.
Cheers,
--
Adrian Perez de Castro <aperez@igalia.com>
Igalia - Free Software Engineering
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-11-19 15:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 18:00 Segfault searching for tags Jeffrey Ollie
2009-11-19 15:45 ` Adrian Perez de Castro [this message]
2009-11-20 2:23 ` Jeffrey Ollie
2009-11-20 11:32 ` Carl Worth
2009-11-20 13:10 ` Jeffrey Ollie
2009-11-20 13:20 ` Jan Janak
2009-11-20 17:02 ` Carl Worth
2009-11-20 19:03 ` Adrian Perez de Castro
2009-11-21 0:32 ` Carl Worth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091119164543.25e7afe5@hikari \
--to=aperez@igalia.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).