lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP mem leak with accumalated unacked messages


From: schneiderham
Subject: Re: [lwip-users] TCP mem leak with accumalated unacked messages
Date: Fri, 28 Aug 2009 19:50:42 -0700 (PDT)

I have made some progress.  I was out-to-lunch on the accumulation of unacked
packets causing the memory leak.  I still don't understand were the memory
leak is coming from.

in an attempt to debug the memory I enabled  MEMP_SANITY_CHECK and reduced
MEM_SIZE to 3200.
And now for some reason this seems to fix things.  I have been able to run
it for more than 10 times longer than usual and there has been no memory
leakage.

Although I am happy to just build with MEMP_SANITY_CHECK I am sure this is a
band-aid.  Does anyone have any ideas why this could fix my memory leak?

Mat


schneiderham wrote:
> 
> Hi,
> I have a system that works very well thanks to the lwIP stack. Thanks for
> all the contributors.  However, I have one slight problem that is beyond
> me that I would appreciate help with.
> 
> My system streams data over TCP to a LabView application.  If I send 1336
> bytes per packet every 20ms (50 packets per second)  all works well. 
> However, If I reduce my report rate to every 200ms (5 packets per second)
> there is an gradual accumulation of "unack" packets.  If I stop the
> streaming these packets are never acknowledged.  It is my belief that the
> packets are delivered to the labview application but the ack message is
> missed.  (I have previously looked for missing data and have not found
> any)
> 
> Here are a couple of my configurations:
> MEM_ALIGNMENT     4
> MEM_SIZE               4 * 6400
> TCP_WND                8192
> TCP_MSS                 3000
> TCP_SND_BUF         4 * TCP_MSS
> 
> 
> An observation I found was that the sent callback routine is called 1/2 as
> many times as the number of TCP_write() commands (and subsequent receives
> on the labView side) were sent at the max rate of 50 packets per second. 
> Conversely, at 5 packets per second the number of the number of times the
> sent callback routine was called equaled the number of sent and received
> packets except that the the sent callback routine would gradually slide
> indicating that there were missing acknowledgments.
> 
> If anyone could suggest any reasons why I am missing acknowledgments at
> reduced packet sending rates that would be helpful and appreciated.
> 
> Mat
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TCP-mem-leak-with-accumalated-unacked-messages-tp25182251p25199571.html
Sent from the lwip-users mailing list archive at Nabble.com.





reply via email to

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