[BUG] notmuch crashes on FreeBSD when synchronize_flags=true

Simon Campese notmuchmail_org at campese.de
Sat Mar 21 04:23:58 PDT 2015


Hello,

I'm trying to setup notmuch on my FreeBSD machine (version 10.1). As
soon as I run 'notmuch new' (without an existing .notmuch directory),
notmuch crashes with the error message 'abort (core dumped)   notmuch
new'. An example output is: 

--- BEGIN shell-output ---

freebsd-desk% notmuch new
Found 50363 total files (that's not much mail).
zsh: abort (core dumped)  notmuch new
freebsd-desk%

--- END shell-output ---

If I put 'synchronize_flags=false' into my config, 'notmuch new' works fine and
indexes everything. Here's a backtrace from gdb:

--- BEGIN gdb-session ---

bsd-desk% gdb notmuch
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
(gdb) run new
Starting program: /usr/local/bin/notmuch new
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New LWP 101945]
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 804406400 (LWP 101945/notmuch)]
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debuggingFound 50363 total files (that's not much mail).
Program received signal SIGABRT, Aborted.
[Switching to Thread 804406400 (LWP 101945/notmuch)]
0x00000008018d16ca in thr_kill () from /lib/libc.so.7
(gdb) bt
#0  0x00000008018d16ca in thr_kill () from /lib/libc.so.7
#1  0x00000008019a6149 in abort () from /lib/libc.so.7
#2  0x00000008022df42d in __cxa_rethrow () from /lib/libcxxrt.so.1
#3  0x0000000801c5a7e6 in Xapian::Document::Internal::remove_term () from /usr/local/lib/libxapian.so.22
#4  0x000000080084dd1c in notmuch_message_get_replies () from /usr/local/lib/libnotmuch.so.3
#5  0x000000080084f0cf in notmuch_message_remove_tag () from /usr/local/lib/libnotmuch.so.3
#6  0x000000080084f2d5 in notmuch_message_maildir_flags_to_tags () from /usr/local/lib/libnotmuch.so.3
#7  0x000000000040d3e5 in ?? ()
#8  0x000000000040ce48 in ?? ()
#9  0x000000000040ce48 in ?? ()
#10 0x000000000040ce48 in ?? ()
#11 0x000000000040c26b in ?? ()
#12 0x000000000040878b in ?? ()
#13 0x000000000040798f in ?? ()
#14 0x000000080063b000 in ?? ()
#15 0x0000000000000000 in ?? ()
(gdb)

--- END gdb-session ---

The error described above occurs, no matter if I install the notmuch
package (and its dependencies) via binary packages or build from
ports. I've tried version 0.18 and version 0.19. Also, it doesn't 
matter if I start with a maildir containing just a single mail, or my
real maildir with thousands of messages.

On my linux box (running the same verions of notmuch and its
dependencies), the error doesn't occur, so I guess it has something to
do with the different C++-Stacks (libcxxrt is FreeBSD's ABI library).
A quick glance at the notmuch code showed that
notmuch_message_get_replies() sometimes returns NULL. I'm not a C++
expert but could it be that this might be the problem here?

To give you some version numbers, this is what's currently installed:

notmuch: 0.19
xapian-core: 1.2.20
gmime: 2.6.20
talloc: 2.1.1

To reproduce the error, you can do the following:

- perform a fresh install of FreeBSD
- install the package or port, for example: 'pkg install notmuch'
- create a standard config file containing 'synchronize_flags=true' and
  pointing to some maildir
- run 'notmuch new' 

I would be very thankful for a fix (or hints what might be the problem).  


Thanks for your help,

Simon


More information about the notmuch mailing list