Bug 906457

Summary: pmap doesn't produce any output
Product: Red Hat Enterprise Linux 7 Reporter: Branislav Náter <bnater>
Component: procps-ngAssignee: Jaromír Cápík <jcapik>
Status: CLOSED CURRENTRELEASE QA Contact: Branislav Náter <bnater>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: ovasik
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: procps-ng-3.3.6-4.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:39:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Branislav Náter 2013-01-31 16:41:49 UTC
Description of problem:
Issue occures only on ppc64 and s390x platfrom. pmap doesn't produce any output and exit with return code 42. pmap behaves as expected on x86_64.

Version-Release number of selected component (if applicable):
procps-ng-3.3.6-2.el7

How reproducible:
always

Steps to Reproduce:
1. run "pmap $$"
  
Actual results:
no output, echo $? = 42

Expected results:
24496:   -bash
0000000000400000    872K r-x--  /usr/bin/bash
00000000006d9000      4K r----  /usr/bin/bash
00000000006da000     36K rw---  /usr/bin/bash
00000000006e3000     24K rw---    [ anon ]
00000000008e2000     36K rw---  /usr/bin/bash
0000000000b22000    528K rw---    [ anon ]
<snip>

Additional info:
pmap works on all platforms in previous version procps-ng-3.3.3-2.20120807git

Comment 2 Jaromír Cápík 2013-02-04 13:03:03 UTC
Hi ... it's very probably caused by a kernel update. I remember we recently received a patch for a new kernel field breaking the pmap output. Let me check that.

Comment 3 Jaromír Cápík 2013-02-04 16:45:54 UTC
Unfortunatelly it's caused by changes in procps-ng. The issue was introduced with changing the type of the pidlist variable from unsigned* to unsigned long*.

Comment 4 Jaromír Cápík 2013-02-04 17:17:48 UTC
I found the reason ...

unsigned size = 4
unsigned long size = 8
pid_t size = 4

The pidlist is passed to openproc. 
Openproc uses pid_t type, but the pidlist in pmap is defined as unsigned long* now. 

The pidlist type needs to be changed to pid_t *.

Comment 5 Jaromír Cápík 2013-02-05 15:18:36 UTC
Please, test the new release ... procps-ng-3.3.6-4.el7

https://brewweb.devel.redhat.com/taskinfo?taskID=5358711

Comment 6 Jaromír Cápík 2013-02-21 20:06:34 UTC
Please, postpone the tests. The whole pmap is currently being redesigned and will be available soon.

Comment 7 Jaromír Cápík 2013-11-01 18:59:35 UTC
NOTE: The redesigned pmap is available since 3.3.7 and it's already a part of the RHEL7.

Comment 8 Branislav Náter 2013-11-04 14:24:51 UTC
pmap from procps-ng-3.3.8-15.el7 now works correctly on all supported architectures.

# rpm -q procps-ng
procps-ng-3.3.8-14.el7.ppc64
# pmap $$
24227:   -bash
0000000010000000   1152K r-x-- bash
0000000010120000     64K r---- bash
0000000010130000     64K rw--- bash
0000000010140000     64K rw---   [ anon ]
000001000b830000    192K rw---   [ anon ]
<snip>

# rpm -q procps-ng
procps-ng-3.3.8-15.el7.s390x
# pmap $$
2426:   -bash
0000000080000000   1008K r-x-- bash
00000000800fc000      4K r---- bash
00000000800fd000     36K rw--- bash
0000000080106000     20K rw---   [ anon ]
00000000b82ff000    396K rw---   [ anon ]
000003fff6aa8000     56K r-x-- libnss_files-2.17.so
<snip>

Comment 9 Ludek Smid 2014-06-13 11:39:47 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.