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

SIGSEGV at mutt_extract_token (init.c:2664) #1918

Closed
eku opened this issue Nov 1, 2019 · 9 comments
Closed

SIGSEGV at mutt_extract_token (init.c:2664) #1918

eku opened this issue Nov 1, 2019 · 9 comments
Labels
bug:crash Causes NeoMutt to crash has:backtrace Debugging backtrace attached

Comments

@eku
Copy link

eku commented Nov 1, 2019

Expected Behaviour

Just start neomutt with an existing mailbox.

Actual Behaviour

Dumps a core.

(gdb) bt
#0  mutt_extract_token (flags=<optimized out>, tok=0x7fffffa22260, dest=0x7fffffa22300)
    at init.c:2664
#1  mutt_extract_token (dest=0x7fffffa22300, tok=0x7fffffa22260, flags=0) at init.c:2652
#2  0x000000000043c4de in parse_mailboxes (buf=0x7fffffa22300, s=0x7fffffa22260, 
    data=<optimized out>, err=<optimized out>) at init.c:1345
#3  0x000000000043d62c in mutt_parse_rc_line (line=<optimized out>, 
    token=token@entry=0x7fffffa22300, err=err@entry=0x7fffffa23380) at init.c:3257
#4  0x000000000043d8f5 in mutt_parse_rc_line (err=0x7fffffa23380, token=0x7fffffa22300, 
    line=<optimized out>) at init.c:3230
#5  source_rc (rcfile_path=<optimized out>, err=err@entry=0x7fffffa23380) at init.c:830
#6  0x000000000043e50a in mutt_init (skip_sys_rc=<optimized out>, 
    commands=commands@entry=0x7fffffa23e30) at init.c:3162
#7  0x000000000040aa76 in main (argc=1, argv=0x7fffffa254a8, envp=<optimized out>)
    at main.c:702

Steps to Reproduce

Just start.

How often does this happen?

  • Always

When did it start to happen?

  • When I upgraded
    It might be an email or the previous update of some distro packages IDK

    Which version did you use to use?
    neomutt-20191025-1.fc30.x86_64

  • When I changed my config
    Can you narrow down what you changed?
    I did not change configuration

NeoMutt Version

NeoMutt 2019-10-25
System: Linux 5.3.7-200.fc30.x86_64 (x86_64)
ncurses: ncurses 6.1.20180923 (compiled with 6.1.20180923)
libidn: 1.35 (compiled with 1.35)
GPGme: 1.12.0
hcache backends: tokyocabinet, lmdb

Compiler:
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC) 

Configure options: --sysconfdir=/etc SENDMAIL=/usr/sbin/sendmail ISPELL=/usr/bin/hunspell --notmuch --tokyocabinet --lmdb --gnutls --sasl --gss --gpgme

Compilation CFLAGS: -g -O2 -std=c99 -fno-delete-null-pointer-checks -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -I/usr/include -DNCURSES_WIDECHAR

Standard Einstellungen:
  +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 

Einstellungen bei der Kompilierung:
  -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"

Extra Info

  • Operating System and its version
    Fedora 30
  • Were you using multiple copies of NeoMutt at once?
    No
  • Were you using 'screen' or 'tmux'?
    Yes, screen
  • Is your email local (maildir) or remote (IMAP)?
    /var/spool/mail
@flatcap flatcap added bug:crash Causes NeoMutt to crash has:backtrace Debugging backtrace attached labels Nov 1, 2019
@flatcap
Copy link
Member

flatcap commented Nov 1, 2019

Thanks for the bug-report, @eku.
Looking at the code I'm a bit confused as to what's going wrong.

It seems to be crashing when it reads a mailboxes command, in your config.
Please can you find out which one it is and paste it here.
Then see if that one line causes a crash: neomutt -n -F test.rc

Thanks.

@eku
Copy link
Author

eku commented Nov 1, 2019

@flatcap thanks for the hint. I had the following expression

mailboxes `find ~/mail -type f -print | grep -v ".[a-z]" | xargs`

since years in my .muttrc. The result of the expression is empty. There was an pkg update of grep just before. neomutt should not crash if the value of mailboxes is empty.

It also rejects my aliases file what used to work before. Error message is

Warning: Bad IDN

What does it mean?

.mutt/aliases: UTF-8 Unicode text, with very long lines

@flatcap
Copy link
Member

flatcap commented Nov 1, 2019

value of mailboxes is empty

Bingo! Thanks.
This config works nicely (crashes):

mailboxes `echo`

Warning: Bad IDN

Ah, that's a problem parsing alias -group config.
That's already been fixed; there will be a new release out very soon.

@flatcap flatcap closed this as completed in d713c2c Nov 2, 2019
@eku
Copy link
Author

eku commented Nov 3, 2019

@flatcap I'v just updated to 20191102-1.fc30 and now it crashes with

(gdb) bt
#0  0x00007fdbd8490a9c in __memset_sse2_unaligned_erms () from /lib64/libc.so.6
#1  0x00000000004d3f97 in mutt_buffer_reset (buf=buf@entry=0x15b96e0) at mutt/buffer.c:83
#2  0x00000000004d4482 in mutt_buffer_strcpy (buf=0x15b96e0,
    s=0x15addd0 "/home/xxxx") at mutt/buffer.c:314
#3  0x000000000043c576 in parse_mailboxes (buf=0x7ffd5c7af4e0, s=0x7ffd5c7af440,
    data=<optimized out>, err=<optimized out>) at init.c:1351
#4  0x000000000043d6b8 in mutt_parse_rc_line (line=<optimized out>,
    token=token@entry=0x7ffd5c7af4e0, err=err@entry=0x7ffd5c7b0560) at init.c:3251
#5  0x000000000043d9a5 in mutt_parse_rc_line (err=0x7ffd5c7b0560, token=0x7ffd5c7af4e0,
    line=<optimized out>) at init.c:3224
#6  source_rc (rcfile_path=<optimized out>, err=err@entry=0x7ffd5c7b0560) at init.c:828
#7  0x000000000043e5d2 in mutt_init (skip_sys_rc=<optimized out>,
    commands=commands@entry=0x7ffd5c7b1000) at init.c:3156
#8  0x000000000040aac6 in main (argc=1, argv=0x7ffd5c7b16f8, envp=<optimized out>)
    at main.c:704

My mailboxes expression does not result in an empty value anymore.

@flatcap
Copy link
Member

flatcap commented Nov 4, 2019

Argh! My 'fixing' of the bug just moved the problem.
I've merged a commit b486e37 that may fix your problem.
Please can you give it a try (build from master)
Thanks

@flatcap flatcap reopened this Nov 4, 2019
@scottkosty
Copy link
Member

scottkosty commented Jun 5, 2020

@eku Can you reproduce the problem on current master (or instead the newest release)?

@eku
Copy link
Author

eku commented Jun 6, 2020

@scottkosty I switched back to plain old mutt because of instability of neomutt.

@scottkosty
Copy link
Member

I see, thanks for the reply! @flatcap I propose to close this issue unless someone else can reproduce. I tried and cannot reproduce.

@flatcap flatcap closed this as completed Jun 6, 2020
@flatcap
Copy link
Member

flatcap commented Jun 6, 2020

Thanks @scottkosty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:crash Causes NeoMutt to crash has:backtrace Debugging backtrace attached
Projects
None yet
Development

No branches or pull requests

3 participants