[Olsr-dev] OSLRd2 segmentation fault
Henning Rogge
(spam-protected)
Fri Apr 22 12:39:26 CEST 2016
Hi,
can you maybe compile an "OONF-GIT" package?
just use the Github repository as a package feed for olsrd2 and you
should get a "make menuconfig" selection named "oonf-olsrd2-git".
This should be an easy way to generate the latest version of the code
(which should contain a fix for at least one buggy path you
discovered).
This "impossible trace" is normally a sign that the executable doesn't
match the one of the build system.
Did you remove/uninstall the old executable before trying to install
the new one?
Henning
On Fri, Apr 22, 2016 at 12:34 PM, Gabriel <(spam-protected)> wrote:
> The patch works for Debian Wheezy on MIPS.
>
> I've also tested the patch on openwrt 15.05, and it is not working. The
> olsrd2 daemon is still segfaulting at the same point.
>
> This is the last debug message:
>
> 12:01:19.596 DEBUG(olsrv2_routing) eady gone 589: Initialize route entry
> dst 172.19.186.3 [0.0.0.0/0] with pathcost 16776960
>
> I compiled the package with "-ggdb" flag and then I tried to debug with
> gdb on the router.
>
> When olsrd2 crashes, gdb print this warning thus is impossible to backtrace:
>
> warning: GDB can't find the start of the function at 0x77fc5224.
>
> This is a stack dump just after the segfault:
>
> http://pastebin.com/d6t1AJLv
>
>
> I've also tried the patch I wrote and it works, so I assume that the
> problem is at the same memcpy instruction.
>
> Gabriel
>
>
>
>
>
> On 21/04/2016 07:59, Henning Rogge wrote:
>> On Thu, Apr 21, 2016 at 4:59 AM, Gabriel <(spam-protected)> wrote:
>>>> Using gdb I found out that the instruction causing the SEGFAULT was in
>>>> olsrv2_routing.c at line 598:
>>>>
>>>> memcpy(&rtentry->last_originator, last_originator,
>>>> sizeof(*last_originator));
>>>>
>>>> After the the SEGFAULT I printed the variable "last_originator" in gdb
>>>> and it was null.
>>>>
>>>> I
>>
>> Thank you for locating this place.
>>
>>> Sorry, I forgot to explain what I've done:
>>>
>>> I just put an if statement before the instructions to copy the memory
>>> locations only if the src (last_originator) is not null.
>>
>> Hmm... I think I see what happens.
>>
>> For some reason the IPv6 address on the local node is still missing
>> when the other side sends a NHDP message.
>>
>> Could you test the following attached patch? I think this one fixes
>> the original problem.
>>
>> Henning
>>
More information about the Olsr-dev
mailing list