Re: [Babel-users] babeld crashes

2016-04-17 Thread Juliusz Chroboczek
>   if(channels_len == 0) {

Not necessary, free(NULL) is a nop.

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] babeld crashes

2016-04-17 Thread Juliusz Chroboczek
> I think the attached patch solves this issue.

Well spotted, thanks.  Applied.

(This is only relevant to the current head, people running 1.7.* are not
affected.)

-- Juliusz

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] babeld crashes

2016-04-17 Thread Matthieu Boutier
> #3  0x76e4bb80 in malloc_printerr (action=1,
>str=0x76efba6c "double free or corruption (fasttop)", ptr=)
>at malloc.c:4996

> #5  0x0001a35c in update_route (id=, prefix=,
>plen=, src_prefix=, src_plen=0 '\000',
>seqno=17136, refmetric=96, interval=1600, neigh=0xc5d9d8,
>nexthop=0xc5d9e0 "\376\200", channels=0x7ede598c "", channels_len=0)
>at route.c:920

I think the attached patch solves this issue.

Matthieu



0001-Fix-route-channels-double-free-corruption.patch
Description: Binary data
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babeld crashes

2016-04-16 Thread Dave Taht
I eliminated the -l option from all my boxes and thus far I have not
seen it crash.

But I am not trying too hard to make things on my network come and go
right now, I'm busy on other things: http://blog.cerowrt.org

I will put a couple boxes under valgrind the next time I re-org the
network, sometime later this week.

On Sat, Apr 16, 2016 at 9:04 PM, Juliusz Chroboczek
 wrote:
> Dave, could you please try to reproduce this under valgrind?



-- 
Dave Täht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babeld crashes

2016-04-16 Thread Juliusz Chroboczek
Dave, could you please try to reproduce this under valgrind?

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] babeld crashes

2016-04-15 Thread Dave Taht
And I got it to happen on the pi3.

(gdb) bt
#0  0x76e09f70 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x76e0b324 in __GI_abort () at abort.c:89
#2  0x76e45954 in __libc_message (do_abort=,
fmt=0x76efb830 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
#3  0x76e4bb80 in malloc_printerr (action=1,
str=0x76efba6c "double free or corruption (fasttop)", ptr=)
at malloc.c:4996
#4  0x76e4cb24 in _int_free (av=, p=,
have_lock=100916) at malloc.c:3840
#5  0x0001a35c in update_route (id=, prefix=,
plen=, src_prefix=, src_plen=0 '\000',
seqno=17136, refmetric=96, interval=1600, neigh=0xc5d9d8,
nexthop=0xc5d9e0 "\376\200", channels=0x7ede598c "", channels_len=0)
at route.c:920
#6  0x0001f10c in parse_packet (from=0x0, from@entry=0x7ede5a30 "\n", ifp=0x0,
packet=0x1 ,
packetlen=) at message.c:644
#7  0x000126d8 in main (argc=, argv=)
at babeld.c:675




On Fri, Apr 15, 2016 at 6:39 PM, Dave Taht  wrote:
> I have been experiencing babeld crashes since starting to use git head
> a few weeks ago.
>
> Today after putting in git head everywhere I have been getting quite a
> few crashes (no babel process running, bunch of babel routes left
> behind) - I was not paying much attention to it ( these are a bunch of
> new machines that I was doing other things to and I had assumed it was
> systemd messing up on a restart (I am new to systemd), so I would see
> a creat(/var/run/babeld.pid): File exists...
>
> but nope, I'm segvioing at some point.
>
> I did just manage to see a crash go by and get a core dump. I will
> reboot and retry, then go back a few versions. It took about 5 minutes
> of operation on an active network before this happened, this time
>
> 0  malloc_consolidate (av=av@entry=0x7f47ad14fc00 )
> at malloc.c:4136
> 4136malloc.c: No such file or directory.
> (gdb) up
> #1  0x7f47ace0c9d4 in _int_malloc (
> av=av@entry=0x7f47ad14fc00 , bytes=bytes@entry=3916)
> at malloc.c:3417
> 3417in malloc.c
> (gdb) up
> #2  0x7f47ace0f4ae in __GI___libc_malloc (bytes=bytes@entry=3916)
> at malloc.c:2895
> 2895in malloc.c
> (gdb) up
> #3  0x0040c4f7 in buffer_update (ifp=ifp@entry=0x1d365e0,
> prefix=prefix@entry=0x1d37dc0 "\375\020", plen=plen@entry=128 '\200',
> src_prefix=src_prefix@entry=0x1d37dd1 "", src_plen=src_plen@entry=0 
> '\000')
> at message.c:1443
> 1443ifp->buffered_updates = malloc(n * sizeof(struct
> buffered_update));
> (gdb) up
> #4  0x0040c85a in send_update (ifp=ifp@entry=0x1d365e0,
> urgent=urgent@entry=0,
> prefix=0x1d37dc0 "\375\020", plen=,
> src_prefix=0x1d37dd1 "", src_plen=0 '\000')
> at message.c:1497
> 1497buffer_update(ifp, prefix, plen, src_prefix, src_plen);
>
> (gdb) up
> #5  0x0040c6ed in send_self_update (ifp=0x1d365e0) at message.c:1595
> 1595send_update(ifp, 0, xroute->prefix, xroute->plen,
> (gdb) up
> #6  0x0040c86f in send_update (ifp=0x1d365e0, urgent=0,
> prefix=prefix@entry=0x0,
> plen=plen@entry=0 '\000', src_prefix=0x414460  "",
> src_plen=src_plen@entry=0 '\000')
> at message.c:1500
> 1500send_self_update(ifp);
>
> #7  0x0040c93f in send_update (ifp=ifp@entry=0x1d365e0,
> urgent=urgent@entry=0,
> prefix=prefix@entry=0x0, plen=plen@entry=0 '\000',
> src_prefix=src_prefix@entry=0x0,
> src_plen=src_plen@entry=0 '\000') at message.c:1524
> 1524send_update(ifp, urgent, NULL, 0, zeroes, 0);
>
> #8  0x00402f80 in main (argc=, argv= out>) at babeld.c:767
> 767send_update(ifp, 0, NULL, 0, NULL, 0);
>
> *My babeld.conf is this:
>
> default enable-timestamps true
> redistribute local deny
>
> *babeld command line:
>
> babeld -l -G 33123 -S /var/lib/babeld/state eno1 wlp2s0 wlx9cefd5ff0b2c
>
> the network has got sort of complex in recent days.
>
> --
> Dave Täht
> Let's go make home routers and wifi faster! With better software!
> http://blog.cerowrt.org



-- 
Dave Täht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users