Crash in Bird function kif_choose_primary()
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@entry=0x66ce10) at krt.c:155 #1 0x000000000040be49 in ifa_recalc_primary (i=i@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@entry=0x68c140, scan=scan@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@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
On Tue, Nov 17, 2015 at 08:54:57PM +0000, Wei Huang wrote:
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: ... 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)?
Hi Thanks for the bugreport, this is clearly a bug. OTOH, calling 'birdc restart all' is unnecessary, you should call just 'birdc configure', BIRD automatically selects protocols to reconfigure/reload/restart. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Thanks Ondrej for the quick reply. For the bug, how long will it take to get the bug fixed?Is there a place for me to track the bug? Wei Sent using OWA for iPad ________________________________________ From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Tuesday, November 17, 2015 5:29:35 PM To: Wei Huang Cc: bird-users@network.cz Subject: Re: Crash in Bird function kif_choose_primary() On Tue, Nov 17, 2015 at 08:54:57PM +0000, Wei Huang wrote:
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: ... 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)?
Hi Thanks for the bugreport, this is clearly a bug. OTOH, calling 'birdc restart all' is unnecessary, you should call just 'birdc configure', BIRD automatically selects protocols to reconfigure/reload/restart. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
On Wed, Nov 18, 2015 at 07:29:13AM +0000, Wei Huang wrote:
Thanks Ondrej for the quick reply. For the bug, how long will it take to get the bug fixed?$B!)Is there a place for me to track the bug?
Hi Attached patch should fix the bug. It is a condition triggered by interface address removal notification received during protocol 'device' shutdown/restart. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Thanks for the quick fix. Wei ________________________________________ From: Ondrej Zajicek <santiago@crfreenet.org> Sent: Friday, November 20, 2015 5:21 AM To: Wei Huang Cc: bird-users@network.cz Subject: Re: Crash in Bird function kif_choose_primary() On Wed, Nov 18, 2015 at 07:29:13AM +0000, Wei Huang wrote:
Thanks Ondrej for the quick reply. For the bug, how long will it take to get the bug fixed?$B!)Is there a place for me to track the bug?
Hi Attached patch should fix the bug. It is a condition triggered by interface address removal notification received during protocol 'device' shutdown/restart. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (2)
-
Ondrej Zajicek -
Wei Huang