Bug 1262870 - pmap produces ludicrous output on shared memory using programs due to bogus parsing
Summary: pmap produces ludicrous output on shared memory using programs due to bogus p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: procps
Version: 6.7
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: Branislav Náter
Petr Bokoc
URL:
Whiteboard:
Depends On:
Blocks: 1172231 1277512
TreeView+ depends on / blocked
 
Reported: 2015-09-14 13:49 UTC by Martin Poole
Modified: 2019-09-12 08:55 UTC (History)
9 users (show)

Fixed In Version: procps-3.2.8-35.el6
Doc Type: Bug Fix
Doc Text:
*pmap* no longer reports incorrect totals With the introduction of `VmFlags` in the kernel *smaps* interface, the *pmap* tool could no longer reliably process the content due to format differences of the `VmFlags` entry. As a consequence, *pmap* reported incorrect totals. The underlying source code has been patched, and *pmap* now works as expected.
Clone Of: 1262864
: 1277512 (view as bug list)
Environment:
Last Closed: 2016-05-11 00:28:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0904 0 normal SHIPPED_LIVE procps bug fix and enhancement update 2016-05-10 22:51:16 UTC

Comment 2 Martin Poole 2015-09-17 14:42:26 UTC
RHEL6 reproducer

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <stdio.h>


int
main( int argc, char *argv[] )
{
    int fd, shmid;
    void *vp;
    char cmdline[4096];
    char *pwdname = "/etc/passwd";

    /* memory map something */
    fd = open( pwdname, O_RDONLY );
    vp = mmap( NULL, 4096, PROT_READ, MAP_SHARED, fd, 0 );
    fprintf( stderr, "mmap of %s at %p\n", pwdname, vp );

    /* call out to get our own maps */
    sprintf( cmdline, "pmap -x %ld", getpid() );
    system( cmdline );
    return(0);
}

Comment 14 errata-xmlrpc 2016-05-11 00:28:50 UTC
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.