Bug 248923 - rpm eats too much memory when removing kernel-devel
Summary: rpm eats too much memory when removing kernel-devel
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 8
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: bzcl34nup
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-19 16:40 UTC by Pierre Ossman
Modified: 2009-01-09 07:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-09 07:10:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pierre Ossman 2007-07-19 16:40:33 UTC
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 17:01:32 UTC
Run valgrind if you suspect a memory leak.

I'll save you the trouble:

FIxed in rpm-4.4.9 release

UPSTREAM

Comment 2 Pierre Ossman 2007-07-19 17:35:36 UTC
When can we expect an updated package? :)

Comment 3 Pierre Ossman 2007-07-19 17:46:32 UTC
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 06:00:00 UTC
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 11:54:09 UTC
[root@chronos ~]# rpm -q kernel-devel | wc -l
56

:)

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 12:33:58 UTC
With 56 kernel devel packages, you are looking at an algorithm that scales something like

$ rpm -ql kernel-PAE-devel | wc -l
14374

(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 13:08:55 UTC
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 15:23:35 UTC
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 05:35:15 UTC
User pnasrat's account has been closed

Comment 10 Panu Matilainen 2007-08-22 06:33:17 UTC
Reassigning to owner after bugzilla made a mess, sorry about the noise...

Comment 11 Panu Matilainen 2007-08-27 10:19:20 UTC
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
faster.

Comment 12 Pierre Ossman 2007-08-27 11:52:01 UTC
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 13:24:59 UTC
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
rawhide.
(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:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

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 07:35:15 UTC
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 15 Bug Zapper 2009-01-09 07:10:39 UTC
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.