Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 157171 - Process memory usage incorrect in top.
Summary: Process memory usage incorrect in top.
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: ia64
OS: Linux
Target Milestone: ---
Assignee: Dave Anderson
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-08 05:53 UTC by rodrigo
Modified: 2007-11-30 22:07 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-10-19 19:02:50 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description rodrigo 2005-05-08 05:53:31 UTC
+++ This bug was initially created as a clone of Bug #137927 +++

Description of problem:
The top utility is reporting incorrect values for memory usage of
several long running processes.

We have Linux rac5 2.4.21-27.EL #1 SMP Wed Dec 1 21:54:21 EST 2004 ia64 ia64
ia64 GNU/Linux

Applied all the patches, and still having the issue.

How reproducible:
reported memory usage grows the longer the processes are running.

Actual results:
 16:32:50  up 14 days,  3:54, 23 users,  load average: 0.33, 0.17, 0.06
133 processes: 132 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
           total   10.4%    0.6%    5.2%   0.2%     0.0%    0.2%  182.8%
           cpu00    0.6%    0.0%    0.3%   0.0%     0.0%    0.0%   99.0%
           cpu01    9.9%    0.6%    4.9%   0.3%     0.0%    0.3%   83.8%
Mem:   509876k av,  495460k used,   14416k free,       0k shrd,  
15048k buff
                    339952k actv,   62768k in_d,    6932k in_c
Swap: 1044216k av,  398044k used,  646172k free                 
106360k cached
24717 smithj4   15   0 1591M 1.6G  3720 S     4.6 319.4 248:32   1 gkrellm
 5148 smithj4   15   0  905M 894M 14876 S     0.0 179.7 109:55   0
 6232 smithj4   15   0  805M 785M  5460 S     0.3 157.7  99:32   1
 4625 root      15   0  870M 582M  7512 S     3.7 117.0 647:44   0 X
 4726 smithj4   15   0  467M 463M  5184 S     0.3 93.0  35:02   0
 4472 root      15   0 98968  96M   540 S     0.0 19.4   0:01   0 crond

Expected results:
The ps command shows that gkrellm for example is using around 17MB of
memory instead of the nearly 1.6GB that top shows:

# ps aux | grep gkrellm
smithj4  24717  2.3  0.9 17080 4924 ?        S    Oct26 248:50 gkrellm

Additional info:
Compiled the attachment shown here:

and ran the executable:

# ./pagesize
getpagesize()=4096, PAGE_SHIFT: 12, pgshift: 2

Comment 1 Dave Anderson 2005-05-09 20:48:24 UTC
> Applied all the patches, and still having the issue.

Applied what patches?

Comment 2 Dave Anderson 2005-05-09 21:03:39 UTC
Exactly how does one reproduce this problem?

And what does the "pagesize" program have to do with it?  Was the version
whose output you show compiled on a 32-bit x86, and then run on an ia64?
Are the programs with the ps/top memory-size inequity 32-bit executables?

I'm completely confused...

Comment 3 Karel Zak 2005-05-09 21:48:09 UTC
Hmm.. it's not perfect bug report... I think clone a bug is not enough, better
is clone -> think & edit -> commit new report bug :-)

Please, ignore the program "pagesize" -- don't forget it's "clone of bug
#137927" where it was used during bug investigation only.

The original bug was possible detect by:

For details see bug #137927.

Comment 4 Dave Anderson 2005-05-10 14:15:24 UTC
Ok, can we confirm that this is an ia64-specific bug?

Comment 5 Dave Anderson 2005-05-10 14:25:48 UTC
I an running 2.4.21-32 (the latest proposed RHEL3-U5 kernel) on an ia64, and
the test returns: "The resident memory information test PASS"
every time I run it.

Comment 6 Dave Anderson 2005-05-10 15:04:12 UTC
Also, running a VM-test program with a large RSS, I don't see
any discrepancies between the output of top vs. ps, regardless
of how long it runs.

Can somebody please post a test program that shows the problem
on 2.4.21-32?

Comment 7 RHEL Product and Program Management 2007-10-19 19:02:50 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
For more information of the RHEL errata support policy, please visit:
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.

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