Bug 1253851 - Top displays high memory usage in a strange way
Top displays high memory usage in a strange way
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: procps-ng (Show other bugs)
7.1
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: Jan Rybar
David Jež
: Patch, Upstream
Depends On:
Blocks: 1420851 1466365
  Show dependency treegraph
 
Reported: 2015-08-14 18:23 EDT by Ellert van Koperen
Modified: 2018-04-10 09:41 EDT (History)
7 users (show)

See Also:
Fixed In Version: procps-ng-3.3.10-17.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 09:40:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
CentOS 9263 None None None Never
Red Hat Product Errata RHBA-2018:0781 None None None 2018-04-10 09:41 EDT

  None (edit)
Description Ellert van Koperen 2015-08-14 18:23:19 EDT
Description of problem:
A process that uses a considerable sum or far gets a strange line in top:
 1865 jchem-p+ 20 0 41.722g 0.018t 7444 S 63.1 13.2 1035:20 java
So that is 0.018t. Why not 18g, or something more accurate. I thought the credo was precision over readability. This is certainly not precise.


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


How reproducible:
easy

Steps to Reproduce:
1. run a process that uses a lot of ram 
2. run top
3.

Actual results:
0.0nnt

Expected results:
nn.nG

Additional info:
Also in the man page at the bottom there is stated:
8. BUGS
       To report bugs, follow the instructions at:
           http://www.debian.org/Bugs/Reporting [^]

Well that is funny, i have to go to the debian forums to report something in redhat/centos...
Comment 4 Jan Rybar 2017-02-23 09:59:49 EST
Hello Ellert,

I have problems to reproduce this issue. These are outputs on RHEL-7.3 on x86_53 machine (first with default top output, second with scaling to human-readable form using 'e' key):

default:
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                         
12152 root      20   0 2574956 2.451g      0 S  0.0 87.5   0:00.69 memwaster 

with 'e' key:
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                         
12152 root      20   0 2514.6m 2.155g   0.0m S  0.0 76.9   0:00.69 memwaster

Did you use a custom config file for top (altering scale targets)? Also version of procps-ng package might help me trace this.
rpm -qv procps-ng

To the additional info you mentioned:
The upstream version of procps (and procps-ng) package is created and maintained by Craig Small (and co-authored by Jim Warner) who also maintains these packages for Debian distribution.
I believe Craig prefers this Debian forum as he checks it more frequently.

Thank you and have a nice day.
Comment 5 Jan Rybar 2017-02-27 10:33:05 EST
I got it another round to find a reproducer. It seems like it only happens at the "Resident Memory" field and only if it exceeds 10GiB.
Will be further investigated.
Comment 6 Jan Rybar 2017-03-06 11:11:26 EST
Got it. I found out it's another instance of "too little space in column" problem. The field for resident memory is set to be 6 characters long, which ##.###g does not fit, however 0.###t does.
Fix is on its way.
Comment 8 Jan Rybar 2017-03-07 06:31:15 EST
Upstream NAKed the fix, because a new version containing the solution is said to be planned in future.
Comment 10 Jan Rybar 2017-03-13 09:36:06 EDT
Associated: bz#1034466
Comment 17 errata-xmlrpc 2018-04-10 09:40:54 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0781

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