RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1442974 - numastat -p <PID> should return non-zero exit status when PID does not exist
Summary: numastat -p <PID> should return non-zero exit status when PID does not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: numactl
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pingfan Liu
QA Contact: Leos Pol
URL:
Whiteboard:
Depends On: 1315184 1678561
Blocks: 1472889 1647768
TreeView+ depends on / blocked
 
Reported: 2017-04-18 08:33 UTC by Jiri Hladky
Modified: 2019-08-06 13:00 UTC (History)
5 users (show)

Fixed In Version: numactl-2.0.12-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 12:59:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2156 0 None None None 2019-08-06 13:00:06 UTC

Description Jiri Hladky 2017-04-18 08:33:02 UTC
Description of problem:

numastat -p <PID> with non-existent PID returns 0 exit status. It makes it hard to detect the error.


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

numastat version: 20130723: Jan  7 2016


How reproducible:

Always:

numastat -p 123456
echo $? => got zero even if PID 123456 does not exist:

$ numastat -p 123456

Per-node process memory usage (in MBs) for PID 123456 ((null))
Can't read /proc/123456/numa_maps: No such file or directory

$ echo $?
0

Comment 5 Pingfan Liu 2019-05-21 06:33:23 UTC
Have created a pull request https://github.com/numactl/numactl/pull/64
Wait for upstream response.

Comment 6 Pingfan Liu 2019-05-31 02:43:10 UTC
This bug makes other components depended on numactl hard to detect the error, cause potential risk in these components. And the patch is merged in upstream, ready to be back ported now. So asking the exception flags.

Comment 8 Leos Pol 2019-06-07 14:58:03 UTC
numactl-2.0.12-3.el7 verified by attached TC

Comment 10 errata-xmlrpc 2019-08-06 12:59:58 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://access.redhat.com/errata/RHBA-2019:2156


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