Re: bird 2.0.0 issues
On 14.12.2017 23:44, Ondrej Zajicek wrote: > On Thu, Dec 14, 2017 at 09:19:32PM +0200, Radu Anghel wrote: > > Hi > > Tested add-path between old and new BIRD, works for me. Does the problem > appear even with fixed channel definitions? It is possible that it is > also related, like add-path announced in capabilities due to the second > channel (with add-path), but incoming update dispatched by the first one > (without). > Sorry I didn't test it yesterday also, add-path works for me too with only one channel definition, so #3 was the same. Thanks, Radu
Re: Bird Installation Guide
Hi Moyaze, Thanks a lot for your help. The above links are very helpful and I have installed BIRD in my linux 7.0.4. But now, I am having issue, is that, how I can verify the BIRD BGP routing table and its routes learning from other PEERS. On 14 December 2017 at 13:47, Moyaze Shivjiwrote: > > On 14 Dec 2017, at 05:42, Pardeep Sharma > wrote: > > Hi Bird Experts, > > Help will be appreciated!! > > I have below some queries for BIRD. > > 1. I am running BIRD in Ubuntu 16.04 first time, So can you please guide > me its installation process. If is there any link/document, please share > with me. > > > This documentation will help you. > > http://bird.network.cz/?get_doc=bird-3.html > https://gitlab.labs.nic.cz/labs/bird/wikis/home > > > Mo > > > -- Thanks & Regards Pardeep
Re: birdc 2.0.0 crashes
On Thu, Dec 14, 2017 at 04:50:20PM +0100, Clemens Schrimpe wrote: > > > On 14.12.2017, at 14:18, Ondrej Zajicekwrote: > > > > What is output of ldd birdc for 1.6.3? > > # for 2.0.0 > newnoc:~/builds/bird-2.0.0# ldd birdc > linux-vdso.so.1 => (0x7ffeb07dd000) > libhistory.so.6 => /lib/x86_64-linux-gnu/libhistory.so.6 > (0x7fcab708d000) > libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 > (0x7fcab6e47000) > libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 > (0x7fcab6c1d000) > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > (0x7fcab6a0) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7fcab6636000) > /lib64/ld-linux-x86-64.so.2 (0x55a00f20b000) > > # for 1.6.3 > newnoc:~/builds/bird-2.0.0# ldd /usr/local/sbin/birdc > linux-vdso.so.1 => (0x7ffcbb5d2000) > libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 > (0x7f8e4bd8c000) > libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 > (0x7f8e4bb63000) > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > (0x7f8e4b945000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f8e4b57b000) > /lib64/ld-linux-x86-64.so.2 (0x557f92c5) Hi It seems like history functions are both in independent libhistory and as a part of libreadline. We link birdc to both libraries, which possibly caused some confusion (readline internally called its history functions, while birdc uses functions from libhistory). The same problem is described here: https://lists.gnu.org/archive/html/bug-readline/2015-10/msg0.html Could you try to build bird/birdc (without any patches i sent before) using: make CLIENT_LIBS="-lreadline -ltinfo" ? -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@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." signature.asc Description: PGP signature
Re: birdc 2.0.0 crashes
On Thu, Dec 14, 2017 at 04:48:37PM +0100, Clemens Schrimpe wrote: > > And "p history_offset"? Should be 0. > > Nope - it is 2: > > Program received signal SIGSEGV, Segmentation fault. > 0x779b6a0b in previous_history () at > /build/readline6-RKA9OI/readline6-6.3/history.c:185 > 185 /build/readline6-RKA9OI/readline6-6.3/history.c: No such file or > directory. > (gdb) p history_offset > $1 = 2 > (gdb) p *(the_history[2]) > Cannot access memory at address 0x10 > > We are up to something! :-) Hi Perhaps it is just missing initialization? Please try attached patch. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@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." diff --git a/client/birdc.c b/client/birdc.c index f1aea2fe..53a6b34e 100644 --- a/client/birdc.c +++ b/client/birdc.c @@ -157,6 +157,7 @@ history_init(void) void input_init(void) { + using_history(); if (interactive) history_init(); rl_readline_name = "birdc"; signature.asc Description: PGP signature
Re: bird 2.0.0 issues
On Thu, Dec 14, 2017 at 09:19:32PM +0200, Radu Anghel wrote: > On 14.12.2017 21:09, Ondrej Zajicek wrote: > Hi, > > I can confirm that keeping only one channel definition fixes both #1 and > #2. A check warning/rejecting this would be nice :) Hi Tested add-path between old and new BIRD, works for me. Does the problem appear even with fixed channel definitions? It is possible that it is also related, like add-path announced in capabilities due to the second channel (with add-path), but incoming update dispatched by the first one (without). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@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." signature.asc Description: PGP signature
Re: bird 2.0.0 issues
On 14.12.2017 21:09, Ondrej Zajicek wrote: > Hi > > You have doubled channel definitions, one with implicit arguments > ('ipv4;'), and one with explicit arguments ('ipv4 { ... }'). That is > likely a cause of issue #2. We definitely should add a check for that. > Could you try config file with only one channel of each type per > protocol? > > It may be also issue #1, or perhaps it is problem with newer Linux > kernels (i checked up to 4.13). But regardless of Linux API, we still > should get at least periodic 'Scanning routing table' messages. > > Issue #3 is most likely a bug in BGP, i will check that. > Hi, I can confirm that keeping only one channel definition fixes both #1 and #2. A check warning/rejecting this would be nice :) Thanks, Radu
Re: bird 2.0.0 issues
On 14.12.2017 20:31, Ondrej Zajicek wrote: > Hello > > Thanks for reports Could you send me your config file? If you add 'debug > all' to your Kernel protocol, what you see in logs? > Nothing is logged if I enable debug all to the kernel protocol, total silence. I'm attaching my current config. Thanks, Radu log syslog all; # log "/tmp/bird.log" all; #timeformat protocol "%s"; router id 1.2.3.4; define myASN = 65533; protocol device DEVICE { scan time 3600; } protocol kernel KERNEL4 { debug all; #learn; ipv4; scan time 60; ipv4 { import all; export filter { if proto = "STATIC4" then accept; reject; }; }; } protocol kernel KERNEL6 { debug all; #learn; ipv6; scan time 60; ipv6 { import all; export filter { if proto = "STATIC6" then accept; reject; }; }; } protocol static STATIC4 { ipv4; route 10.0.0.0/24 via "eth0"; } protocol static STATIC6 { ipv6; route 2001:db8::/64 via "eth0"; } protocol bgp RC4 { debug { events }; disabled off; local as myASN; ipv4; neighbor x.x.x.x as 48112; multihop 2; passive off; ipv4 { next hop self; import all; export none; # add paths on; }; } protocol bgp RC6 { debug { events }; disabled off; local as myASN; ipv6; neighbor ::: as 48112; multihop 2; passive off; ipv6 { next hop self; import all; export none; #add paths on; }; }
Re: bird 2.0.0 issues
On Thu, Dec 14, 2017 at 08:23:01PM +0200, Radu Anghel wrote: > Hello, > > I just installed bird 2.0.0 on a test machine to try it out and I have > some issues: > (CentOS 7 / kernel 4.14.5-1.el7.elrepo.x86_64) > > 1) the kernel protcol sees no routes (both ipv4 and ipv6) and doesn't > export any routes > > 2) each time I change the config and do a 'birdc conf' it resets all BGP > sessions and logs > > bird: Cannot reconfigure channel XXX.ipv4 > bird: Cannot remove channel XXX.ipv4 > bird: Restarting protocol XXX > > 3) can't establish BGP with bird 1.6.3 if I have add paths on; on the > session - 2.0.0 says: "BGP Error: Malformed attribute list" and 1.6.3: > "Socket: Connection closed". add paths on; works between two bird 2.0.0. > > Could these be caused by kernel or *lib versions or are these bugs in bird? Hello Thanks for reports Could you send me your config file? If you add 'debug all' to your Kernel protocol, what you see in logs? -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@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." signature.asc Description: PGP signature
bird 2.0.0 issues
Hello, I just installed bird 2.0.0 on a test machine to try it out and I have some issues: (CentOS 7 / kernel 4.14.5-1.el7.elrepo.x86_64) 1) the kernel protcol sees no routes (both ipv4 and ipv6) and doesn't export any routes 2) each time I change the config and do a 'birdc conf' it resets all BGP sessions and logs bird: Cannot reconfigure channel XXX.ipv4 bird: Cannot remove channel XXX.ipv4 bird: Restarting protocol XXX 3) can't establish BGP with bird 1.6.3 if I have add paths on; on the session - 2.0.0 says: "BGP Error: Malformed attribute list" and 1.6.3: "Socket: Connection closed". add paths on; works between two bird 2.0.0. Could these be caused by kernel or *lib versions or are these bugs in bird? Thanks, Radu
Re: birdc 2.0.0 crashes
❦ 14 décembre 2017 16:48 +0100, Clemens Schrimpe: > Nope - it is 2: > > Program received signal SIGSEGV, Segmentation fault. > 0x779b6a0b in previous_history () at > /build/readline6-RKA9OI/readline6-6.3/history.c:185 > 185 /build/readline6-RKA9OI/readline6-6.3/history.c: No such file or > directory. > (gdb) p history_offset > $1 = 2 > (gdb) p *(the_history[2]) > Cannot access memory at address 0x10 > > We are up to something! :-) > > -c You could start birdc from gdb: gbd --args birdc Then, add a watchpoint on history_offset: watch history_offset Then "run". Each time gdb stops because history_offset changed, grab a "bt". Maybe it's not initialized to 0 properly? It should be increased by add_history calls. I don't see anything suspicious in bird about all that (it's all handled by libreadline itself). -- Make input easy to proofread. - The Elements of Programming Style (Kernighan & Plauger)
Re: birdc 2.0.0 crashes
> On 14.12.2017, at 14:18, Ondrej Zajicekwrote: > > What is output of ldd birdc for 1.6.3? # for 2.0.0 newnoc:~/builds/bird-2.0.0# ldd birdc linux-vdso.so.1 => (0x7ffeb07dd000) libhistory.so.6 => /lib/x86_64-linux-gnu/libhistory.so.6 (0x7fcab708d000) libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x7fcab6e47000) libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x7fcab6c1d000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fcab6a0) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7fcab6636000) /lib64/ld-linux-x86-64.so.2 (0x55a00f20b000) # for 1.6.3 newnoc:~/builds/bird-2.0.0# ldd /usr/local/sbin/birdc linux-vdso.so.1 => (0x7ffcbb5d2000) libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x7f8e4bd8c000) libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x7f8e4bb63000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f8e4b945000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f8e4b57b000) /lib64/ld-linux-x86-64.so.2 (0x557f92c5) Salutations - Clemens
Re: birdc 2.0.0 crashes
> And "p history_offset"? Should be 0. Nope - it is 2: Program received signal SIGSEGV, Segmentation fault. 0x779b6a0b in previous_history () at /build/readline6-RKA9OI/readline6-6.3/history.c:185 185 /build/readline6-RKA9OI/readline6-6.3/history.c: No such file or directory. (gdb) p history_offset $1 = 2 (gdb) p *(the_history[2]) Cannot access memory at address 0x10 We are up to something! :-) -c PS: I did: Invoke birdc, „show proto\n“, either ^P or ↑ →
Re: birdc 2.0.0 crashes
On Wed, Dec 13, 2017 at 10:56:49PM +0100, Clemens Schrimpe wrote: > >> Yes, works fine. And it also appears to be read when I restart birdc, > >> because now I can crash it with ^P or ↑ without having typed a command > >> before. > >> (strace confirmed: .birdc_history is read successfully) > > > > You can try attached patch (disables reading of history). > > ... to no avail ... still crashes the same way. > > > > You can also try to build BIRD 1.6.3 in the same way like 2.0.0 and see > > if it by chance does not express the same problem. > > No, it doesn't (I built the 2.0.0 the same way as the 1.6.3 - and all the > others). Hi What is output of ldd birdc for 1.6.3? I guess that the problem is not related to BIRD code itself but to the change in libraries, as we changed the order of detected libraries. Could you try to build and test GIT master branch (which is 1.6.x, but also with these changes as in 2.0)? Perhaps there is some problem with combination of libhistory and libtinfo on your setup, while libhistory and libncurses works fine. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@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."
Re: birdc 2.0.0 crashes
❦ 14 décembre 2017 13:13 +0100, Clemens Schrimpe: > (gdb) p the_history > $1 = (HIST_ENTRY **) 0x609470 > (gdb) p the_history[0] > $2 = (HIST_ENTRY *) 0x609630 > (gdb) p *(the_history[0]) > $3 = {line = 0x609650 „show protocols „, timestamp = 0x609610 "", data = 0x0} > > > Double-plus-weird! And "p history_offset"? Should be 0. -- Replace repetitive expressions by calls to a common function. - The Elements of Programming Style (Kernighan & Plauger)
Re: birdc 2.0.0 crashes
> Use "bt full". > > What’s "p the_history" and "p the_history[0]"? Looks legit: Program received signal SIGSEGV, Segmentation fault. 0x779b6a0b in previous_history () at /build/readline6-RKA9OI/readline6-6.3/history.c:185 185 /build/readline6-RKA9OI/readline6-6.3/history.c: No such file or directory. (gdb) bt full #0 0x779b6a0b in previous_history () at /build/readline6-RKA9OI/readline6-6.3/history.c:185 No locals. #1 0x779b65e5 in rl_get_previous_history (count=, key=) at /build/readline6-RKA9OI/readline6-6.3/misc.c:609 old_temp = 0x0 temp = 0x0 key = count = 1 #2 0x7799b990 in _rl_dispatch_subseq (key=65, map=, got_subseq=0) at /build/readline6-RKA9OI/readline6-6.3/readline.c:832 r = 0 newkey = func = cxt = #3 0x7799c202 in _rl_dispatch_callback (cxt=0x61cb10) at /build/readline6-RKA9OI/readline6-6.3/readline.c:736 nkey = r = #4 0x779b27ff in rl_callback_read_char () at /build/readline6-RKA9OI/readline6-6.3/callback.c:188 line = eof = jcode = olevel = {{__jmpbuf = {6319136, 7997659007791416985, -1, 0, 4212971, 6319559, 7997659007814485657, 7997676843090331289}, __mask_was_saved = 0, __saved_mask = {__val = {0 #5 0x00403885 in input_read () at client/birdc.c:219 No locals. #6 0x004020d3 in select_loop () at client/client.c:375 select_fds = {__fds_bits = {1, 0 }} rv = #7 main (argc=, argv=) at client/client.c:447 No locals. (gdb) p the_history $1 = (HIST_ENTRY **) 0x609470 (gdb) p the_history[0] $2 = (HIST_ENTRY *) 0x609630 (gdb) p *(the_history[0]) $3 = {line = 0x609650 „show protocols „, timestamp = 0x609610 "", data = 0x0} Double-plus-weird! I keep digging … Clemens
Re: birdc 2.0.0 crashes
❦ 13 décembre 2017 22:56 +0100, Clemens Schrimpe: > bird> > Program received signal SIGSEGV, Segmentation fault. > 0x779b6a0b in previous_history () at > /build/readline6-RKA9OI/readline6-6.3/history.c:185 > 185 /build/readline6-RKA9OI/readline6-6.3/history.c: No such file or > directory. > (gdb) bt > #0 0x779b6a0b in previous_history () at > /build/readline6-RKA9OI/readline6-6.3/history.c:185 > #1 0x779b65e5 in rl_get_previous_history (count=, > key=) > at /build/readline6-RKA9OI/readline6-6.3/misc.c:609 > #2 0x7799b990 in _rl_dispatch_subseq (key=65, map=, > got_subseq=0) > at /build/readline6-RKA9OI/readline6-6.3/readline.c:832 > #3 0x7799c202 in _rl_dispatch_callback (cxt=0x61cb10) at > /build/readline6-RKA9OI/readline6-6.3/readline.c:736 > #4 0x779b27ff in rl_callback_read_char () at > /build/readline6-RKA9OI/readline6-6.3/callback.c:188 > #5 0x00403885 in input_read () at client/birdc.c:219 > #6 0x004020d3 in select_loop () at client/client.c:375 > #7 main (argc=, argv=) at client/client.c:447 > > Maybe this provides a hint?! Use "bt full". What's "p the_history" and "p the_history[0]"? -- Having nothing, nothing can he lose. -- William Shakespeare, "Henry VI"
Re: Bird Installation Guide
> On 14 Dec 2017, at 05:42, Pardeep Sharmawrote: > > Hi Bird Experts, > > Help will be appreciated!! > > I have below some queries for BIRD. > > 1. I am running BIRD in Ubuntu 16.04 first time, So can you please guide me > its installation process. If is there any link/document, please share with > me. > This documentation will help you. http://bird.network.cz/?get_doc=bird-3.html https://gitlab.labs.nic.cz/labs/bird/wikis/home Mo