[Bridge] Out of memory problem

Tekale Sharad-FHJN78 FHJN78 at motorola.com
Mon Apr 13 22:21:13 PDT 2009


Hi Stephen 
> Most likely, you have created a loop and are not running spanning
tree. When a loop happens, packets multiply until all > resources are

> you have created a loop.
Ya, I have bridge named br-lan created by($brctl), and I have attached
two interfaces to it, and I'm sending traffic from PC1 to PC2. Some
thing like this

	   		|    ------------       |
	   		|   |   br-lan   |      |    <--- AP
	   		|    ------------       |      
	   		|  eth0.0       eth0.1  | 

	      	     |	      |
	      	     |	      |
  	     		    PC1          PC2

root at none:/$ brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          8000.001570d8d8fd       no              eth0.0

>are not running spanning tree.
Is it always necessary to enable spanning tree when traffic is sent over

I have enabled spanning tree using

root at none:/$ brctl stp br-lan on
root at none:/$ brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          8000.001570d8d8fd       yes             eth0.0

But again, when huge traffic is pumped from PC1 to PC2, The
skbuff_head_cache value is increased rapidly and even after stop pumping
the traffic, this value doesn't come down, and system goes for crash or
reboot because of out of memory.

root at none:/$ cat /proc/slabinfo | grep skbuff_head
skbuff_head_cache   4560   4560    192   20    1 : tunables  120   60
0 : slabdata    228    228      0

One more point, say I have each port attached to there own bridge, and
when I route traffic from one host to other, I'll not face this
behavior, This behavior is relevant only in above case.

Do I have to do any other setting to overcome out of memory problem? 
Also, Please let me know if any other information is required to isolate
this behavior.


-----Original Message-----
From: Stephen Hemminger [mailto:shemminger at vyatta.com] 
Sent: Monday, April 13, 2009 10:00 AM
To: Tekale Sharad-FHJN78
Cc: bridge at lists.linux-foundation.org
Subject: Re: [Bridge] Out of memory problem

On Mon, 13 Apr 2009 16:58:20 +0800
"Tekale Sharad-FHJN78" <FHJN78 at motorola.com> wrote:

> Hi, I'm using linux and our kernel is freeze.
> The problem is, if I create a Software bridge using $brctl command. 
> and add two interfaces say, eth0.0 and eth0.1 using
> $brctl addbr br-lan
> $brctl addif br-lan eth0.0
> $brctl addif br-lan eth0.1
> and when i send traffic from a host connected to one port to host 
> connected at other end, soon all the memory is dried up and and kernel

> crashes, then oom-killer gets invoked which kills all the processes 
> finally system reboots.
> Can any one help me to refer to some patch  or point some location in 
> code from where memory is failed to deallocate.
> Thanks,
> Sharad.

More information about the Bridge mailing list