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

Build: figure when ncurses needs tinfo #1118

Closed
ghost opened this issue Mar 30, 2018 · 22 comments
Closed

Build: figure when ncurses needs tinfo #1118

ghost opened this issue Mar 30, 2018 · 22 comments
Assignees
Labels
bug:crash Causes NeoMutt to crash type:bug Bug

Comments

@ghost
Copy link

ghost commented Mar 30, 2018

bug reports

  • Expected behavior
    neomutt should not crash
  • Actual behavior
    it crashes with segfault
  • Steps to reproduce
    just start neomutt
  • Used program versions
    neomutt -v output:
NeoMutt 20180223
[...]
System: Linux 4.15.14-gentoo (x86_64)
ncurses: ncurses 6.1.20180127 (compiled with 6.1)
hcache backends: gdbm, bdb

Compiler:
x86_64-pc-linux-gnu-gcc (Gentoo 7.3.0 p1.0) 7.3.0
[...]

Configure options: --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/neomutt-20180223 --libdir=/usr/lib64 --disable-doc --disable-nls --enable-notmuch --enable-gpgme --enable-pgp --disable-smime --enable-bdb --enable-gdbm --disable-kyotocabinet --disable-qdbm --disable-tokyocabinet --disable-idn --disable-gss --disable-lmdb --disable-sasl --with-ui=ncurses --sysconfdir=/etc/neomutt --enable-ssl --disable-gnutls

Compilation CFLAGS: -march=haswell -O2 -pipe -std=c99 -fno-delete-null-pointer-checks -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -I/usr/include -DNCURSES_WIDECHAR  -I/include -I/usr/include/db5.3

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:
  +bkgdset +color +curs_set +fcntl -flock -fmemopen +futimens +getaddrinfo
  -gnutls +gpgme -gss +hcache -homespool -idn -locales_hack -lua +meta
  -mixmaster -nls +notmuch +openssl +pgp -sasl -smime +start_color
  +sun_attachment +typeahead
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/neomutt"
SENDMAIL="/usr/sbin/sendmail"
SYSCONFDIR="/etc/neomutt"

  • Operating System and its version
    Gentoo
#0  0x00007ffff6d16b69 in termattrs_sp () from /lib64/libncursesw.so.6
No symbol table info available.
#1  0x00007ffff6d13ff8 in _nc_setupscreen_sp () from /lib64/libncursesw.so.6
No symbol table info available.
#2  0x00007ffff6d0f69e in newterm_sp () from /lib64/libncursesw.so.6
No symbol table info available.
#3  0x00007ffff6d0fb28 in newterm () from /lib64/libncursesw.so.6
No symbol table info available.
#4  0x00007ffff6d0ba93 in initscr () from /lib64/libncursesw.so.6
No symbol table info available.
#5  0x000055555556e769 in main ()
No symbol table info available.

my terminal is st, but i can reproduce this on tty as well

@flatcap flatcap added status:new-bug bug:crash Causes NeoMutt to crash type:bug Bug labels Mar 30, 2018
@ghost
Copy link
Author

ghost commented Mar 30, 2018

im able to reproduce this on NeoMutt 20180323-27-d4be39

@flatcap
Copy link
Member

flatcap commented Mar 30, 2018

Thanks for the bug report, @Herny64. Sorry that NeoMutt's crashing.

im able to reproduce this on NeoMutt 20180323-27-d4be39

Argh!

It's crashing deep within the ncurses code, which is called very early in NeoMutt's startup.
NeoMutt does very little before that call.

Please can you give this program (initscr.c) a try:

#include <ncurses.h>
int main()
{
  initscr();
  endwin();
  return 0;
}

Compile with: gcc -o initscr initscr.c -lncurses

If that crashes, then there's something wrong with your curses install, or your terminal.
If it succeeds, then there may be a problem with your NeoMutt build.

@ghost
Copy link
Author

ghost commented Mar 30, 2018

If it succeeds, then there may be a problem with your NeoMutt build.

it succeeded.

@ghost
Copy link
Author

ghost commented Mar 30, 2018

the test program links agains libncurses.so.6 while neomutt links agains libncursesw.so.6
does this matter ?

@flatcap
Copy link
Member

flatcap commented Mar 30, 2018

Aha! I was testing you :-)

You're right, change the compile to -lncursesw

@ghost
Copy link
Author

ghost commented Mar 30, 2018

still succeeds

@flatcap
Copy link
Member

flatcap commented Mar 30, 2018

OK, my guess is that you have multiple versions of ncurses installed.
NeoMutt is building against the headers of one version, but being linked to another.

(If you're an IRC user, we're in #neomutt on irc.freenode.net)

@ghost
Copy link
Author

ghost commented Mar 30, 2018

strace

execve("/usr/bin/neomutt", ["neomutt"], 0x7ffeb38994d0 /* 57 vars */) = 0
brk(NULL)                               = 0x56298109e000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=105463, ...}) = 0
mmap(NULL, 105463, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe3e2ef4000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libgdbm.so.5", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 3\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=56104, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3e2ef2000
mmap(NULL, 2151384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e2adc000
mprotect(0x7fe3e2ae8000, 2097152, PROT_NONE) = 0
mmap(0x7fe3e2ce8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0x7fe3e2ce8000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libdb-5.3.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\341\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1806624, ...}) = 0
mmap(NULL, 3901928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e2723000
mprotect(0x7fe3e28d3000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e2ad2000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1af000) = 0x7fe3e2ad2000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libssl.so.1.0.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\237\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=448632, ...}) = 0
mmap(NULL, 2544208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e24b5000
mprotect(0x7fe3e2519000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e2718000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x63000) = 0x7fe3e2718000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libcrypto.so.1.0.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0s\6\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=2320840, ...}) = 0
mmap(NULL, 4430424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e207b000
mprotect(0x7fe3e228b000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e248a000, 163840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20f000) = 0x7fe3e248a000
mmap(0x7fe3e24b2000, 10840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3e24b2000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libtinfo.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\361\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=229552, ...}) = 0
mmap(NULL, 2326840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e1e42000
mprotect(0x7fe3e1e76000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e2075000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x33000) = 0x7fe3e2075000
mmap(0x7fe3e207a000, 312, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3e207a000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libncursesw.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\263\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=233824, ...}) = 0
mmap(NULL, 2329752, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e1c09000
mprotect(0x7fe3e1c41000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e1e40000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x37000) = 0x7fe3e1e40000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libnotmuch.so.5", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\313\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=183352, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3e2ef0000
mmap(NULL, 2278752, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e19dc000
mprotect(0x7fe3e1a06000, 2097152, PROT_NONE) = 0
mmap(0x7fe3e1c06000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2a000) = 0x7fe3e1c06000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libgpgme.so.11", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@u\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=291000, ...}) = 0
mmap(NULL, 2386504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e1795000
mprotect(0x7fe3e17da000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e19d9000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x44000) = 0x7fe3e19d9000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libanl.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14672, ...}) = 0
mmap(NULL, 2109928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e1591000
mprotect(0x7fe3e1594000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e1793000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fe3e1793000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \20\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1840896, ...}) = 0
mmap(NULL, 3946968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e11cd000
mprotect(0x7fe3e1387000, 2097152, PROT_NONE) = 0
mmap(0x7fe3e1587000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7fe3e1587000
mmap(0x7fe3e158d000, 14808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3e158d000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`b\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=145408, ...}) = 0
mmap(NULL, 2225256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e0fad000
mprotect(0x7fe3e0fc8000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e11c7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0x7fe3e11c7000
mmap(0x7fe3e11c9000, 13416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3e11c9000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14320, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e0da9000
mprotect(0x7fe3e0dac000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e0fab000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fe3e0fab000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320$\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=92400, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3e2eee000
mmap(NULL, 2187664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e0b92000
mprotect(0x7fe3e0ba8000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e0da7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7fe3e0da7000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libtinfow.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\362\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=233648, ...}) = 0
mmap(NULL, 2331064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e0958000
mprotect(0x7fe3e098c000, 2097152, PROT_NONE) = 0
mmap(0x7fe3e0b8c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x34000) = 0x7fe3e0b8c000
mmap(0x7fe3e0b91000, 440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3e0b91000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/tls/haswell/x86_64/libgmime-2.6.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/haswell/x86_64", 0x7fff1fa0dc70) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/haswell/libgmime-2.6.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/haswell", 0x7fff1fa0dc70) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/x86_64/libgmime-2.6.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7fff1fa0dc70) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/libgmime-2.6.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls", 0x7fff1fa0dc70)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/haswell/x86_64/libgmime-2.6.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/haswell/x86_64", 0x7fff1fa0dc70) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/haswell/libgmime-2.6.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/haswell", 0x7fff1fa0dc70) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64/libgmime-2.6.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7fff1fa0dc70) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libgmime-2.6.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000U\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=464472, ...}) = 0
mmap(NULL, 2560712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e06e6000
mprotect(0x7fe3e0743000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e0942000, 86016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5c000) = 0x7fe3e0942000
mmap(0x7fe3e0957000, 712, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3e0957000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \256\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=342816, ...}) = 0
mmap(NULL, 2440936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e0492000
mprotect(0x7fe3e04e4000, 2097152, PROT_NONE) = 0
mmap(0x7fe3e06e4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x52000) = 0x7fe3e06e4000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\254\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1119048, ...}) = 0
mmap(NULL, 3217128, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3e0180000
mprotect(0x7fe3e0290000, 2093056, PROT_NONE) = 0
mmap(0x7fe3e048f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10f000) = 0x7fe3e048f000
mmap(0x7fe3e0491000, 1768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3e0491000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libtalloc.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000%\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=84176, ...}) = 0
mmap(NULL, 2179568, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3dff6b000
mprotect(0x7fe3dff7e000, 2097152, PROT_NONE) = 0
mmap(0x7fe3e017e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x7fe3e017e000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libxapian.so.30", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\4\4\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2170280, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3e2eec000
mmap(NULL, 4265632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3dfb59000
mprotect(0x7fe3dfd61000, 2093056, PROT_NONE) = 0
mmap(0x7fe3dff60000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x207000) = 0x7fe3dff60000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000+\t\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2105328, ...}) = 0
mmap(NULL, 4213824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3df754000
mprotect(0x7fe3df945000, 2097152, PROT_NONE) = 0
mmap(0x7fe3dfb45000, 69632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f1000) = 0x7fe3dfb45000
mmap(0x7fe3dfb56000, 11328, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3dfb56000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=92304, ...}) = 0
mmap(NULL, 2188336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3df53d000
mprotect(0x7fe3df553000, 2093056, PROT_NONE) = 0
mmap(0x7fe3df752000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7fe3df752000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libassuan.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2607\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=76592, ...}) = 0
mmap(NULL, 2172032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3df32a000
mprotect(0x7fe3df33c000, 2093056, PROT_NONE) = 0
mmap(0x7fe3df53b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x7fe3df53b000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libgpg-error.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0-\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=84408, ...}) = 0
mmap(NULL, 2179816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3df115000
mprotect(0x7fe3df129000, 2093056, PROT_NONE) = 0
mmap(0x7fe3df328000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x7fe3df328000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libgio-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 r\3\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1672592, ...}) = 0
mmap(NULL, 3775384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3ded7b000
mprotect(0x7fe3def0c000, 2097152, PROT_NONE) = 0
mmap(0x7fe3df10c000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x191000) = 0x7fe3df10c000
mmap(0x7fe3df113000, 7064, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3df113000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3e2eea000
openat(AT_FDCWD, "/usr/lib64/libffi.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\31\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=35008, ...}) = 0
mmap(NULL, 2131560, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3deb72000
mprotect(0x7fe3deb79000, 2097152, PROT_NONE) = 0
mmap(0x7fe3ded79000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7fe3ded79000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\26\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=464944, ...}) = 0
mmap(NULL, 2560488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3de900000
mprotect(0x7fe3de971000, 2093056, PROT_NONE) = 0
mmap(0x7fe3deb70000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x70000) = 0x7fe3deb70000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib64/libbsd.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3008\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=80952, ...}) = 0
mmap(NULL, 2180144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3de6eb000
mprotect(0x7fe3de6fe000, 2093056, PROT_NONE) = 0
mmap(0x7fe3de8fd000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12000) = 0x7fe3de8fd000
mmap(0x7fe3de8ff000, 1072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3de8ff000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=31400, ...}) = 0
mmap(NULL, 2128832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3de4e3000
mprotect(0x7fe3de4ea000, 2093056, PROT_NONE) = 0
mmap(0x7fe3de6e9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fe3de6e9000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\26\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=26928, ...}) = 0
mmap(NULL, 2122136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3de2dc000
mprotect(0x7fe3de2e2000, 2093056, PROT_NONE) = 0
mmap(0x7fe3de4e1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7fe3de4e1000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 w\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1317448, ...}) = 0
mmap(NULL, 3412712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3ddf9a000
mprotect(0x7fe3de0da000, 2097152, PROT_NONE) = 0
mmap(0x7fe3de2da000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x140000) = 0x7fe3de2da000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3e2ee8000
openat(AT_FDCWD, "/usr/lib64/libgmodule-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\20\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14376, ...}) = 0
mmap(NULL, 2109848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3ddd96000
mprotect(0x7fe3ddd99000, 2093056, PROT_NONE) = 0
mmap(0x7fe3ddf98000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fe3ddf98000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0008\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=84528, ...}) = 0
mmap(NULL, 2189952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3ddb7f000
mprotect(0x7fe3ddb93000, 2093056, PROT_NONE) = 0
mmap(0x7fe3ddd92000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x7fe3ddd92000
mmap(0x7fe3ddd94000, 6784, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3ddd94000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\321\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=357968, ...}) = 0
mmap(NULL, 2458240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3dd926000
mprotect(0x7fe3dd97a000, 2097152, PROT_NONE) = 0
mmap(0x7fe3ddb7a000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x54000) = 0x7fe3ddb7a000
mmap(0x7fe3ddb7d000, 4736, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3ddb7d000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\250\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=320208, ...}) = 0
mmap(NULL, 2420480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3dd6d7000
mprotect(0x7fe3dd721000, 2093056, PROT_NONE) = 0
mmap(0x7fe3dd920000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x49000) = 0x7fe3dd920000
mmap(0x7fe3dd925000, 3840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe3dd925000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3e2ee6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3e2ee4000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3e2ee1000
arch_prctl(ARCH_SET_FS, 0x7fe3e2ee17c0) = 0
mprotect(0x7fe3e1587000, 16384, PROT_READ) = 0
mprotect(0x7fe3de4e1000, 4096, PROT_READ) = 0
mprotect(0x7fe3dd920000, 16384, PROT_READ) = 0
mprotect(0x7fe3e11c7000, 4096, PROT_READ) = 0
mprotect(0x7fe3de6e9000, 4096, PROT_READ) = 0
mprotect(0x7fe3ddb7a000, 8192, PROT_READ) = 0
mprotect(0x7fe3ddd92000, 4096, PROT_READ) = 0
mprotect(0x7fe3e0fab000, 4096, PROT_READ) = 0
mprotect(0x7fe3deb70000, 4096, PROT_READ) = 0
mprotect(0x7fe3e048f000, 4096, PROT_READ) = 0
mprotect(0x7fe3ddf98000, 4096, PROT_READ) = 0
mprotect(0x7fe3de2da000, 4096, PROT_READ) = 0
mprotect(0x7fe3de8fd000, 4096, PROT_READ) = 0
mprotect(0x7fe3ded79000, 4096, PROT_READ) = 0
mprotect(0x7fe3e0da7000, 4096, PROT_READ) = 0
mprotect(0x7fe3e06e4000, 4096, PROT_READ) = 0
mprotect(0x7fe3df10c000, 20480, PROT_READ) = 0
mprotect(0x7fe3df328000, 4096, PROT_READ) = 0
mprotect(0x7fe3df53b000, 4096, PROT_READ) = 0
mprotect(0x7fe3df752000, 4096, PROT_READ) = 0
mprotect(0x7fe3dfb45000, 53248, PROT_READ) = 0
mprotect(0x7fe3dff60000, 36864, PROT_READ) = 0
mprotect(0x7fe3e017e000, 4096, PROT_READ) = 0
mprotect(0x7fe3e19d9000, 4096, PROT_READ) = 0
mprotect(0x7fe3e0942000, 16384, PROT_READ) = 0
mprotect(0x7fe3e0b8c000, 16384, PROT_READ) = 0
mprotect(0x7fe3e1793000, 4096, PROT_READ) = 0
mprotect(0x7fe3e1c06000, 4096, PROT_READ) = 0
mprotect(0x7fe3e1e40000, 4096, PROT_READ) = 0
mprotect(0x7fe3e2075000, 16384, PROT_READ) = 0
mprotect(0x7fe3e248a000, 114688, PROT_READ) = 0
mprotect(0x7fe3e2718000, 16384, PROT_READ) = 0
mprotect(0x7fe3e2ad2000, 28672, PROT_READ) = 0
mprotect(0x7fe3e2ce8000, 4096, PROT_READ) = 0
mprotect(0x56297fcca000, 24576, PROT_READ) = 0
mprotect(0x7fe3e2f0e000, 4096, PROT_READ) = 0
munmap(0x7fe3e2ef4000, 105463)          = 0
set_tid_address(0x7fe3e2ee1a90)         = 18881
set_robust_list(0x7fe3e2ee1aa0, 24)     = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7fe3e0fb2c20, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7fe3e0fc1120}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7fe3e0fb2cd0, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7fe3e0fc1120}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(NULL)                               = 0x56298109e000
brk(0x5629810bf000)                     = 0x5629810bf000
futex(0x7fe3e04914a8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fe3e04914a8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fe3dfb56c9c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fe3dfb56ca8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getegid()                               = 1000
getgid()                                = 1000
open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1989456, ...}) = 0
mmap(NULL, 1989456, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe3dd4f1000
close(3)                                = 0
getrandom("\x50\x86\xa6\x77", 4, 0)     = 4
umask(077)                              = 022
getuid()                                = 1000
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=447, ...}) = 0
brk(0x5629810e0000)                     = 0x5629810e0000
read(3, "# /etc/nsswitch.conf:\n# $Header:"..., 4096) = 447
read(3, "", 4096)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=105463, ...}) = 0
mmap(NULL, 105463, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe3e2ef4000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/tls/haswell/x86_64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/haswell/x86_64", 0x7fff1fa0db60) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/haswell/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/haswell", 0x7fff1fa0db60) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/x86_64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7fff1fa0db60) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", 0x7fff1fa0db60)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/haswell/x86_64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/haswell/x86_64", 0x7fff1fa0db60) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/haswell/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/haswell", 0x7fff1fa0db60)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/x86_64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7fff1fa0db60)   = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/usr/lib64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7fe3e2ef4000, 105463)          = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=105463, ...}) = 0
mmap(NULL, 105463, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe3e2ef4000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\"\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=47320, ...}) = 0
mmap(NULL, 2143656, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe3dd2e5000
mprotect(0x7fe3dd2f0000, 2093056, PROT_NONE) = 0
mmap(0x7fe3dd4ef000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7fe3dd4ef000
close(3)                                = 0
mprotect(0x7fe3dd4ef000, 4096, PROT_READ) = 0
munmap(0x7fe3e2ef4000, 105463)          = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1590, ...}) = 0
read(3, "root:x:0:0:root:/root:/bin/zsh\nb"..., 4096) = 1590
close(3)                                = 0
rename("/home/muster/.neomuttdebug3", "/home/muster/.neomuttdebug4") = -1 ENOENT (No such file or directory)
rename("/home/muster/.neomuttdebug2", "/home/muster/.neomuttdebug3") = -1 ENOENT (No such file or directory)
rename("/home/muster/.neomuttdebug1", "/home/muster/.neomuttdebug2") = -1 ENOENT (No such file or directory)
rename("/home/muster/.neomuttdebug0", "/home/muster/.neomuttdebug1") = -1 ENOENT (No such file or directory)
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x56297fa197e0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
rt_sigaction(SIGHUP, {sa_handler=0x56297fa197e0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x56297fa197e0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
rt_sigaction(SIGALRM, {sa_handler=0x56297fa19800, sa_mask=[TSTP], sa_flags=SA_RESTORER, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
rt_sigaction(SIGCONT, {sa_handler=0x56297fa19800, sa_mask=[TSTP], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
rt_sigaction(SIGTSTP, {sa_handler=0x56297fa19800, sa_mask=[TSTP], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x56297fa19800, sa_mask=[TSTP], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
rt_sigaction(SIGWINCH, {sa_handler=0x56297fa19800, sa_mask=[TSTP], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
rt_sigaction(SIGCHLD, {sa_handler=0x56297fa660a0, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_NOCLDSTOP, sa_restorer=0x7fe3e1202fc0}, NULL, 8) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
stat("/home/muster/.terminfo", 0x5629810c6580) = -1 ENOENT (No such file or directory)
stat("/etc/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/share/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
access("/etc/terminfo/s/st-256color", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/terminfo/s/st-256color", R_OK) = 0
openat(AT_FDCWD, "/usr/share/terminfo/s/st-256color", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3111, ...}) = 0
read(3, "\36\0027\0\35\0\17\0i\1\203\5st-256color|stterm-2"..., 4096) = 3111
read(3, "", 4096)                       = 0
close(3)                                = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=74, ws_col=136, ws_xpixel=952, ws_ypixel=1036}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=74, ws_col=136, ws_xpixel=952, ws_ypixel=1036}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xc8} ---
+++ killed by SIGSEGV +++

@gahr gahr self-assigned this Mar 30, 2018
@gahr gahr changed the title Segmentation fault when starting neomutt Build: figure when ncurses needs tinfo Mar 30, 2018
@gahr
Copy link
Member

gahr commented Mar 30, 2018

So the issue is that ncursesw and tinfo were built independently, and ncursesw needs tinfo at link time.

As reported by @Herny64, pkg-config knows it:

$ pkg-config --cflags --libs ncursesw
-D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -lncursesw -ltinfow

I'll have a look at auto.def and see what I can do.

@ghost
Copy link
Author

ghost commented Mar 30, 2018

i have build neomutt with this patch:

diff --git a/auto.def b/auto.def
index 1d492ff2..5a762478 100644
--- a/auto.def
+++ b/auto.def
@@ -500,8 +500,10 @@ switch [opt-val with-ui ncurses] {
     }
 
     cc-with [list -libs -L$ncurses_prefix/lib] {
-      if {![cc-check-function-in-lib tgetent $ncurses_lib]} {
-        cc-check-function-in-lib tgetent tinfo
+      msg-checking "Libraries for tgetent"
+      msg-result   "[get-define LDFLAGS] [get-define LIBS]"
+      if {![cc-check-function-in-lib tgetent tinfo]} {
+        cc-check-function-in-lib tgetent $ncurses_lib
       }
       foreach f {start_color typeahead bkgdset curs_set meta use_default_colors} {
         cc-check-function-in-lib $f $ncurses_lib

its configure output is:

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/neomutt-20180223 --libdir=/usr/lib64 --disable-doc --disable-nls --enable-notmuch --enable-gpgme --enable-pgp --disable-smime --enable-bdb --enable-gdbm --disable-kyotocabinet --disable-qdbm --disable-tokyocabinet --disable-idn --disable-gss --disable-lmdb --disable-sasl --with-ui=ncurses --sysconfdir=/etc/neomutt --enable-ssl --disable-gnutls
Host System...x86_64-pc-linux-gnu
Note: defaultprefix is deprecated. Use options-defaults to set default options
Build System...x86_64-pc-linux-gnu
C compiler... x86_64-pc-linux-gnu-gcc -march=haswell -O2 -pipe
C++ compiler... x86_64-pc-linux-gnu-c++ -march=haswell -O2 -pipe
Build C compiler...cc
Checking for stdlib.h...ok
Checking whether the C compiler accepts -std=c99...yes
Checking for install...ok
Checking for sendmail.../usr/sbin/sendmail
Checking for minix/config.h...not found
Checking for sys/types.h...ok
Checking for sys/param.h...ok
Checking endian...little
Checking for sys/types.h...(cached) ok
Checking if -D_FILE_OFFSET_BITS=64 is needed...no
Checking for signal.h...ok
Checking for sys_siglist...ok
Checking for ioctl.h...not found
Checking for sys/ioctl.h...ok
Checking for sys/syscall.h...ok
Checking for sysexits.h...ok
Checking for fgetc_unlocked...ok
Checking for futimens...ok
Checking for getaddrinfo...ok
Checking for getsid...ok
Checking for iswblank...ok
Checking for mkdtemp...ok
Checking for strsep...ok
Checking for vasprintf...ok
Checking for wcscasecmp...ok
Checking libs for gethostent...none needed
Checking libs for setsockopt...none needed
Checking libs for getaddrinfo_a...-lanl
Checking for gpgme.h...ok
Checking libs for gpgme_new...-lgpgme
Checking for gpgme_op_export_keys...ok
Checking for notmuch.h...ok
Checking libs for notmuch_database_open...-lnotmuch
Checking for Notmuch API version 3...yes
Checking libs for waddnwstr...-lncursesw
Checking for ncursesw/ncurses.h...ok
Libraries for tgetent-Wl,-O1 -Wl,--as-needed -L/usr/lib -lncursesw -lnotmuch -lgpgme -lanl 
Checking libs for tgetent...-ltinfo
Checking libs for start_color...none needed
Checking libs for typeahead...none needed
Checking libs for bkgdset...none needed
Checking libs for curs_set...none needed
Checking libs for meta...none needed
Checking libs for use_default_colors...none needed
Checking for use_extended_names...ok
Checking for iconv() in /usr...no
Checking for iconv() in libiconv...no
Checking for iconv() in libc...yes
Checking whether iconv() needs const...no
Checking for openssl/bio.h...ok
Checking for openssl/err.h...ok
Checking for openssl/ssl.h...ok
Checking libs for X509_STORE_CTX_new...-lcrypto
Checking libs for SSL_new...-lssl
Checking for SSL_set_mode...ok
Checking for RAND_status...ok
Checking for RAND_egd...ok
Checking libs for deflate...-lz
Checking for X509_V_FLAG_PARTIAL_CHAIN...ok
Checking for BerkeleyDB in /usr/include/...no (expecting 5.3, got 6.0)
Checking for BerkeleyDB in /usr/include/db-5-3...no
Checking for BerkeleyDB in /usr/include/db53...no
Checking for BerkeleyDB in /usr/include/db5.3...yes
Checking for db.h...ok
Checking libs for db_env_create...-ldb-5.3
Checking for gdbm.h...ok
Checking libs for gdbm_open...-lgdbm
Created po/Makefile from po/Makefile.autosetup
Created doc/Makefile from doc/Makefile.autosetup
Created contrib/Makefile from contrib/Makefile.autosetup
Created test/Makefile from test/Makefile.autosetup
Created Makefile from Makefile.autosetup
Created config.h
Created doc/neomutt.1 from doc/neomutt.man
Summary of build options:

  Version:           20180223
  Host OS:           linux-gnu
  Install prefix:    /usr
  Compiler:           x86_64-pc-linux-gnu-gcc
  CFlags:            -march=haswell -O2 -pipe -std=c99 -fno-delete-null-pointer-checks -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -I/usr/include -DNCURSES_WIDECHAR  -I/include -I/usr/include/db5.3
  LDFlags:           -Wl,-O1 -Wl,--as-needed -L/usr/lib  -L/lib -L/usr/lib/db5.3
  Libs:              -lgdbm -ldb-5.3 -lz -lssl -lcrypto -ltinfo -lncursesw -lnotmuch -lgpgme -lanl 
  Header cache libs: -ldb-5.3 -lgdbm

  GPGME:             yes
  PGP:               yes
  SMIME:             no
  Notmuch:           yes
  Header Cache(s):   bdb gdbm
  Lua:               no

the segfault is still there

@ghost
Copy link
Author

ghost commented Mar 30, 2018

@gahr
Copy link
Member

gahr commented Mar 30, 2018

Ok so tinfo gets pulled in this way, but appears in the link line before ncursesw. It needs to be after. Last (maybe) thing I’ll ask you to check is to substitute tinfo with tinfow in the patch.

If it still fails, maybe this is enough for us to start relying on pkg-config and simplify our hand-made checks, what do you think @flatcap?

@WPettersson
Copy link
Contributor

I'm also on Gentoo, and can confirm that changing tinfo to tinfow in the patch earlier from @Herny64 fixes this issue on my end.

@ghost
Copy link
Author

ghost commented Mar 30, 2018

worked for me as well

@gahr
Copy link
Member

gahr commented Mar 30, 2018

Thank you both for testing!

gahr added a commit that referenced this issue Mar 31, 2018
gahr added a commit that referenced this issue Mar 31, 2018
This fixes the configure phase in NetBSD, which doesn't have a separate
tinfo library in base.

Issue #1118
@flatcap
Copy link
Member

flatcap commented Mar 31, 2018

@gahr
As you've solved this problem, then I'd say 'no', for now.

However simple pkg-config makes auto.def, there are still going to be distros that don't have support (or possibly have partial support).

Would we make auto.def more complicated, or have a separate one?
Do all distros' versions of pkg-config use the same names for packages?

@gahr
Copy link
Member

gahr commented Apr 1, 2018

You’re right, without a good survey of what’s there it’s difficult to tell whether we’d end up simplifying or duplicating things.

@flatcap
Copy link
Member

flatcap commented Apr 3, 2018

I've done a quick survey of my machine (Fedora 27).
It seems that a lot of the packages we need are supported by pkg-config,
but a couple of important ones aren't.

Packages for pkg-config:

  • ncursesw | slang
  • kyotocabinet
  • lmdb
  • qdbm
  • tokyocabinet
  • gnutls
  • krb5
  • krb5-gssapi
  • libidn | libidn2
  • libsasl2
  • lua
  • openssl

Missing from pkg-config:

  • bdb (-ldb-5.3)
  • gdbm (-lgdbm)
  • gpgme (-lgpgme)
  • notmuch (-lnotmuch)

@gahr
Copy link
Member

gahr commented Apr 3, 2018

gpgme has gpgme-config. Not sure about the others.

@gahr
Copy link
Member

gahr commented Apr 3, 2018

Anyway, in support of not using pkg-config, there are operating systems (like BSDs) that ship part of the dependencies in base (i.e., do not require the installation of 3rd party components). This is true for example for ncursesw. These in-base parts do not install pkg-config .pc files.

alepez added a commit to alepez/pez-gentoo-overlay that referenced this issue Apr 4, 2018
@alepez
Copy link

alepez commented Apr 4, 2018

I'm also on Gentoo. Tested with 20180223 and it segfaults. The patch provided by @Herny64 with tinfow instead of tinfo is working. Compiling with that patch and mutt is finally starting wll.

I've just created an ebuild, published here: https://github.com/alepez/pez-gentoo-overlay/tree/master/mail-client/neomutt

This is the patch:

diff --git a/auto.def b/auto.def
index 1d492ff2..5a762478 100644
--- a/auto.def
+++ b/auto.def
@@ -500,8 +500,10 @@ switch [opt-val with-ui ncurses] {
     }
 
     cc-with [list -libs -L$ncurses_prefix/lib] {
-      if {![cc-check-function-in-lib tgetent $ncurses_lib]} {
-        cc-check-function-in-lib tgetent tinfo
+      msg-checking "Libraries for tgetent"
+      msg-result   "[get-define LDFLAGS] [get-define LIBS]"
+      if {![cc-check-function-in-lib tgetent tinfow]} {
+        cc-check-function-in-lib tgetent $ncurses_lib
       }
       foreach f {start_color typeahead bkgdset curs_set meta use_default_colors} {
         cc-check-function-in-lib $f $ncurses_lib

gahr added a commit that referenced this issue Apr 5, 2018
* Build: restructure ncurses/tinfo checks

Issue #1118

* Fallback to ncurses library for tgetent

This fixes the configure phase in NetBSD, which doesn't have a separate
tinfo library in base.

Issue #1118
@gahr
Copy link
Member

gahr commented Apr 5, 2018

#1119 was merged.

@gahr gahr closed this as completed Apr 5, 2018
@ghost ghost removed the status:new-bug label Apr 5, 2018
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 type:bug Bug
Projects
None yet
Development

No branches or pull requests

4 participants