[Top][All Lists]

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

Re: [Savannah-hackers-public] memory leak or bad uasge ?

From: Bob Proulx
Subject: Re: [Savannah-hackers-public] memory leak or bad uasge ?
Date: Thu, 28 Feb 2013 11:07:18 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

Noam weissman wrote:
> I am running a simple TCP terminal server that works like a telnet
> server but with no Protocol. Actually a s simple TCP server. I use
> raw TCP terminal.

You have reached the mailing list for people who hack on Savannah.
Savannah is the software forge for people committed to free software.
The web site, the version control hosting, that type of thing.

> It works ok but as far as I was able to spot I have memory leaks inside
> the LWIP stack.

But you are asking about the LWIP project.  We don't know too much
about specific projects here.  It would be better to look at the
project and see what it says about where to get help.

Looking at the Savannah web page here I see pointers to both the
lwip-users and lwip-devel mailing lists.

I suggest starting off by sending your request to the lwip-users
mailing list as a general good place to start.

Good luck!

> My server accepts a pBuf and process it.
> The transferred data in that pBuf is simple text lines. My server reads
> char by char and when it finds CR it 
> copies this string to a command processor (text parser). This text
> parser reads the text and if necessary 
> sends some data back to the client terminal.
> If I pass a large file larger than the command processor queue I need to
> stall the pBuf processing until some space
> Is freed in the command processor. If all is OK I do not free the
> accepted pBuf until It is processed.
> That means the original pBuf is not immediately freed and at the same
> time the command processor sends  data to
> The client TCP terminal. The pBuf is eventually freed after all the data
> is processed or if there is an error etc...
> All is well so far.
> If I disconnect the terminal (connected to my server) either in the
> middle of the file transfer or even if I wait to the file
> End I can do that about more than 15-20 times. I have added error
> handling, polling, abort code etc... 
> Nothing helped and after 20 or something iteration the TCP stoped
> working.
> Although the Stack should free all pBuf's I added code to free the
> received pBuf in case of abort. I also added
> Freeing the recived pBuf in all the cases (abort, close or error).
> Adding that extra freeing stopped the server from being completely un
> responsive but it is not able to send large amount 
> Of data.
> All the above suggests that memory handling is not working properly
> inside LwIP and therefore it is leaking.
> Normally we work with an older stable version of LWIP (1.32 + FreeRTOS) 
> I have tried using the latest version 1.41, I even added a few patches
> and installed the latest FreeRTOS but it behaves the same.
> I feel that something basic is not working properly inside LwIP.
> The code is running on STR91 with 96K RAM 
> I have attached my TCP server source code + lwipopts.h
> Any input will help.
> Thanks,
> Noam.

reply via email to

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