Red Hat Bugzilla – Bug 244466
yum info leaks memory
Last modified: 2014-01-21 17:58:36 EST
Description of problem:
'yum shell' and then 'info package' leaks memory.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. yum shell
2. info any_package_even_non_existent
3. repeat step 2 and look the memory usage
yum info package leaks memory. 20-30 'info package' would kill my PC (1G RAM).
One should be able to ask for info for every package without running out of
I have no idea if this affects yumex, pup or others.
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.
I'll try to remove all unneeded and test again, was using:
$ rpm -qa yum\*
# 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?
was this a fresh install of fedora or an upgrade?
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)
(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.
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.