[Olsr-users] olsrv2: segfault when a link goes down

Vigneswaran R (spam-protected)
Wed May 18 08:46:00 CEST 2011


On 05/18/2011 11:57 AM, Henning Rogge wrote:
> On Wed May 18 2011 07:00:09 Vigneswaran R wrote:
>> Hello,
>>
>> I cloned the olsrd git repository and testing the olsrv2 implementation
>> (olsrv2 branch) *** olsr.org - pre-0.7.0-44408ef ***.
>>
>> I am trying to measure the time taken to re-establish the routes when  a
>> link goes down and come back again. However, as soon as I unplug the
>> network cable from an interface (or execute 'ip link set eth0 down'),
>> olsrd exits with segmentation fault with the following information.
>
>> Please help me in fixing the problem.
> Thank you for testing this... you have to know that the olsrv2 implementation
> is still incomplete (NHDP is working, OLSRv2 is just a database design at the
> moment).

Ok, Thank you.

> Could you run the test with valgrind, so that I can see where the segfault
> happened?

I am putting parts of the valgrind output. If you want me to post the 
entire output, please let me know.

<snip>
12:00:12.705 INFO(interface) src/interfaces.c 317: Removing interface eth0
12:00:15.410 INFO(packet_creation) src/tc_set.c 940: Building TC
-------------------
12:00:15.661 INFO(packet_creation) src/mid_set.c 499: Building MID
-------------------
12:00:15.711 INFO(packet_creation) src/hna_set.c 340: Building HNA
-------------------
==12369== Invalid read of size 4
==12369==    at 0x8064190: remove_interface (interfaces.c:317)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>
12:00:15.712 INFO(interface) src/interfaces.c 317: Removing interface (null)
==12369== Invalid read of size 4
==12369==    at 0x8079FB0: net_os_restore_ifoption (net.c:250)
==12369==    by 0x807FE4E: os_cleanup_interface (ifnet.c:476)
==12369==    by 0x80641D8: remove_interface (interfaces.c:319)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>
==12369== Invalid read of size 1
==12369==    at 0x8079FDB: net_os_restore_ifoption (net.c:251)
==12369==    by 0x807FE4E: os_cleanup_interface (ifnet.c:476)
==12369==    by 0x80641D8: remove_interface (interfaces.c:319)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>
12:00:15.724 WARN(interface) src/linux/net.c 116: Cannot open proc entry 
/proc/sys/net/ipv4/conf/(null)/send_redirects: No such file or directory (2)
==12369== Invalid read of size 4
==12369==    at 0x807A011: net_os_restore_ifoption (net.c:252)
==12369==    by 0x807FE4E: os_cleanup_interface (ifnet.c:476)
==12369==    by 0x80641D8: remove_interface (interfaces.c:319)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>
12:00:15.726 WARN(interface) src/linux/net.c 252: Could not restore 
icmp_redirect for interface (null)
==12369== Invalid read of size 4
==12369==    at 0x807A052: net_os_restore_ifoption (net.c:256)
==12369==    by 0x807FE4E: os_cleanup_interface (ifnet.c:476)
==12369==    by 0x80641D8: remove_interface (interfaces.c:319)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>
==12369== Invalid read of size 1
==12369==    at 0x807A075: net_os_restore_ifoption (net.c:257)
==12369==    by 0x807FE4E: os_cleanup_interface (ifnet.c:476)
==12369==    by 0x80641D8: remove_interface (interfaces.c:319)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>
12:00:15.727 WARN(interface) src/linux/net.c 116: Cannot open proc entry 
/proc/sys/net/ipv4/conf/(null)/rp_filter: No such file or directory (2)
==12369== Invalid read of size 4
==12369==    at 0x807A0AB: net_os_restore_ifoption (net.c:258)
==12369==    by 0x807FE4E: os_cleanup_interface (ifnet.c:476)
==12369==    by 0x80641D8: remove_interface (interfaces.c:319)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>
12:00:15.728 WARN(interface) src/linux/net.c 258: Could not restore 
rp_filter for interface (null)
==12369== Invalid read of size 4
==12369==    at 0x8063645: list_remove (list.h:146)
==12369==    by 0x806421C: remove_interface (interfaces.c:332)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>
==12369== Invalid read of size 4
==12369==    at 0x806364A: list_remove (list.h:146)
==12369==    by 0x806421C: remove_interface (interfaces.c:332)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>
==12369== Invalid write of size 4
==12369==    at 0x806362F: __list_remove (list.h:137)
==12369==    by 0x8063658: list_remove (list.h:146)
==12369==    by 0x806421C: remove_interface (interfaces.c:332)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
==12369==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==12369==
==12369==
==12369== Process terminating with default action of signal 11 (SIGSEGV)
==12369==  Access not within mapped region at address 0x0
==12369==    at 0x806362F: __list_remove (list.h:137)
==12369==    by 0x8063658: list_remove (list.h:146)
==12369==    by 0x806421C: remove_interface (interfaces.c:332)
==12369==    by 0x807E6DB: chk_if_changed (ifnet.c:133)
==12369==    by 0x80640D3: check_interface_updates (interfaces.c:288)
==12369==    by 0x8058238: walk_timers (scheduler.c:651)
==12369==    by 0x8057E3A: olsr_scheduler (scheduler.c:513)
==12369==    by 0x8062065: main (main.c:437)
<snip>

Regards,
Vignesh




More information about the Olsr-users mailing list