LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 04-16-2013, 05:43 PM   #1
hellolinux
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Rep: Reputation: 0
Kernel memory leak. slab debug.


Hi,

I have a question about how to find a memory leak in the slab.

I am using a Windriver linux distribution and noticed that free memory was going down. After I enabled slub_debug, I noticed that the buf_acquire is allocating the memory and skb_release_data is freeing it (see below). The numbers (buf_acquire, skb_release_data) seem to match but the # of active objects keeps on increasing until there is no memory left. How can I proceed further as to why the slab is not being freed?

Thanks for your help.

from slabtop: 349594 281787 80% 4.07K 49942 7 1598144K kmalloc-4096

sort -n /sys/kernel/slab/kmalloc-4096/alloc_calls 259945 buf_acquire+0x30/0x70 [tipc] age=251/2199820/3285324 pid=3789 cpus=0-7

from /sys/kernel/slab/kmalloc-4096/free_calls 260208 skb_release_data +0x85/0xd0 age=1499/2291151/4037734 pid=4722-31618 cpus=0-7
 
Old 04-17-2013, 04:11 AM   #2
Onnonymous
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
When I notice strange kernel related problems, first thing I try is booting with another kernel version (preferably much older or much newer). This may not be the detailed answer you're looking for but I hope it helps.
 
Old 04-17-2013, 05:44 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 1,702

Rep: Reputation: 426Reputation: 426Reputation: 426Reputation: 426Reputation: 426
One thing to remember is that Linux will use the entire "unused" memory for buffers. If nothing needs the space, it will just remain. If new processes (or I/O) needs memory it will flush these buffers and reuse the space.

The major identification of a kernel leak is when your system hangs...
 
1 members found this post helpful.
  


Reply

Tags
leak, memory


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tool to identify memory leak in loadable kernel module appas Programming 3 06-05-2012 09:56 AM
how to test kernel memory leak using dmalloc laginagesh Linux - Kernel 2 06-11-2010 02:28 PM
Memory leak in Linux kernel 2.6.28.10 kiran_4u Linux - Kernel 1 08-25-2009 12:50 PM
Memory / Kernel leak? Snipersnest Linux - Newbie 11 02-08-2005 04:10 PM
kernel memory leak? linux7 Linux - General 1 10-16-2004 11:48 AM


All times are GMT -5. The time now is 01:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration