Bug 447667

Summary: Memory leak in kernel-2.6.25.3-18.fc9.x86_64
Product: [Fedora] Fedora Reporter: Gordon Messmer <gordon.messmer>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 9CC: bobgus, kosaki.motohiro, nhorman
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-14 15:47:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
copy of /proc/meminfo made before reboot
none
copy of /proc/slabinfo made before reboot none

Description Gordon Messmer 2008-05-21 02:35:10 UTC
Description of problem:
This morning I noticed that firefox had crashed overnight, and the desktop was
behaving very slow, as if the machine were swapping heavily.  I expected to see
some bloated process in "top"s output, but after sorting the processes by
memory, I saw nothing unusual.  Applications were fairly normal, but there was
very little free memory.

Next, I turned to /proc/meminfo, and it looks like the kernel had allocated
1.4GB of slab!  According to the slabinfo file, there were nearly 7 million
dentry slabs "active" (if I'm reading it correctly).  I don't really understand
the dentry cache, but it seems odd to have 7M dentry caches when I have fewer
than 500k files and directories total on all of the mounted filesystems.

There's nothing odd in the logs except this:

May 20 03:24:44 herald kernel: printk: 37 messages suppressed.

The kernel didn't print any messages in several hours prior to 3:24, and nothing
afterward until I rebooted the system.  Unfortunately, I didn't check "dmesg"
before rebooting. :(

Not much was running overnight: I was logged in to Gnome, Thunderbird and
Firefox were running, and so was Miro.

Version-Release number of selected component (if applicable):
kernel-2.6.25.3-18.fc9.x86_64

How reproducible:
Unknown

Comment 1 Gordon Messmer 2008-05-21 02:35:10 UTC
Created attachment 306202 [details]
copy of /proc/meminfo made before reboot

Comment 2 Gordon Messmer 2008-05-21 02:36:03 UTC
Created attachment 306203 [details]
copy of /proc/slabinfo made before reboot

Comment 3 Dave Jones 2008-05-21 02:45:18 UTC
if you can reproduce this, do this ..

$ free
$ echo 3 > /proc/sys/vm/drop_caches
$ free

that should purge the dentry cache (and other caches).

They should get reclaimed when something needs memory.  This is the first report
I've seen so far of anything suggesting the kernel is leaking slab objects, and
something like a dentry leak would show up real quick.


Comment 4 Gordon Messmer 2008-05-22 15:14:29 UTC
Out of curiosity: what will purging the caches tell us about the problem?

I understand that cache items should be reclaimed when applications need memory.
 I noticed that nearly all of the "Slab" allocated is marked "SReclaimable". 
All the same, something caused Firefox to exit, and allocated a whole lot of
slab in a short amount of time.  I'd wonder if Firefox was at fault, but I'm not
sure how it would cause the kernel to allocate a large amount of memory.

I haven't seen the problem manifest again, yet, but I'm not certain what caused
it in the first place.

Comment 5 Bob Gustafson 2008-06-26 21:45:13 UTC
I don't know if this is related, but I updated to a new kernel (Fed8) and this
kernel is unusable because of a memory leak. I have 3GB and it takes about 10-20
minutes to fill, then I need to reboot.

I went back a kernel using the boot/grub.conf option.

The kernel with a problem is 2.6.25.6-27.fc8
The kernel that runs ok   is 2.6.25.4-10.fc8

I can provide additional information - let me know.


Comment 6 KOSAKI Motohiro 2008-11-02 10:37:13 UTC
hm, I have some guess. (yup it's just _guess_)

1. dentry cache is "name to i-node number transration" cache.
   Then many directory touched some command (e.g. find, updatedb) make bloat dentry cache easily.
   some system run updatedb at midnight by cron. do you do that?

2. SLUB on NUMA dramatically increase dcache fragmentation at special situation. (its problem already fixed on upstream (IIRC 2.6.27)).
   do you have a numa box?

Comment 7 Bug Zapper 2009-06-10 01:03:15 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Bug Zapper 2009-07-14 15:47:42 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.