Bug 248923 - rpm eats too much memory when removing kernel-devel
rpm eats too much memory when removing kernel-devel
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-07-19 12:40 EDT by Pierre Ossman
Modified: 2009-01-09 02:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-09 02:10:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pierre Ossman 2007-07-19 12:40:33 EDT
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
Comment 1 Jeff Johnson 2007-07-19 13:01:32 EDT
Run valgrind if you suspect a memory leak.

I'll save you the trouble:

FIxed in rpm-4.4.9 release

Comment 2 Pierre Ossman 2007-07-19 13:35:36 EDT
When can we expect an updated package? :)
Comment 3 Pierre Ossman 2007-07-19 13:46:32 EDT
Oh, right, Jeff. Could you point to a patch then so that it can be applied to
Red Hat's tree?
Comment 4 Panu Matilainen 2007-07-20 02:00:00 EDT
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.
Comment 5 Pierre Ossman 2007-07-20 07:54:09 EDT
[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.
Comment 6 Jeff Johnson 2007-07-20 08:33:58 EDT
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.
Comment 7 Pierre Ossman 2007-07-20 09:08:55 EDT
Any alternative way to purge the entries out of the database? It's easy to
remove the files manually for this package.
Comment 8 Pierre Ossman 2007-07-20 11:23:35 EDT
I can also add that I had the same number of "kernel" packages, but there was no
problem uninstalling those.
Comment 9 Red Hat Bugzilla 2007-08-21 01:35:15 EDT
User pnasrat@redhat.com's account has been closed
Comment 10 Panu Matilainen 2007-08-22 02:33:17 EDT
Reassigning to owner after bugzilla made a mess, sorry about the noise...
Comment 11 Panu Matilainen 2007-08-27 06:19:20 EDT
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
Comment 12 Pierre Ossman 2007-08-27 07:52:01 EDT
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.)
Comment 13 Bug Zapper 2008-04-04 09:24:59 EDT
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.
Comment 14 Bug Zapper 2008-11-26 02:35:15 EST
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: 
Comment 15 Bug Zapper 2009-01-09 02:10:39 EST
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.

Note You need to log in before you can comment on or make changes to this bug.