Project

General

Profile

Actions

Bug #200

closed

leaking global TT entries

Added by Linus Lüssing almost 10 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
12/13/2014
Due date:
% Done:

0%

Estimated time:

Description

There seems to be a memory leak for global translation table entries:

root@Linus-Debian:~# batctl o; batctl tg
[B.A.T.M.A.N. adv 2014.3.0-48-g4383006-dirty, MainIF/MAC: eth1/02:04:64:a4:39:c2 (bat0 BATMAN_IV)]
  Originator      last-seen (#/255)           Nexthop [outgoingIF]:   Potential nexthops ...
No batman nodes in range ...
Globally announced TT entries received via the mesh bat0
       Client         VID  (TTVN)       Originator      (Curr TTVN) (CRC       ) Flags
 + b6:55:75:a2:60:90   -1   (  1) via 02:04:64:a4:39:c1     (  1)   (0x5416bae1) [....]
 + fa:22:c6:ae:eb:7a   -1   (  1) via 02:04:64:a4:39:c1     (  1)   (0xf1e21099) [....]
 + 1a:8b:63:a1:19:f8   -1   (  1) via 02:04:64:a4:39:c1     (  1)   (0x8137a753) [....]
 + f6:04:1d:23:9a:e0   -1   (  1) via 02:04:64:a4:39:c1     (  1)   (0xf182c149) [....]

This not only results in a memory leak for global TT entries but also the associated orig_node, now in invisible zombie state. Furthermore the leaking orig_node results in potentially bogus multicast counters (resulting in the multicast optimizations not always activating when they should).

The attached debug patch, basically decreasing intervals, makes it easy to reproduce the issue with the following two nodes setup:

[eth0--A--eth1] ~ [eth0--B]

(so eth1, the secondary interface, of node A is connected to eth0, the primary interface, of node B)

Running the following command on node A results in a new leak on node B about every two seconds:


while true; do
    batctl if del eth1; batctl if del eth0
    sleep 2
    batctl if add eth0; batctl if add eth1
    sleep `echo 0.$((10*$RANDOM/32767))$((10*$RANDOM/32767))$((10*$RANDOM/32767))`
done

The log output of node B (batman+route+tt) is attached as well.


Files

0001-TT-memory-leak-debug-patch.patch (8.79 KB) 0001-TT-memory-leak-debug-patch.patch Linus Lüssing, 12/13/2014 08:02 AM
node-B-TT-leak.log (128 KB) node-B-TT-leak.log Linus Lüssing, 12/13/2014 08:02 AM
Actions #1

Updated by Linus Lüssing almost 10 years ago

  • Description updated (diff)
Actions #2

Updated by Marek Lindner over 9 years ago

I do believe we have merged your patch ? Can we close the ticket ?

Actions #3

Updated by Linus Lüssing over 9 years ago

Yes, can be closed, got fixed with 2014.4.0. Thanks :)!

Actions #4

Updated by Marek Lindner over 9 years ago

  • Status changed from New to Closed
Actions #5

Updated by Sven Eckelmann almost 8 years ago

  • Target version set to 2014.4.0
Actions

Also available in: Atom PDF