Bug 118321 - rpm consumes huge amounts of memory
rpm consumes huge amounts of memory
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-15 11:10 EST by Jeremy Sanders
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-16 08:17:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeremy Sanders 2004-03-15 11:10:30 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040207 Firefox/0.8

Description of problem:
I've been using the kernel rpms from
http://people.redhat.com/arjanv/2.5/readme.txt. When trying to remove
old kernels using rpm, rpm consumes huge (500MB) amounts of memory and
never seems to finish the remove.

[root@xpc19 root]# rpm -e kernel-2.6.3-2.1.242

from ps:

root      1491 18.7 79.5 539048 100756 pts/0 R    16:01   1:11 rpm -e
kernel-2.6.3-2.1.242

strace is not very helpful:
[...]
pread(4, "\0\0\0\0\1\0\0\0-\3\0\0\0\0\0\0\376\4\0\0\306\0\t\2\0\2"...,
4096, 3330048) = 4096
mremap(0xcec75000, 221011968, 221011968, MREMAP_MAYMOVE) = 0xcec75000
mmap2(NULL, 217088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xe8326000
mremap(0xcec75000, 221011968, 221229056, MREMAP_MAYMOVE) = 0xcec75000
munmap(0xe8326000, 217088)              = 0
pread(4, "\0\0\0\0\1\0\0\0.\3\0\0\0\0\0\0S\0\0\0\340\0,\3\0\2\362"...,
4096, 3334144) = 4096
mremap(0xcec75000, 221229056, 221229056, MREMAP_MAYMOVE) = 0xcec75000
mmap2(NULL, 217088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xe82f1000
mremap(0xcec75000, 221229056, 221442048, MREMAP_MAYMOVE) = 0xcec75000
munmap(0xe82f1000, 217088)              = 0
pread(4,


I have tried to rebuild the rpm database, but that doesn't help.

The machine has 128MB ram and 1GB of swap.


Version-Release number of selected component (if applicable):
rpm-4.2.1-0.30

How reproducible:
Always

Steps to Reproduce:
1. Try to remove kernel rpm
2.
3.
    

Additional info:
Comment 1 Jeff Johnson 2004-03-15 18:12:27 EST
How many kernels do you have installed?

    rpm -qa | grep kernel | wc -l
Comment 2 Jeremy Sanders 2004-03-16 04:29:24 EST
Embarrassingly, 24. This was a case of setting yum to update the 2.6
kernel and forgetting about it!
Comment 3 Jeff Johnson 2004-03-16 08:17:36 EST
Time to clean up, I'd say.

The duplicate basenames in 24 kernels is causing an algorithm
withing rpm to explode.

No easy fix.
Comment 4 Tobias Ringstrom 2004-08-24 10:28:05 EDT
I had the same problem on FC2 with only three kernels installed, but
it was a showstopper because the machine had only 64 MiB RAM. 
Upgrading to rpm-4.3.2-0.10 solved the problem.  The memory usage went
down from >120 GiB to around 10 MiB.

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