birdc 2.0.0 crashes

Clemens Schrimpe clemens.schrimpe at gmail.com
Wed Dec 13 22:56:49 CET 2017


>> 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).

Running the 2.0.0 client inside gdb yields: (I installed libreadline6-dbg before testing)

bird> 
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79b6a0b 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  0x00007ffff79b6a0b in previous_history () at /build/readline6-RKA9OI/readline6-6.3/history.c:185
#1  0x00007ffff79b65e5 in rl_get_previous_history (count=<optimized out>, key=<optimized out>)
    at /build/readline6-RKA9OI/readline6-6.3/misc.c:609
#2  0x00007ffff799b990 in _rl_dispatch_subseq (key=65, map=<optimized out>, got_subseq=0)
    at /build/readline6-RKA9OI/readline6-6.3/readline.c:832
#3  0x00007ffff799c202 in _rl_dispatch_callback (cxt=0x61cb10) at /build/readline6-RKA9OI/readline6-6.3/readline.c:736
#4  0x00007ffff79b27ff in rl_callback_read_char () at /build/readline6-RKA9OI/readline6-6.3/callback.c:188
#5  0x0000000000403885 in input_read () at client/birdc.c:219
#6  0x00000000004020d3 in select_loop () at client/client.c:375
#7  main (argc=<optimized out>, argv=<optimized out>) at client/client.c:447

Maybe this provides a hint?!


And here's another interesting datapoint: Since I use BIRD to replace the dreadful Quagga-derivate Ubiquiti delivers with their EdgeRouters I compiled BIRD-2.0.0 for the MIPS platform and there it does not exhibit the observed behavior! 

Same libreadline version, though:

csch# ldd ./birdc-2.0.0 
	librt.so.1 => /lib/mips-linux-gnu/librt.so.1 (0x77118000)
	libhistory.so.6 => /lib/mips-linux-gnu/libhistory.so.6 (0x770ff000)
	libreadline.so.6 => /lib/mips-linux-gnu/libreadline.so.6 (0x770b5000)
	libtinfo.so.5 => /lib/mips-linux-gnu/libtinfo.so.5 (0x77087000)
	libpthread.so.0 => /lib/mips-linux-gnu/libpthread.so.0 (0x7705c000)
	libc.so.6 => /lib/mips-linux-gnu/libc.so.6 (0x76ee1000)
	/lib/ld.so.1 (0x77136000)

Maybe I should download the src for libreadline6 to look at history.c, line 185 ;-)

Hälsningar -

	Clemens

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20171213/b69cc91f/attachment.html>


More information about the Bird-users mailing list