Bug 249085 - memory leak in yum-updatesd
Summary: memory leak in yum-updatesd
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum   
(Show other bugs)
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: James Antill
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-07-20 20:00 UTC by Kevin Krafthefer
Modified: 2018-10-19 23:19 UTC (History)
3 users (show)

Fixed In Version: RHBA-2008-0388
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 14:20:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
hourly memory check (ps) (12.38 KB, text/plain)
2008-04-07 11:30 UTC, Stefan Orbilt
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0388 normal SHIPPED_LIVE yum bug fix update 2008-05-20 16:41:14 UTC

Description Kevin Krafthefer 2007-07-20 20:00:22 UTC
Description of problem:
yum-updatesd will does not free up memory after a yum update takes place

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

How reproducible:

Steps to Reproduce:
1. cat /proc/meminfo
2. yum update -y
3. cat /proc/meminfo
Actual results:
yum-updatesd consumes more and more memory with each yum update performed

Expected results:
yum-updatesd releases memory

Additional info:
related to fedora bugs 

Comment 1 RHEL Product and Program Management 2007-10-16 13:44:59 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 4 Jan Hutař 2008-02-22 11:01:06 UTC
I'm not able to reproduce this - no significant memory raise AFAIK :(

# rpm -Uvh --oldpackage /tmp/repo-GOLD/{systemtap,sysstat,vim-common,vim-
enhanced,vim-X11}-*   # just to get in some old packages which would need to 
# service yum-updatesd restart
# cat /proc/meminfo > before
# yum -y upgrade systemtap
# yum -y upgrade vim-X11
# yum -y upgrade sysstat
# cat /proc/meminfo > after
# diff -u before after

Diff on the last line says this for OLD packages:

--- OLD-before  2008-02-22 11:45:30.000000000 +0100
+++ OLD-after   2008-02-22 11:46:08.000000000 +0100
@@ -1,21 +1,21 @@
 MemTotal:      2065492 kB
-MemFree:        679852 kB
-Buffers:        184364 kB
-Cached:        1027180 kB
+MemFree:        678984 kB
+Buffers:        185184 kB
+Cached:        1026952 kB
 SwapCached:          0 kB
-Active:         653640 kB
-Inactive:       651356 kB
+Active:         653032 kB
+Inactive:       652560 kB
 HighTotal:     1169404 kB
-HighFree:        47968 kB
+HighFree:        47844 kB
 LowTotal:       896088 kB
-LowFree:        631884 kB
+LowFree:        631140 kB
 SwapTotal:     1835000 kB
 SwapFree:      1835000 kB
-Dirty:           11884 kB
+Dirty:           42312 kB
 Writeback:           0 kB
 AnonPages:       93420 kB
 Mapped:          34056 kB
-Slab:            68740 kB
+Slab:            68832 kB
 PageTables:       3428 kB
 NFS_Unstable:        0 kB
 Bounce:              0 kB

Adn this for NEW yum-* packages:

--- NEW-before  2008-02-22 12:27:09.000000000 +0100
+++ NEW-after   2008-02-22 12:28:00.000000000 +0100
@@ -1,26 +1,26 @@
 MemTotal:      2065492 kB
-MemFree:        674328 kB
-Buffers:        186864 kB
-Cached:        1027152 kB
+MemFree:        670856 kB
+Buffers:        187280 kB
+Cached:        1029884 kB
 SwapCached:          0 kB
-Active:         658456 kB
-Inactive:       651792 kB
+Active:         661376 kB
+Inactive:       652040 kB
 HighTotal:     1169404 kB
-HighFree:        37740 kB
+HighFree:        47040 kB
 LowTotal:       896088 kB
-LowFree:        636588 kB
+LowFree:        623816 kB
 SwapTotal:     1835000 kB
 SwapFree:      1835000 kB
-Dirty:           35900 kB
+Dirty:           37788 kB
 Writeback:           0 kB
-AnonPages:       96196 kB
+AnonPages:       96220 kB
 Mapped:          33620 kB
-Slab:            68656 kB
+Slab:            68868 kB
 PageTables:       3468 kB
 NFS_Unstable:        0 kB
 Bounce:              0 kB
 CommitLimit:   2867744 kB
-Committed_AS:   388984 kB
+Committed_AS:   388980 kB
 VmallocTotal:   114680 kB
 VmallocUsed:      5644 kB
 VmallocChunk:   108816 kB

Checking `grep Vm /proc/`pidof -x yum-updatesd`/status` shows exactly *no* 

Is here something more I can try?

Thanks in advance,

Comment 5 James Antill 2008-02-22 15:00:12 UTC
 I assume the "yum update -y" instruction was a typo, or a holder for what
yum-updatesd would be doing.
 As running the update from the yum command line wouldn't affect yum-updatesd.

 Have yum-updatesd configured to apply updates, then start the service and wait
for it to check (lower the timeout to 5m or so, should be fine).

Comment 8 Stefan Orbilt 2008-04-01 14:58:02 UTC
I noticed only recently that yum-updatesd leaks memory like crazy. In 24 hours
it can leak 200-400 MB. I am running RHEL 5.1 with yum-updatesd-3.0.1-5.el5.
This is similar to this bug: https://bugzilla.redhat.com/show_bug.cgi?id=249894.
Could it have something to do with a recent kernel update or yum-rhn-plugin update?

Like James said "yum update -y" doesn´t affect this.

Comment 9 Stefan Orbilt 2008-04-07 11:30:51 UTC
Created attachment 301503 [details]
hourly memory check (ps)

Attached is the output log I have created by running "ps" hourly in a cron job.
As you can see yum-updatesd leaks about 10 MB per hour.

I have also made a cron job now that restarts yum-updatesd if...I mean when the
memory usage reaches 295 MB.

Comment 11 errata-xmlrpc 2008-05-21 14:20:46 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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