Red Hat Bugzilla – Bug 248923
rpm eats too much memory when removing kernel-devel
Last modified: 2009-01-09 02:10:39 EST
When trying to uninstall a kernel-devel package, rpm eats so much memory that it
gets killed by the OOM reaper. A machine with 700 MB of free memory is
insufficient for it, so I suspect a memory leak.
The last line shown is this:
D: opening db index /var/lib/rpm/Basenames create mode=0x42
I've run the following line in an effort to reduce problem areas, but still no go:
rpm -e -vvvvvvvv --justdb --noscripts --notriggers kernel-devel-2.6.19-1.2912.fc7
Run valgrind if you suspect a memory leak.
I'll save you the trouble:
FIxed in rpm-4.4.9 release
When can we expect an updated package? :)
Oh, right, Jeff. Could you point to a patch then so that it can be applied to
Red Hat's tree?
Both the problem now that skipDirs is no longer used, and the tagged fileindex
patch from Michael Schroder of Suse are well known and don't need to be pointed
to, thank you...
Out of curiosity, how many kernels do you have, something like > 6? Yum
installonlyn plugin is supposed to keep the number of kernel(-devel) packages
tolerable, but of course that wont help if you manually install them with rpm.
[root@chronos ~]# rpm -q kernel-devel | wc -l
I don't use yum, but that's an entirely different discussion and one we need not
go in to here.
With 56 kernel devel packages, you are looking at an algorithm that scales something like
$ rpm -ql kernel-PAE-devel | wc -l
(5.6e1 * 1.5e3) ** 3
Ignoring multiplication details, that is ~10**12, a very large number indeed.
Both rpm memory and processor usage scale as (# of duplicate basenames) ** 3.
But be sure to use valgrind to look for memory leaks!
Panu: BTW, the SuSE patch causes rpmdb segfaults if you downrev rpm without doing --rebuilddb.
Any alternative way to purge the entries out of the database? It's easy to
remove the files manually for this package.
I can also add that I had the same number of "kernel" packages, but there was no
problem uninstalling those.
User email@example.com's account has been closed
Reassigning to owner after bugzilla made a mess, sorry about the noise...
Wrt comment #7, one way to get rid of those kernel-devel packages is to
temporarily downgrade to rpm 4.4.2 from F7 (non-update). Yes it's .. sick.
Or build a custom rpm with skipDir, but downgrading is likely to be easier and
The machine in question has been replaced, so I am in no need to have this fixed
right now. The old system is still accessible if you want me to perform tests,
but the rush is no longer there.
(I still think this should be fixed though in case it happens again.)
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.
If this bug still exists in rawhide, please change the version back to
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)
Thanks for your help and we apologize for the interruption.
The process we're following is outlined here:
We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8. 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 '8'.
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 8'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 8 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 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 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.