lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Resource starvation


From: Yoav Nissim
Subject: [lwip-users] Resource starvation
Date: Mon, 31 Jan 2011 20:24:23 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Lightning/1.0b2 Thunderbird/3.1.4


Hello All,


We have encountered a problem when removing netif's and would like to
confirm the issue, and discuss ways of resolving it.

We are working with 1.4.0 rc1.


The problem:

We have many situations in which network interfaces are brought down
[and back up again], during normal processing of application (sockets)
traffic.

This also happens implicitly every time a PPP connection is disconnected
[and connected] as well.

We've found that after several such iterations, lwIP will have consumed
its pbuf pool or its tcp_seg pool, and not recover.

Looking through the code showed that there are no paths that inform ip,
tcp, or layers above that they cannot communicate anymore, and that they
should clean up their state.

These connections seem to continue living, hogging resources until none
are left.


Could anyone confirm that this is indeed an issue?



The only "fix" we have found for now, lies in netif_set_ipaddr.

According to
http://mail.gnu.org/archive/html/lwip-users/2003-03/msg00118.html, this
function has code that cleans up active TCP PCBs that are bound to the
interface's address.

When netif_remove() is called, we call netif_set_ipaddr with IPADDR_ANY
to have the relevant TCP connections removed.


This raises several questions:

1. Is there a reason netif_remove() does not have such code?

2. Assuming netif_remove() should have it, should netif_set_down() use
it as well?

3. Are there any other components that have to have their state cleaned
up (IP, ARP, DNS, UDP, etc)?

4. Assuming netif_remove() requires this cleanup, is this the right way
to do it or is there a better way?

5. What do we do with the listening PCBs? in netif_set_ipaddr, their
bound addresses are simply changed to the new interface IP address. In
netif_remove() they should probably be disposed of.



Appreciate your input,

Yoav.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]