On 2013/08/23 04:03, Bogdan Andu wrote: > $ sudo gdb ./relayd > GNU gdb 6.3 > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and > you are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "amd64-unknown-openbsd5.3"... > (gdb) attach 32389 > Attaching to program: /usr/src/usr.sbin/relayd-current/relayd, process > 32389 > Loaded symbols for /usr/src/usr.sbin/relayd-current/relayd > Reading symbols from /usr/lib/libevent.so.3.1...done. > Loaded symbols for /usr/lib/libevent.so.3.1 > Reading symbols from /usr/lib/libssl.so.19.0...done. > Loaded symbols for /usr/lib/libssl.so.19.0 > Reading symbols from /usr/lib/libcrypto.so.22.0...done. > Loaded symbols for /usr/lib/libcrypto.so.22.0 > Reading symbols from /usr/lib/libutil.so.11.4...done. > Loaded symbols for /usr/lib/libutil.so.11.4 > Reading symbols from /usr/lib/libc.so.66.2...done. > Loaded symbols for /usr/lib/libc.so.66.2 > Reading symbols from /usr/libexec/ld.so...done. > Loaded symbols for /usr/libexec/ld.so > [Switching to thread 1032389] > 0x000005462804581a in kevent () at <stdin>:2 > 2 <stdin>: No such file or directory. > in <stdin> > Current language: auto; currently asm > (gdb) continue > Continuing. > Program received signal SIGSEGV, Segmentation fault.
A backtrace from this one would be helpful, that will hopefully show the chain of functions which called event_queue_insert().. > event_queue_insert (base=0x0, ev=0x54621afd208, queue=8) at /usr/src/ > lib/libevent/event.c:997 > 997 base->event_count++; > Current language: auto; currently c > (gdb) > Continuing. > But why this child crashes in /usr/src/lib/libevent/event.c, line 997 ? It is attempting to dereference a null pointer. > event_queue_insert (base=0x0, ev=0x54621afd208, queue=8) at > /usr/src/lib/libevent/event.c:997 ^^^^^^^^ > 997 base->event_count++; ^^^^^^