Bug 244466 - yum info leaks memory
yum info leaks memory
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: James Antill
Depends On:
  Show dependency treegraph
Reported: 2007-06-15 16:48 EDT by Doncho N. Gunchev
Modified: 2014-01-21 17:58 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-19 13:30:00 EDT
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 Doncho N. Gunchev 2007-06-15 16:48:46 EDT
Description of problem:
'yum shell' and then 'info package' leaks memory.

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

How reproducible:

Steps to Reproduce:
1. yum shell
2. info any_package_even_non_existent
3. repeat step 2 and look the memory usage
Actual results:
yum info package leaks memory. 20-30 'info package' would kill my PC (1G RAM).

Expected results:
One should be able to ask for info for every package without running out of 

Additional info:
I have no idea if this affects yumex, pup or others.
Comment 1 Seth Vidal 2007-06-15 17:20:22 EDT
are you using any packages from rawhide on this system? I can't get the same
thing to occur on mine. It will grow some as it creates package objects but it
will eventually free them up. On my f7 box it seems to top out at about 80M. 
Comment 2 Doncho N. Gunchev 2007-06-19 09:26:35 EDT
I'll try to remove all unneeded and test again, was using:
$ rpm -qa yum\*
Comment 3 Doncho N. Gunchev 2007-06-19 10:03:57 EDT
# rpm -qa yum\* | sort

I still get (top):
27349 root      15   0  456m 444m 7564 S  0.0 44.4   0:27.92 yum

Just to make it clear, I run 'yum shell' and then multiple times (without 
leaving 'yum shell') 'info rpm' for example. 'list extras' without the '-test' 
repo shows nothing interesting (maybe just pirut.noarch, all others are KDE, 
wine, xorg, xen, gnome... stuff). What to look for?
Comment 4 Seth Vidal 2007-06-19 12:01:23 EDT
was this a fresh install of fedora or an upgrade?
Comment 5 James Antill 2007-06-19 13:30:00 EDT
 I see this with a completely fresh install of Fedora 7, from the live CD.

 I think I might have actually fixed this (or one of the problems) upstream
recently, with the list foo spped up.

 info/list calls _make_header_dict(), which does:

            pkgtup = self._hdr2pkgTuple(hdr)
            self._header_dict[pkgtup] = (hdr, idx)
            self._header_by_name.setdefault(pkgtup[0], []).append(
                (pkgtup, (hdr, idx)))

...the append just always gets bigger, by the number of all the packages in the
rpmdb. With the fix I did, commited "Sun, 10 Jun 2007 12:33:19 -0400 (EDT)" the
memory doesn't grow anymore.
 So, I'm going to close this.

Comment 6 James Antill 2007-06-19 13:35:10 EDT
 Doing a quick search reveals that "list available foo" still calls
_make_header_dict() all the time. The only other places are protected fromm
doing the work multiple times. I'll send a patch to the list for that.
Comment 7 Doncho N. Gunchev 2007-06-20 10:33:17 EDT
Thank you.

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