Crash in Bird function kif_choose_primary()

Wei Huang whuang at talari.com
Tue Nov 17 21:54:57 CET 2015


I am using Bird on my system, and when I change config (use different interfaces for OSPF, from using tap-0, tap-4 to tap-0, tap-11) and restart Bird using "birdc restart all", I got a coredump in Bird with the following backtrace:


(gdb) bt
#0  kif_choose_primary (i=i at entry=0x66ce10) at krt.c:155
#1  0x000000000040be49 in ifa_recalc_primary (i=i at entry=0x66ce10) at ../../nest/iface.c:469
#2  0x000000000040c9f5 in ifa_delete (a=<optimized out>) at ../../nest/iface.c:579
#3  0x0000000000441649 in nl_parse_addr (h=h at entry=0x68c140, scan=scan at entry=0) at netlink.c:554
#4  0x000000000044182a in nl_async_msg (h=0x68c140) at netlink.c:979
#5  nl_async_hook (sk=<optimized out>, size=<optimized out>) at netlink.c:1026
#6  0x000000000043ba65 in sk_read (s=s at entry=0x68e150) at io.c:1831
#7  0x000000000043c2b2 in io_loop () at io.c:2187
#8  0x0000000000402ca1 in main (argc=<optimized out>, argv=<optimized out>) at main.c:844

I added some debug message and noticed the problem is the device protocol is restarting, and kif_shutdown is called, then as the backtrace shows it tries to delete the interface and call kif_choose_primary() while kif_proto is NULL at the time. I comment out that part of the code and noticed kif_start is called after those kif_choose_primary() calls.


I am new to Bird code, so is this a Bird bug or I am not doing things correct (i.e. when change config, I shouldn't just call birdc restart all)?


Wei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20151117/9a6c749d/attachment.html>


More information about the Bird-users mailing list