neomutt / neomutt

✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat
https://neomutt.org/
GNU General Public License v2.0
3.28k stars 309 forks source link

Random crashes #2057

Closed kflak closed 4 years ago

kflak commented 4 years ago

Expected Behaviour

Random stuff in index

Actual Behaviour

Neomutt has been crashing randomly since mid December.

If NeoMutt crashed, did your OS create a 'coredump' file?

           PID: 25757 (neomutt)
           UID: 1000 (kf)
           GID: 1000 (kf)
        Signal: 11 (SEGV)
     Timestamp: Fri 2020-01-03 11:02:50 EET (3min 24s ago)
  Command Line: neomutt
    Executable: /usr/bin/neomutt
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (kf)
       Boot ID: e17c9a42a5b7449bb4b83b36a8716b54
    Machine ID: c06afc9c267144ec9253e59c7c767a00
      Hostname: t480s-arch
       Storage: /var/lib/systemd/coredump/core.neomutt.1000.e17c9a42a5b7449bb4b83b36a8716b54.25757.1578042170000000000000.lz4
       Message: Process 25757 (neomutt) of user 1000 dumped core.

                Stack trace of thread 25757:
                #0  0x00005642b3ada36d n/a (neomutt + 0x7236d)
                #1  0x00005642b3a907eb n/a (neomutt + 0x287eb)
                #2  0x00005642b3ab0df9 n/a (neomutt + 0x48df9)
                #3  0x00005642b3a867fb n/a (neomutt + 0x1e7fb)
                #4  0x00007fd1ef100153 __libc_start_main (libc.so.6 + 0x27153)
                #5  0x00005642b3a86b0e n/a (neomutt + 0x1eb0e)

Steps to Reproduce

Unfortunately I have found no pattern to this, but it happens in index view.

How often does this happen?

When did it start to happen?

Mid December. I don't think I made any config changes in that period.

NeoMutt Version

NeoMutt 20191207
Copyright (C) 1996-2016 Michael R. Elkins and others.
NeoMutt comes with ABSOLUTELY NO WARRANTY; for details type 'neomutt -vv'.
NeoMutt is free software, and you are welcome to redistribute it
under certain conditions; type 'neomutt -vv' for details.

System: Linux 5.4.5-rt3-1-rt (x86_64)
ncurses: ncurses 6.1.20180127 (compiled with 6.1.20180127)
libidn2: 2.3.0 (compiled with 2.3.0)
GPGme: 1.13.1
libnotmuch: 5.2.0
hcache backends: kyotocabinet, gdbm, lmdb

Configure options: --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --gpgme --lua --notmuch --gss --gnutls --sasl --with-ui=ncurses --with-idn2=/usr --disable-idn --idn2 --lmdb --kyotocabinet --gdbm

Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -std=c99 -fno-delete-null-pointer-checks -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -I/usr/include -DNCURSES_WIDECHAR

Default options:
  +attach_headers_color +compose_to_sender +compress +cond_date +debug 
  +encrypt_to_self +forgotten_attachments +forwref +ifdef +imap +index_color 
  +initials +limit_current_thread +multiple_fcc +nested_if +new_mail +nntp +pop 
  +progress +quasi_delete +regcomp +reply_with_xorig +sensible_browser +sidebar 
  +skip_quoted +smtp +status_color +timeout +tls_sni +trash 

Compile options:
  -autocrypt +bkgdset +color +curs_set +fcntl -flock -fmemopen +futimens 
  +getaddrinfo +gnutls +gpgme +gss +hcache -homespool +idn +inotify 
  -locales_hack +lua +meta -mixmaster +nls +notmuch -openssl +pgp +sasl +smime 
  -sqlite +start_color +sun_attachment +typeahead 
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/neomutt"
SENDMAIL="/usr/sbin/sendmail"
SYSCONFDIR="/etc"

To learn more about NeoMutt, visit: https://neomutt.org
If you find a bug in NeoMutt, please raise an issue at:
    https://github.com/neomutt/neomutt/issues
or send an email to: <neomutt-devel@neomutt.org>

Extra Info

l29ah commented 4 years ago

You should build neomutt with debug symbols enabled, since your backtrace doesn't contain any useful info otherwise.

kflak commented 4 years ago

Thanks for the tip! Have compiled it with debug now, and will return when/if the crash happens again.

dorchain commented 4 years ago

I found a way to reproduce crashes reliably. Let me explain the setup.

I am using debian testing. Mailboxes are traditional mbox under /var/mail/

Mail is delivered via sendmail and procmail as lda.

I access the mailbox locally via neomutt, and sometimes via imap as dovecot-imap

All this used to work fine, neomutt sometimes saying mailbox externally modified, so far so good.

Now when a new mail arrives, I and open the INBOX, i.e. /var/mail/ via imap (thunderbird or k9-mail, even telnet is sufficient to trigger the behaviour), leave the imap client (i.e. close the connection)

neomutt crashes with a segfault

Versions (in debian testing as of today): neomutt 20191111+dfsg.1-1 dovecot-imapd 1:2.3.7.2-1

I did some tracing, in effect imapd writes something in the last and the first mail (which dovecot, this is a special placeholder mail).

I would expect for neomutt to detect changes, and in the worst cases re-read the whole mbox file.

scottkosty commented 4 years ago

@dorchain can you reproduce this with the newest NeoMutt version, 2020-03-20? I've been using that version and it has been stable for my uses.

scottkosty commented 4 years ago

@kflak can you reproduce on current master or the newest release?

kflak commented 4 years ago

Nope, neomutt has been stable lately!

scottkosty commented 4 years ago

Great, thanks for the quick reply!

@dorchain if you can reproduce, please reopen.