Bug 1288497 - pmap - no sums computed for RSS and Dirty column
pmap - no sums computed for RSS and Dirty column
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: procps (Show other bugs)
6.7
i686 Unspecified
medium Severity low
: rc
: ---
Assigned To: Ondrej Vasik
Branislav Náter
Petr Bokoc
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-04 07:13 EST by Branislav Náter
Modified: 2016-05-10 20:29 EDT (History)
2 users (show)

See Also:
Fixed In Version: procps-3.2.8-36.el6
Doc Type: Bug Fix
Doc Text:
Previously the layout of the extended pmap output differed on 32-bit and 64-bit architectures due to the fact, that it is generated for both bit widths with a different part of the source code. While the 64-bit code went through an evolution, the 32-bit code was forgotten and the layout was kept intact for a long time and some of the values were missing (for example the sums for the RSS/Dirty columns). This update fixes the 32-bit layout to match the 64-bit layout. The only expected difference is the width of the address column.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-10 20:29:08 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)
procps-3.2.8-pmap-32bit-layout-fix.patch (722 bytes, patch)
2015-12-04 11:11 EST, Jaromír Cápík
no flags Details | Diff

  None (edit)
Description Branislav Náter 2015-12-04 07:13:32 EST
Description of problem:
pmap produce output with no sums/totals for RSS and Dirty column. Issue is presented only on i686 architecture, all other (x86_64, ppc64, s390x) arch works as expected (sum is prented)

Version-Release number of selected component (if applicable):
procps-3.2.8-34.el6_7.i686

How reproducible:
always, see bellow

Steps to Reproduce:
1. pmap -x $$

Actual results:
# pmap -x $$
19555:   -bash
Address   Kbytes     RSS   Dirty Mode   Mapping
00426000      88      68       0 r-x--  libtinfo.so.5.7
0043c000      12       8       4 rw---  libtinfo.so.5.7
0056e000       4       4       0 r-x--    [ anon ]
0087f000     120     100       0 r-x--  ld-2.12.so
0089d000       4       4       4 r----  ld-2.12.so
0089e000       4       4       4 rw---  ld-2.12.so
008a5000    1600     536       0 r-x--  libc-2.12.so
00a35000       4       0       0 -----  libc-2.12.so
00a36000       8       8       4 r----  libc-2.12.so
00a38000       4       4       4 rw---  libc-2.12.so
00a39000      12      12      12 rw---    [ anon ]
00a5b000      12       8       0 r-x--  libdl-2.12.so
00a5e000       4       4       4 r----  libdl-2.12.so
00a5f000       4       4       4 rw---  libdl-2.12.so
00b91000      48      16       0 r-x--  libnss_files-2.12.so
00b9d000       4       4       4 r----  libnss_files-2.12.so
00b9e000       4       4       4 rw---  libnss_files-2.12.so
08047000     836     532       0 r-x--  bash
08118000      20      20      20 rw---  bash
0811d000      20      20      20 rw---    [ anon ]
084f7000     264     140     140 rw---    [ anon ]
b7531000    2048      68       0 r----  locale-archive
b7731000       8       8       8 rw---    [ anon ]
b7735000       8       8       8 rw---    [ anon ]
b7737000      28      20       0 r--s-  gconv-modules.cache
b773e000       4       4       0 r----  locale-archive
b773f000       4       4       4 rw---    [ anon ]
bf967000      84      20      20 rw---    [ stack ]
-------- ------- ------- ------- -------
total kB    5260       -       -       -                  <-------------
Comment 1 Jaromír Cápík 2015-12-04 07:25:55 EST
I'm trying to test that on 32-bit ppc in order to get more info that could help us to understand the problem better.
Comment 2 Jaromír Cápík 2015-12-04 07:48:19 EST
I'm unable to install 32-bit RHEL5 on PPC. The installer is terminated unexpectedly. Gonna debug on i686.
Comment 3 Jaromír Cápík 2015-12-04 10:51:20 EST
It's really strange. The whole layout differs on i686. There are 5 dashed columns instead of 4 and the total is incorrect.
Comment 4 Jaromír Cápík 2015-12-04 10:52:52 EST
x86_64:

00007fff5bd42000      84      24      24 rw---    [ stack ]
00007fff5bd93000       4       4       0 r-x--    [ anon ]
ffffffffff600000       4       0       0 r-x--    [ anon ]
----------------  ------  ------  ------
total kB          108728    2020     604



i686:

b77c9000       8       8       8 rw---    [ anon ]
b77d7000       4       4       4 rw---    [ anon ]
bf96a000      84      20      20 rw---    [ stack ]
-------- ------- ------- ------- -------
total kB 1195600       -       -       -
Comment 5 Jaromír Cápík 2015-12-04 11:02:43 EST
For some reason, the 32-bit code differs from the 64-bit code. Someone probably did some kind of enhancement and forgot to modify the bottom code.

    if(x_option){
      if(sizeof(KLONG)==8){
        printf("----------------  ------  ------  ------\n");
        printf(
          "total kB %15ld %7llu %7llu\n",
          (total_shared + total_private_writeable + total_private_readonly) >> 10,
          total_rss, (total_shared_dirty+total_private_dirty)
   
        );
      }else{
        printf("-------- ------- ------- ------- -------\n");
        printf(
          "total kB %7ld       -       -       -\n",
          (total_shared + total_private_writeable + total_private_readonly) >> 10
        );
      }
    }
Comment 6 Jaromír Cápík 2015-12-04 11:11 EST
Created attachment 1102322 [details]
procps-3.2.8-pmap-32bit-layout-fix.patch
Comment 12 errata-xmlrpc 2016-05-10 20:29:08 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://rhn.redhat.com/errata/RHBA-2016-0904.html

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