[riot-notifications] [RIOT] division by zero in rpl_calc_rank (#333)

LudwigOrtmann notifications at github.com
Sat Nov 16 18:30:05 CET 2013


Starting the https://github.com/OlegHahm/SAFEST project demo_router appears to trigger a bug in rpl:

```
Program received signal SIGFPE, Arithmetic exception.
0x080572a0 in rpl_calc_rank (abs_rank=2054, minhoprankincrease=0) at rpl_dodag.c:391
391	    return abs_rank / minhoprankincrease;
(gdb) bt full
#0  0x080572a0 in rpl_calc_rank (abs_rank=2054, minhoprankincrease=0) at rpl_dodag.c:391
No locals.
#1  0x08056f0e in rpl_parent_update (parent=0x0) at rpl_dodag.c:277
        my_dodag = 0x8097de0 <dodags>
        old_rank = 2054
#2  0x08057c41 in rt_timer_over () at trickle.c:262
        my_dodag = 0x8097de0 <dodags>
        rt = 0x8098300 <routing_table>
#3  0xb7e03d7b in makecontext () from /usr/lib/libc.so.6
No symbol table info available.
#4  0x08079ca0 in __end_stack ()
No symbol table info available.
#5  0x08098034 in routing_table_buf ()
No symbol table info available.
#6  0x08098038 in routing_table_buf ()
No symbol table info available.
#7  0x0809803c in routing_table_buf ()
No symbol table info available.
#8  0x08098040 in routing_table_buf ()
No symbol table info available.
#9  0x08079ca0 in __end_stack ()
No symbol table info available.
#10 0x08097fe0 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) print minhoprankincrease 
$1 = 0
(gdb) ret 0
Make rpl_calc_rank return now? (y or n) y
#0  0x08056f0e in rpl_parent_update (parent=0x0) at rpl_dodag.c:277
277	    if (rpl_calc_rank(old_rank, my_dodag->minhoprankincrease) !=
(gdb) print my_dodag 
$2 = (rpl_dodag_t *) 0x8097de0 <dodags>
(gdb) print *my_dodag 
$3 = {instance = 0xfffffffe, dodag_id = {uint8 = '\377' <repeats 16 times>, uint16 = {65535, 65535, 65535, 65535, 65535, 
      65535, 65535, 65535}, uint32 = {4294967295, 4294967295, 4294967295, 4294967295}}, used = 255 '\377', mop = 255 '\377', 
  dtsn = 255 '\377', prf = 255 '\377', dio_interval_doubling = 56 '8', dio_min = 126 '~', dio_redundancy = 9 '\t', 
  maxrankincrease = 0, minhoprankincrease = 0, default_lifetime = 48 '0', lifetime_unit = 2054, version = 217 '\331', 
  grounded = 203 '\313', my_rank = 47078, node_status = 160 '\240', dao_seq = 134 '\206', min_rank = 1, joined = 8 '\b', 
  my_preferred_parent = 0x0, of = 0x8067730 <native_hwtimer+48>}

```

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/333
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20131116/2b3d2ac3/attachment-0001.html>


More information about the notifications mailing list