public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Axel Neumann <axel@open-mesh.net>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@open-mesh.net>
Subject: Re: [B.A.T.M.A.N.] Memory leak
Date: Mon, 7 Jan 2008 10:45:10 +0100	[thread overview]
Message-ID: <200801071045.10747.axel@open-mesh.net> (raw)
In-Reply-To: <20080106165233.7aswfv27s4ow4w04@webmail.ddmesh.de>

hi,

On Sonntag 06 Januar 2008, Freifunk Dresden wrote:
> Hi Axel,
>
> > Does it really increase endlessly with each new thread ?
> > If its the GW-client thread then you can enforce the termination and
> > recreation on-the-fly with batmand -c -r0 (to destroy the tunnel) and
> > -c -r3 (to create the tunnel)
>
> When I call batmand with those parameters I can reproduce this much
> faster until
> no memory is available anymore. This happens on each call with these
> parameters.

ok, I'll check that again. Just to be sure, you observed this on WRT54GL with 
openWrt Whiterussioin Freifunk firmware? Did you compile the sources yourself 
or have you used precompiled binaries (which ones)? Because, last time I 
tried, I applied a lot of -cr0 and -cr3 and the memory usage did not increase 
endlessly.

>
> > there is a blackhole detection in the default two-way-tunnel. This can
> > cause the client to disconnect from the unresponsive (-blackhole-) GW and
> > put the GW on a blacklist for some time. It should all be reported on
> > debug-level 3. If no other GW is available, the GW-client node will
> > reconnect to the GW after
> > a while (might be 100 sec).
> > If you have a dummy GW, either use --no-unresp-gw-check or
> > use --one-way-tunnel 3 at the client and the GW side
>
> I like to have the blackhole detection enabled, it is a good way to
> detect an inactive GW beside of the ping-check-algorithm in the
> firmware.
> I assume that default is the two-way-tunnel where data goes from one
> node directly to the gw and back. Whatfor is the one-way-tunnel and
one-way-tunnel are completely stateless. No assigned virtual IPs, no need for 
SNAT,... Data is only tunnelled from the GW-Client to the GW-Node. THere it 
is de-tunnelled and forwarded. We used this setup at the 24c3 to let batman 
client nodes be accessible via global unique IPs. 

> what are the
> condtion for the one-way-tunnel being active.

if you type -cbd2 at a client node you may see:
WARNING: You are using BatMan-eXp 0.3-alpha rv898 (compatibility version 10) !
  Originator         bestNextHop   #
=> 103.131.41.5       103.131.83.5 100, gw_class 49 - 4MBit/1024KBit, 
reliability: 0, supported tunnel types 2WT, 1WT

2WT indicates the GW capabilities for two-way-tunnel, 1WT indicates ...

--dangerous shows:
...
 Gateway and tunneling options:

       --one-way-tunnel <value> : set preference for one-way-tunnel mode.
         For GW-nodes:  0 disables this tunnel mode, a larger value enables  
this tunnel mode.
         For GW-cliets: 0 disables this tunnel mode, a larger value sets the 
preference for this mode.
          default: 1, allowed values: 0 <= value <= 4

       --two-way-tunnel <value> : set preference for two-way-tunnel mode.
         For GW-nodes:  0 disables this tunnel mode, a larger value enables 
this tunnel mode.
         For GW-cliets: 0 disables this tunnel mode, a larger value sets the 
preference for this mode.
          default: 2, allowed values: 0 <= value <= 4

So essentially, to force a client node to only use one-way tunnel you must 
start the client with two-way-tunnel disabled (--two-way-tunnel 0 ) .
To configure the client node to prefer one-way-tunnel over two-way-tunnel 
start it with a higher preference for the one-way tunnel 
(e.g. --one-way-tunnel 3)


bye

/axel

>
> Why is the gw-thread deleted? If the problem lays in the pthread
> implementation
> it would be a workaround to keep the gw thread always active.
>
> I also think that the memory consumtion is more than 16kbyte, because
> the virtual memory is incremented and also the percentage used.
>
> Bye
> Stephan
>
>
>
> _______________________________________________
> B.A.T.M.A.N mailing list
> B.A.T.M.A.N@open-mesh.net
> https://list.open-mesh.net/mm/listinfo/b.a.t.m.a.n



  reply	other threads:[~2008-01-07  9:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-04  9:57 [B.A.T.M.A.N.] Memory leak Freifunk Dresden
2008-01-04 20:24 ` Axel Neumann
2008-01-05 20:47   ` Freifunk Dresden
2008-01-06 14:03     ` Axel Neumann
2008-01-06 15:52       ` Freifunk Dresden
2008-01-07  9:45         ` Axel Neumann [this message]
2008-01-07 12:56           ` Freifunk Dresden
2008-01-07 16:48             ` [B.A.T.M.A.N.] one-way / two-way tunnel (was: Memory leak) Axel Neumann
2008-01-07 20:52               ` Freifunk Dresden
2008-01-10  8:25               ` Freifunk Dresden
2008-01-17 13:04   ` [B.A.T.M.A.N.] Memory leak Freifunk Dresden
2008-01-20 11:13     ` Axel Neumann
2008-01-26 21:04       ` Freifunk Dresden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801071045.10747.axel@open-mesh.net \
    --to=axel@open-mesh.net \
    --cc=b.a.t.m.a.n@open-mesh.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox