notmuch segfault

Sebastian Spaeth Sebastian at SSpaeth.de
Fri Apr 23 06:26:51 PDT 2010


It happened again. Both times I had pressed "G" which calls offlineimap
and which removed messages that the notmuch database still thought are there.

----------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff602bb14 in strncasecmp () from /lib/libc.so.6
(gdb) bt
#0  0x00007ffff602bb14 in strncasecmp () from /lib/libc.so.6
#1  0x0000000000418521 in _thread_add_matched_message(_notmuch_thread*, _notmuch_message*, notmuch_sort_t) ()
#2  0x0000000000418b17 in _notmuch_thread_create ()
#3  0x000000000040e33c in notmuch_show_command ()
#4  0x0000000000408436 in main ()

-------------------------------------------------------------
spaetz at spaetz-macbook:~/src/notmuch$ notmuch show tag:inbox
Error opening /home/spaetz/mail/INBOX.Junk/new/1272025029_0.17175.spaetz-macbook,U=3608,FMD5=22888fa7f8daa670f25d806e9b4ae4df:2,: No such file or directory
Error opening /home/spaetz/mail/INBOX.Junk/new/1272025029_0.17175.spaetz-macbook,U=3608,FMD5=22888fa7f8daa670f25d806e9b4ae4df:2,: No such file or directory
Error opening /home/spaetz/mail/INBOX.Junk/new/1272025029_0.17175.spaetz-macbook,U=3608,FMD5=22888fa7f8daa670f25d806e9b4ae4df:2,: No such file or directory
Segmentation fault (core dumped)

----------------------------------------------------------
Coredump is here:
http://sspaeth.de/uploads/tmp/core.bin
-------------------------------------------------------------


Can it be that in thread.cc in _thread_add_matched_message ()
...
    subject = notmuch_message_get_header (message, "subject");

    if ((strncasecmp (subject, "Re: ", 4) == 0) ||
...

If the underlying message disappeared, get_header will return NULL and
we pass strncasecmp NULL as first parameter. Could that be?



More information about the notmuch mailing list