Hello everybody,

Today I was experimenting with a Bird setup. All the Bird machines are CentOS 7.6 VMs running in Virtualbox on my laptop. When I add an OSPF virtual link to hook up two area 0's together I get a segfault of Bird 1.6.4 itself. All the links between the VMs are defined as "Internal Network" links. Each connection between routers got it's own internal network, so there should be no overlap between those connections.

Steps to reproduce:
1. Create a bird.conf with the following contents specified in the attached bird.conf
2. Start Bird
3. Add the following line to the area 1 config:
       virtual link 2.2.2.2;
4. Run `birdc configure`
5. Observe the following error in your syslog:
Dec 8 21:01:35 r3 kernel: bird[3469]: segfault at 32 ip 0000000000429fe0 sp 00007fff599d3350 error 4 in bird[400000+73

I've ran Bird 1.6.4 in a gdb session with the debug symbols installed and I created a stack trace after the crash. This gives the output which can be found in the attached gdb.txt. What is interesting to note is that the segfault only occurs when I reconfigure Bird. I can start it just fine right after the crash and the OSPF sessions come back online and everything.

I hope this gives some useful information about what is happening. If you need any more information please don't hesitate to ask. It is a test network, so I can tell you absolutely everything about it, nothing is a company secret or something like that :).

Kind regards,
Cybertinus
router id 3.3.3.3;

protocol device {
    scan time 2;
}

protocol kernel {
    export all;
}

protocol direct direct1 {
    interface "lo";
}

protocol ospf ospf1 {
    import all;
    export all;
    area 0.0.0.0 {
        interface "enp0s10" {
            type pointopoint;
        };
    };
    area 1 {
        interface "enp0s8" {
            type pointopoint;
        };
        interface "enp0s9" {
            type pointopoint;
        };
        virtual link 2.2.2.2;
    };
}
[root@r3 ~]# gdb --args bird -d
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/bird...Reading symbols from 
/usr/lib/debug/usr/sbin/bird.debug...done.
done.
(gdb) run
Starting program: /sbin/bird -d
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
bird: Started
bird: Reconfiguring

Program received signal SIGSEGV, Segmentation fault.
ospf_iface_reconfigure (ifa=0x69afe0, new=new@entry=0x6afab0) at 
../../../proto/ospf/iface.c:758
758       int new_stub = ospf_iface_stubby(new, ifa->addr);
Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7.x86_64
(gdb) bt
#0  ospf_iface_reconfigure (ifa=0x69afe0, new=new@entry=0x6afab0) at 
../../../proto/ospf/iface.c:758
#1  0x0000000000423230 in ospf_reconfigure (P=0x6842b0, c=0x6af630) at 
../../../proto/ospf/ospf.c:694
#2  0x000000000040c0b0 in proto_reconfigure (type=1, nc=0x6af630, oc=0x680e90, 
p=0x6842b0) at ../../nest/proto.c:422
#3  protos_commit (new=new@entry=0x6adf30, old=0x67aee0, 
force_reconfig=force_reconfig@entry=0, type=type@entry=1) at 
../../nest/proto.c:535
#4  0x0000000000441163 in config_do_commit (c=c@entry=0x6adf30, 
type=type@entry=1) at conf.c:271
#5  0x000000000044157f in config_commit (c=0x6adf30, type=type@entry=1, 
timeout=timeout@entry=0) at conf.c:361
#6  0x0000000000448243 in cmd_reconfig (name=<optimized out>, 
type=type@entry=1, timeout=0) at main.c:314
#7  0x000000000043cd37 in cf_parse () at cf-parse.y:1035
#8  0x000000000044142d in cli_parse (c=c@entry=0x7fffffffe130) at conf.c:173
#9  0x000000000040ed1a in cli_command (c=c@entry=0x6a78d0) at 
../../nest/cli.c:271
#10 0x000000000040eeb5 in cli_event (data=0x6a78d0) at ../../nest/cli.c:300
#11 0x0000000000442012 in ev_run (e=0x6a7990) at event.c:85
#12 ev_run_list (l=0x679310 <global_event_list>) at event.c:142
#13 0x0000000000444629 in io_loop () at io.c:2097
#14 0x0000000000402fed in main (argc=<optimized out>, argv=<optimized out>) at 
main.c:885

Reply via email to