lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] lwip stall


From: PELISSIER Christophe
Subject: RE: [lwip-users] lwip stall
Date: Mon, 22 Jun 2009 09:51:30 +0200

Ok thanks Kieran,

My problem does not happen often enough to be correclty debugged but too often 
to be boring and this is my biggest issue.
I am trying to set up a debug session. I will test your tracks and tips

Christophe  

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Kieran Mansley
Sent: Thursday, June 18, 2009 10:00 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] lwip stall

On Wed, 2009-06-17 at 17:53 +0200, PELISSIER Christophe wrote:
> In case those buffers are inside the lwip stack waiting for 
> acknowledgement, i guess a timer mechanism should be implemented to 
> free the buffer if no acknowledgement is received. am i right? what is 
> the process for this buffer release mechanism? what is the maximum 
> time the packet will stays "in use" in that case?

If no acknowledgement is received (and we're talking about TCP rather than UDP 
or something else, you didn't say which) lwIP will try to retransmit the 
packets.  It does this repeatedly, first time takes a few hundred milliseconds, 
but subsequent attempts back off the time between retransmissions.  If after a 
number of (I don't recall exactly how many) attempts at retransmitting it still 
hasn't had an acknowledgement it will close the connection and the buffers will 
be freed, but this whole process can take a very long time, certainly many 
minutes, as TCP is very conservative about closing connections.

If you have a debugger, have a look at the tcp_active_pcbs list, and for each 
pcb in that list, look at "unsent", "unacked" and "ooseg".  These are all lists 
of TCP segments that each connection has.

I would guess from your description that you're getting a lot of packets in the 
ooseg list.  I don't remember off the top of my head if there were bugs between 
1.2 and 1.3 concerning the queueing of out of order segments, but it wouldn't 
surprise me.  You could, if you wanted, disable TCP_QUEUE_OOSEG and see if that 
helps.

Kieran



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

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