Red Hat Bugzilla – Bug 447667
Memory leak in kernel-22.214.171.124-18.fc9.x86_64
Last modified: 2009-07-14 11:47:42 EDT
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):
Created attachment 306202 [details]
copy of /proc/meminfo made before reboot
Created attachment 306203 [details]
copy of /proc/slabinfo made before reboot
if you can reproduce this, do this ..
$ echo 3 > /proc/sys/vm/drop_caches
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.
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.
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 126.96.36.199-27.fc8
The kernel that runs ok is 188.8.131.52-10.fc8
I can provide additional information - let me know.
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?
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:
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.