Re: Memory leaks in Kernel 2.6.32.28

John Edwards <john-C/[email protected]>
Newsgroups gmane.comp.security.ipcop.devel
Message-ID <[email protected]>
On Fri, Feb 11, 2011 at 09:04:25AM +0100, karesmakro wrote:
> Hello there,
> I know, the copfilter project is not appreciated very well! But this 
> problem do not belong only to copfilter, it's a common problem. I 
> noticed on applications, which uses much of memory (e.g. clamav), that 
> the memory is growing from day to day. I also noticed, if the 
> applications are restarted, the memory is not freeing (only a small part)
> So my Cop was running 3 weeks and I had 56MB swapped space (with 1GB 
> RAM) and was growing.


56MB swap is not unusual. Things are not being used (eg spare login
consoles) are swapped out to make way for more cache:
	http://en.wikipedia.org/wiki/Memory_leak#Other_memory_consumers

Look at the output of 'free -t', 'top', 'less /proc/cpuinfo' and
'less /proc/vmallocinfo to get more information about memory use.

Emails about a "memory leak" in IPCop have occured in the past and it
usually turns out to be kernel cache or a service using more memory.
Have a search of "memory leak" in the IPCop mailing lists archives:
	http://marc.info/?l=ipcop-user
	http://marc.info/?l=ipcop-devel


> I made some tests and also compiled clamav only with needed functions, 
> but this seems not to solve the problem. After some researches, I found 
> a well known kernel bug in mm page-allocator
> https://answers.launchpad.net/ubuntu/+source/linux/+question/130117

That question is for the kernel using the oom-killer (Out-Of-Memory
Killer) to stop processes when it is out of memory. Have you seen
that behaviour (eg services or programs stopping suddenly)? Search
/var/log/messages for "oom".

Also that question is for 2.6.32.25, and IPCop uses 2.6.32.28:
	http://sourceforge.net/apps/trac/ipcop/browser/ipcop/trunk/lfs/linux

The bug report referenced is for an even older version of the kernel
(2.6.32.23) and fixed in 2.6.32.26:
	https://bugs.launchpad.net/ubuntu/+source/linux/+bug/649483

And the original poster found the problem was vftpd (an FTP server)
and not the kernel.

I have many Ubuntu and Debian servers running 2.6.32 and have not had
any problems with memory usage on them. And some of run vsftpd. So I
am not sure how "well known" this really is.


> I'm currently using SVN Build 5349 and as I remember right, this was no 
> problem in SVN Builds at around Sep. - Nov. 2010
> 
> 
> So I hope, someone can say anything about!
> 
> regards, karesmakro



-- 
#---------------------------------------------------------#
|    John Edwards   Email: john-C/[email protected]    |
#---------------------------------------------------------#

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.