[BUG] notmuch crashes on FreeBSD when synchronize_flags=true

Tomi Ollila tomi.ollila at iki.fi
Mon Mar 23 13:13:52 PDT 2015


On Sat, Mar 21 2015, Simon Campese <notmuchmail_org at campese.de> wrote:

> 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 ---

I downloaded (from somewhere) FreeBSD i386 LXDE VirtualBox (.ova) image
and after a while figuring out how to get stuff installed I got
notmuch 0.18.1 installed.

In case I create ~/mail/cur, ~/mail/new and ~/mail/tmp directories,
but mail(s) to ~/mail/new and execute notmuch new...

... notmuch coredumps and I get pretty much the same output as the


My guess is that there is a slight error how this part is displayed:

> #3  0x0000000801c5a7e6 in Xapian::Document::Internal::remove_term () from
> #4  0x000000080084dd1c in notmuch_message_get_replies () from
> #5  0x000000080084f0cf in notmuch_message_remove_tag () from
> #6  0x000000080084f2d5 in notmuch_message_maildir_flags_to_tags () from

-- I'd day #4 is actually _notmuch_message_remove_term () 

To resolve this further I suggest that SomeOne(tm) (that means you, Simon)
build notmuch like the following:

  make distclean
  CFLAGS='-ggdb -O0' ./configure
  make

(but no make install -- and next)

  rm -rf ~/mail/.notmuch
  gdb ./notmuch
  run new

and capture the gdb backtrace (let's hope Heisenberg does't intrude!)

(remember to have mails in ~/main/new and synchronize_flags in .notmuch-config.


Tomi

>
> 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