Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault while opening a mailbox in from the sidebar #4290

Open
terminaldweller opened this issue May 7, 2024 · 2 comments
Open

segfault while opening a mailbox in from the sidebar #4290

terminaldweller opened this issue May 7, 2024 · 2 comments
Labels

Comments

@terminaldweller
Copy link

Expected Behaviour

I was trying to do open a mailbox.

Actual Behaviour

I get a segfault

If NeoMutt crashed, did your OS create a 'coredump' file? yes, i ran ulimit -c unlimited so I do have a coredump.

Steps to Reproduce

Just regular use of Neomutt. Though that being said I use the the + sub-addressing thingy from rfc5233 so I have quite a few mailboxes.

How often does this happen?

  • I use my email a lot so a couple of times a day

When did it start to happen?

It started happening a while back(Sorry for being late) so I'm not sure which version I was on when it started but it could also be that the number of mailboxes I have is a lot.
One thing that has started happening is, for newer mailboxes that I add, when I try to open them, the first time opening them will result in no content being shown, but when I open them a second time the content is shown But for the older mailboxes, this is not true. I get mailbox contents on first try(like I expect).
When the i-have-to-open-the-mailbox-twice-to-get-content happens I get a error message that says connection was closed and then I get this in the status line:

Mailbox something closed.

NeoMutt Version

NeoMutt 20240416
Copyright (C) 2015-2024 Richard Russon and friends
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 6.6.30_1 (x86_64)
ncurses: ncurses 6.4.20221231 (compiled with 6.4.20221231)
libidn2: 2.3.4 (compiled with 2.3.4)
GPGME: 1.23.1
OpenSSL: OpenSSL 3.3.0 9 Apr 2024
libnotmuch: 5.6.0
storage: rocksdb, gdbm, tdb
compression: zlib

Configure options: --ssl --gpgme --notmuch --gdbm --lua --sasl --zlib --tdb --rocksdb --autocrypt --sqlite

Compilation CFLAGS: -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe   -g -ffile-prefix-map=/builddir/neomutt-20240416/neomutt-20240416=. -fno-delete-null-pointer-checks -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -D_XOPEN_SOURCE_EXTENDED -I/usr/include/lua5.4 -I/usr/include -I/usr/include -I/usr/include -DNCURSES_WIDECHAR -I/usr/include -I/usr/include -I/usr/include -I/usr/include -O2

Compile options:
  +autocrypt +fcntl -flock -fmemopen +futimens +getaddrinfo -gnutls +gpgme
  -gsasl -gss +hcache -homespool +idn +inotify -locales_hack +lua -mixmaster
  +nls +notmuch +openssl +pgp +regex +sasl +smime +sqlite +truecolor

MAILPATH="/var/mail"
PKGDATADIR="/usr/share/neomutt"
SENDMAIL="/usr/sbin/sendmail"
SYSCONFDIR="/etc"

Extra Info

I run void linux.

$uname -a
Linux voidbox 6.6.30_1 #1 SMP PREEMPT_DYNAMIC Sat May  4 01:16:03 UTC 2024 x86_64 GNU/Linux
  • Were you using multiple copies of NeoMutt at once? No
  • Were you using 'screen' or 'tmux'? I always use tmux
  • Is your email local (maildir) or remote (IMAP)? IMAP

Coredump

I ran a backtrace on the coredump, this is what I get:

#0  0x000055cc76d68f7a in cmd_parse_fetch (s=0x55cc77b013a2 "2 FETCH (UID 2 FLAGS (\\Seen))", adata=0x55cc77a811d0) at imap/command.c:432
#1  cmd_handle_untagged (adata=0x55cc77a811d0) at imap/command.c:1040
#2  imap_cmd_step (adata=adata@entry=0x55cc77a811d0) at imap/command.c:1191
#3  0x000055cc76d7099e in read_headers_normal_eval_cache (adata=adata@entry=0x55cc77a811d0, msn_end=msn_end@entry=0x14, uid_next=<optimized out>, store_flag_updates=0x0, eval_condstore=eval_condstore@entry=0x0)
    at imap/message.c:725
#4  0x000055cc76d72073 in imap_read_headers (m=m@entry=0x55cc77ba6a10, msn_begin=<optimized out>, msn_begin@entry=0x1, msn_end=msn_end@entry=0x14, initial_download=initial_download@entry=0x1)
    at imap/message.c:1422
#5  0x000055cc76d6be2f in imap_mbox_open (m=0x55cc77ba6a10) at imap/imap.c:2055
#6  0x000055cc76cb6a4b in mx_mbox_open (m=0x55cc77ba6a10, flags=flags@entry=0x0) at ./mx.c:370
#7  0x000055cc76cc138d in change_folder_mailbox (menu=0x55cc77b97b50, m=<optimized out>, oldcount=<optimized out>, shared=0x55cc779460b0, read_only=read_only@entry=0x0) at index/dlg_index.c:694
#8  0x000055cc76cc2840 in index_change_folder (dlg=dlg@entry=0x55cc77a4f290, m=<optimized out>) at index/dlg_index.c:1450
#9  0x000055cc76d82d4a in op_sidebar_open (wdata=<optimized out>, op=<optimized out>) at sidebar/functions.c:230
#10 0x000055cc76d83457 in sb_function_dispatcher (win=<optimized out>, op=op@entry=0x112) at sidebar/functions.c:387
#11 0x000055cc76cc2432 in dlg_index (dlg=<optimized out>, m_init=<optimized out>) at index/dlg_index.c:1350
#12 0x000055cc76c93ac8 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ./main.c:1430

My config for this email

# vim: filetype=neomuttrc

unmailboxes *
set from = 'devi@terminaldweller.com'
set imap_user = 'devi@terminaldweller.com'
source "gpg -d ~/scripts/mail.self.pass.gpg |"
# set smtp_url = 'smtp://devi@terminaldweller.com@mail.terminaldweller.com:587'
set smtp_url = 'smtps://devi@terminaldweller.com@mail.terminaldweller.com:465'
set realname = 'farzad sadeghi'
set folder = 'imaps://mail.terminaldweller.com:993'
set spoolfile = '+INBOX'
set postponed = '+Drafts'
set record = '+Sent'
set trash = '+Trash'
set header_cache = ~/.mutt/self/cache/headers
set message_cachedir = ~/.mutt/self/cache/bodies
set certificate_file = ~/.mutt/self/certificates
# mailboxes "+INBOX" "+Drafts" "+Sent" "+Trash"
mailboxes "+INBOX" "+INBOX/Github" "+INBOX/Account1" "+INBOX/Account2"

there are a lot of entries for mailboxes. I counted. right now its 82.

@terminaldweller
Copy link
Author

I had a couple of Mailboxes that were completely empty. I removed those. Now I don't have to open certain mailboxes twice to get their content.
Opening gdb with the coredump file I get this before running bt:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000561023995f7a in cmd_parse_fetch (s=0x561024d26e72 "1 FETCH (UID 1 FLAGS (\\Seen))", adata=0x561024ca5f60) at imap/command.c:432

warning: 432    imap/command.c: No such file or directory

So I decided to remove the empty mailboxes. Let's see if that makes any difference.

@terminaldweller
Copy link
Author

i haven't had a crash in 3 days so I guess it's fair to say that empty mailboxes were the cause of the crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant