[Olsr-dev] bug in os x solved + new one found

L. Aaron Kaplan (spam-protected)
Wed Jan 14 17:54:28 CET 2009


symptom:

olsrd was sending out packets on port 698 on OS X but it never  
received any routing updates


stupid reason:

In newer OS X versions *even* when you marked in the firewall that it  
should allow all OLSR traffic, it will still block incoming broadcast  
packets on 698
I was bumping my head against this for some time.
Only disabling the fw helped.


doh!



--- snip ---

ok but here is a new one:

Setup:
2 nodes
involved versions: tip (on mac os X) and 0.5.6-rc7 (on linux)

Leave them running for some time. Then Ctrl-C kill the linux olsrd

after some packets going out from the os x olsrd it will assert with  
the following message:

...
RIB: del prefix 10.10.0.119/32 from 10.10.0.119
TC: del edge entry 10.10.0.119 > 10.10.0.142, cost (1.000/0.996) 1.003
SPF: insert candidate 10.10.0.142, cost 0.000
SPF: exploring node 10.10.0.142, cost 0.000
SPF:   ignoring edge 10.10.0.119
SPF:     no inverse edge
SPF: delete candidate 10.10.0.142, cost 0.000
SPF: append path 10.10.0.142, cost 0.000, via -

--- 17:35:14.179890 -------------------------------------------------  
DIJKSTRA

Assertion failed: (node != NULL), function olsr_rt_best, file src/ 
routing_table.c, line 485.
Abort trap
ultrastabil:olsrd aaron$



Ok, so now let's reproduce this in the debugger.


... starting up the olsrd in os X in the debugger and the olsrd0.5.6- 
rc7 in linux:

--> the effect is that after a short time olsrd in mac os x in the  
debugger runs into the assert statement
node == NULL.
What other infos are needed?


log :

(gdb) b src/routing_table.c:483
Breakpoint 2 at 0x1f76f: file src/routing_table.c, line 483.
(gdb) r
Starting program: /Users/aaron/olsrd-current/olsrd/olsrd -f /etc/ 
olsrd.conf -d 2 -i en0
Reading symbols for shared libraries ++. done

  *** olsr.org - pre-0.5.7 ***
  Build date: 2009-01-14 16:49:15 on ultrastabil.lan
  http://www.olsr.org

Read config from /etc/olsrd.conf
Debug level: 2
IpVersion: 2
RtTable: 254
FIBMetric: 1="correct"
Clear screen disabled
Noint set to 1
         IPC connections: 0
         IPC host: 127.0.0.1
Pollrate 50000
NIC Changes Pollrate 3.00
TC redundancy 2
MPR coverage 3
Interface en1
         Autodetect changes: 1
         HELLO interval: 2.00
         HELLO validity: 60.00
         TC interval: 5.00
         TC validity: 30.00
         MID interval: 5.00
         MID validity: 30.00
         HNA interval: 5.00
         HNA validity: 30.00
         LinkQualityMult 0.0.0.0 1.00
Interface en0
         Autodetect changes: 1
         HELLO interval: 2.00
         HELLO validity: 60.00
         TC interval: 5.00
         TC validity: 30.00
         MID interval: 5.00
         MID validity: 30.00
         HNA interval: 5.00
         HNA validity: 30.00
         LinkQualityMult 0.0.0.0 1.00
Debug level: 2
new interface en0
Duplicate interfaces defined... not adding en0
Added 0.0.0.0 to filter set
Added 127.0.0.1 to filter set
  *** olsrd configuration ***
Debug Level      : 2
IpVersion        : 4
No interfaces    : ALLOWED
TOS              : 0x10
RtTable          : 0xfe
RtTableDefault   : 0x00
Willingness      : AUTO
IPC connections  : 0
         Host 127.0.0.1
Pollrate         : 0.05
NIC ChangPollrate: 3.00
TC redundancy    : 2
MPR coverage     : 3
LQ fish eye      : 0
LQ Dijkstra limit: 255, 0.00
NAT threshold    : 1.000000
Clear screen     : no
Interfaces:
  dev: "en0"
         IPv4 broadcast           : AUTO
         IPv6 addrtype            : global
         IPv6 multicast site/glbl : ff05::15/ff0e::1
         HELLO emission/validity  : 2.00/60.00
         TC emission/validity     : 5.00/30.00
         MID emission/validity    : 5.00/30.00
         HNA emission/validity    : 5.00/30.00
         LinkQualityMult          : 0.0.0.0 1.00
         Autodetetc changes       : yes
  dev: "en1"
         IPv4 broadcast           : AUTO
         IPv6 addrtype            : global
         IPv6 multicast site/glbl : ff05::15/ff0e::1
         HELLO emission/validity  : 2.00/60.00
         TC emission/validity     : 5.00/30.00
         MID emission/validity    : 5.00/30.00
         HNA emission/validity    : 5.00/30.00
         LinkQualityMult          : 0.0.0.0 1.00
         Autodetetc changes       : yes
Local willingness updated: old 0 new 3
Could not read APM info - setting default willingness(3)

  ---- Interface configuration ----

Checking en0:
         Not a wireless interface
         Metric: 32
         MTU - IPhdr: 1472
         Index 4
         Address:10.10.0.142
         Netmask:255.255.255.0
         Broadcast address:10.10.0.255
Adding OLSR socket entry 7
New main address: 10.10.0.142
Checking en1:
         Not a wireless interface
         Could not get address of interface - skipping it
-- ALL PLUGINS LOADED! --

Main address: 10.10.0.142

Scheduler started - polling every 50000 microseconds
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Adding 10.10.0.142=>10.10.0.119 to link set
Warning: probably sizeof(pointer) in strscpy(0x101300, en0, 4)!
TC: add entry 10.10.0.119
RIB: add prefix 10.10.0.119/32 from 10.10.0.119
RIB: add prefix 10.10.0.119/32 from 10.10.0.119
TC: add entry 10.10.0.142
RIB: add prefix 10.10.0.142/32 from 10.10.0.142
TC:   found neighbor tc_entry 10.10.0.119
TC: add edge entry 10.10.0.142 > 10.10.0.119, cost (0.000/0.000)  
INFINITE
Willingness for 10.10.0.119 changed from 0 to 3 - UPDATING
SPF: insert candidate 10.10.0.142, cost 0.000
SPF: exploring node 10.10.0.142, cost 0.000
SPF:   ignoring edge 10.10.0.119
SPF:     no inverse edge
SPF: delete candidate 10.10.0.142, cost 0.000
SPF: append path 10.10.0.142, cost 0.000, via -

--- 17:42:44.393400 -------------------------------------------------  
DIJKSTRA


--- 17:42:44.394129  
---------------------------------------------------- LINKS

IP address       hyst         LQ       ETX
10.10.0.119     0.000/0.058    INFINITE

--- 17:42:44.394297 ------------------------------------------------  
NEIGHBORS

      IP address  LQ    SYM   MPR   MPRS  will

--- 17:42:44.394379 ----------------------- TWO-HOP NEIGHBORS

IP addr (2-hop)  IP addr (1-hop)  Total cost

--- 17:42:44.394459 -------------------------------------------------  
TOPOLOGY

Source IP addr  Dest IP addr          LQ        ETX
10.10.0.142     10.10.0.119     0.000/0.000    INFINITE
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Buffer Holdtimer for en0 timed out
Processing TC from 10.10.0.119, seq 0x9c73
TC:   found neighbor tc_entry 10.10.0.142
TC:   found inverse edge for 10.10.0.119
TC: add edge entry 10.10.0.119 > 10.10.0.142, cost (0.000/0.000)  
INFINITE
Processing TC from 10.10.0.119, seq 0x9c74
TC:   chg edge entry 10.10.0.119 > 10.10.0.142, cost (0.372/0.113)  
23.602
SPF: insert candidate 10.10.0.142, cost 0.000
SPF: exploring node 10.10.0.142, cost 0.000
SPF:   exploring edge 10.10.0.119, cost 64.000
SPF: insert candidate 10.10.0.119, cost INFINITE
SPF:   better path to 10.10.0.119, cost 64.000, via <none>, hops 1
SPF: delete candidate 10.10.0.142, cost 0.000
SPF: append path 10.10.0.142, cost 0.000, via -
SPF: exploring node 10.10.0.119, cost INFINITE
SPF:   exploring edge 10.10.0.142, cost 87.602
SPF: delete candidate 10.10.0.119, cost INFINITE
SPF: append path 10.10.0.119, cost INFINITE, via 10.10.0.119

--- 17:42:57.473921 -------------------------------------------------  
DIJKSTRA


Breakpoint 2, olsr_rt_best (rt=0x101940) at src/routing_table.c:483
483       struct avl_node *node = avl_walk_first(&rt->rt_path_tree);
(gdb) bt
#0  olsr_rt_best (rt=0x101940) at src/routing_table.c:483
#1  0x0001e9ad in olsr_update_rib_routes () at src/process_routes.c:339
#2  0x00019aed in olsr_calculate_routing_table () at src/olsr_spf.c:460
#3  0x000105c2 in olsr_process_changes () at src/olsr.c:172
#4  0x00021e2a in olsr_scheduler () at src/scheduler.c:405
#5  0x0000c875 in main (argc=7, argv=0xbffffa60) at src/main.c:382
(gdb) p *node
Cannot access memory at address 0x0
(gdb) p *rt
$1 = {
   rt_dst = {
     prefix = {
       v4 = {
         s_addr = 1996491274
       },
       v6 = {
         __u6_addr = {
           __u6_addr8 = "\n\n\000w", '\0' <repeats 11 times>,
           __u6_addr16 = {2570, 30464, 0, 0, 0, 0, 0, 0},
           __u6_addr32 = {1996491274, 0, 0, 0}
         }
       }
     },
     prefix_len = 32 ' ',
     prefix_origin = 4 '\004'
   },
   rt_tree_node = {
     parent = 0x0,
...






More information about the Olsr-dev mailing list