I am writing a C program which crashes every time I try to stop the daemon, works well otherwise. This tells me it probably has to do something with free(). I spent sometime on debugging but still no luck. Here's the core dump
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/quagga/bgpd --daemon -A 127.0.0.1'.
Program terminated with signal 6, Aborted.
#0 0x00007f5e896b2165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007f5e896b2165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f5e896b53e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f5e8a721cea in core_handler (signo=<optimized out>, siginfo=<optimized out>, context=<optimized out>) at sigevent.c:216
#3 <signal handler called>
#4 0x00007f5e896fa939 in free () from /lib/x86_64-linux-gnu/libc.so.6
#5 0x00007f5e8a70f00b in zfree (type=<optimized out>, ptr=<optimized out>) at memory.c:132
#6 0x00007f5e8abf89f6 in bgp_bfd_peer_free (peer=0x7f5e8b32ab30) at bgp_bfd.c:69
#7 0x00007f5e8abaa803 in peer_group_delete (group=group@entry=0x7f5e8b1d0dc0) at bgpd.c:2176
#8 0x00007f5e8abaa96b in bgp_delete (bgp=0x7f5e8b31af20) at bgpd.c:2730
#9 0x00007f5e8aba47bb in bgp_exit (status=<optimized out>) at bgp_main.c:238
#10 sigint () at bgp_main.c:206
#11 0x00007f5e8a721d27 in quagga_sigevent_process () at sigevent.c:111
#12 0x00007f5e8a70d7fe in thread_fetch (m=0x7f5e8b1c8900, fetch=fetch@entry=0x7fff76f2f3d8) at thread.c:1279
#13 0x00007f5e8aba4592 in main (argc=4, argv=0x7fff76f2f598) at bgp_main.c:452
Anyone have idea what is signal 6 and why is it being generated?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire