Bug 118321 - rpm consumes huge amounts of memory
Summary: rpm consumes huge amounts of memory
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-03-15 16:10 UTC by Jeremy Sanders
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-16 13:17:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeremy Sanders 2004-03-15 16:10:30 UTC
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 23:12:27 UTC
How many kernels do you have installed?

    rpm -qa | grep kernel | wc -l

Comment 2 Jeremy Sanders 2004-03-16 09:29:24 UTC
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 13:17:36 UTC
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 14:28:05 UTC
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.