Am 12.06.19 um 18:46 schrieb Stuart Henderson:> On 2019/06/12 18:38, A. Schulze wrote: >> >> >> Am 12.06.19 um 08:16 schrieb Wouter Wijngaards: >>> Otherwise, perhaps a stack trace of the issue could be useful >>> to have, or a way to reproduce it. >> >> I'm unable to produce core files. >> >> - ulimit -c unlimited is set >> - cat /proc/sys/kernel/core_pattern: /core/corefile >> >> /core exist outside and inside chroot and is writeable by nsd user >> nsd started chroot and without chroot >> nsd crash but: no corefile :-/ >> >> Any more magic required? > > Try running nsd in the foreground directly under gdb?OK here some result: I use to start nsd as "nsd -d -c /path/to/nsd.conf this start 3 processes 33786 ? Ss 0:00 \_ sshd: root at pts/1 33798 pts/1 Ss 0:00 | \_ -bash 30910 pts/1 S+ 0:00 | \_ /usr/sbin/nsd -c /chroot/etc/nsd/nsd.conf 30911 pts/1 S+ 0:00 | \_ /usr/sbin/nsd -c /chroot/etc/nsd/nsd.conf 32456 pts/1 S+ 0:00 | \_ /usr/sbin/nsd -c /chroot/etc/nsd/nsd.conf # gdb /usr/sbin/nsd GNU gdb (Debian 7.12-6) 7.12.0.20161007-git Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/sbin/nsd...(no debugging symbols found)...done. (gdb) attach 32456 Attaching to program: /usr/sbin/nsd, process 32456 Reading symbols from /lib/x86_64-linux-gnu/libssl.so.1.1...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libprotobuf-c.so.1...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libfstrm.so.0...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libcrypto.so.1.1...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libev.so.4...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...(no debugging symbols found)...done. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...(no debugging symbols found)...done. Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libnss_compat.so.2...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libnsl.so.1...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libnss_nis.so.2...(no debugging symbols found)...done. Reading symbols from /lib/x86_64-linux-gnu/libnss_files.so.2...(no debugging symbols found)...done. 0x00007ffbed5602e3 in epoll_wait () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) continue Continuing. {{{{{ now I start "nsd_control force_transfer" @ the SLAVE-Server ... }}}} Program received signal SIGSEGV, Segmentation fault. 0x00007ffbee331785 in SSL_shutdown () from /lib/x86_64-linux-gnu/libssl.so.1.1 (gdb) bt #0 0x00007ffbee331785 in SSL_shutdown () from /lib/x86_64-linux-gnu/libssl.so.1.1 #1 0x000055d50cb2ce0e in ?? () #2 0x000055d50cb2dfd8 in ?? () #3 0x00007ffbed81a413 in ev_invoke_pending () from /lib/x86_64-linux-gnu/libev.so.4 #4 0x00007ffbed81da06 in ev_run () from /lib/x86_64-linux-gnu/libev.so.4 #5 0x00007ffbed81ffd9 in event_base_loop () from /lib/x86_64-linux-gnu/libev.so.4 #6 0x000055d50cb30bdd in ?? () #7 0x000055d50cb30fcb in ?? () #8 0x000055d50cb3244c in ?? () #9 0x000055d50cae3ff7 in ?? () #10 0x00007ffbed4972e1 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #11 0x000055d50cae45fa in ?? () (gdb) quit A debugging session is active. Inferior 1 [process 32456] will be detached. Quit anyway? (y or n) y Detaching from program: /usr/sbin/nsd, process 32456 Hope, this helps ... Andreas
A. Schulze
2019-Jun-12 18:08 UTC
[nsd-users] Fwd: NSD 4.2.0 intermittent segfaults @ libssl ?
now with debug symbols installed :-) (gdb) bt #0 0x00007ffbee334a8a in SSL_free () from /lib/x86_64-linux-gnu/libssl.so.1.1 #1 0x000055d50cb2ce1a in cleanup_tcp_handler (data=0x55d50ec17d80) at server.c:3001 #2 0x000055d50cb2dfd8 in handle_tcp_reading (fd=<optimized out>, event=<optimized out>, arg=0x55d50ec17d80) at server.c:3188 #3 0x00007ffbed81a413 in ev_invoke_pending () from /lib/x86_64-linux-gnu/libev.so.4 #4 0x00007ffbed81da06 in ev_run () from /lib/x86_64-linux-gnu/libev.so.4 #5 0x00007ffbed81ffd9 in event_base_loop () from /lib/x86_64-linux-gnu/libev.so.4 #6 0x000055d50cb30bdd in server_child (nsd=nsd at entry=0x55d50cdbffa0 <nsd>) at server.c:2652 #7 0x000055d50cb30fcb in restart_child_servers (nsd=nsd at entry=0x55d50cdbffa0 <nsd>, region=region at entry=0x55d50ebf9490, netio=netio at entry=0x55d50ec0f7c0, xfrd_sock_p=0x55d50ebca532) at server.c:427 #8 0x000055d50cb3244c in server_main (nsd=0x55d50cdbffa0 <nsd>) at server.c:2200 #9 0x000055d50cae3ff7 in main (argc=<optimized out>, argv=<optimized out>) at nsd.c:1147