Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionApurbita Mukherjee
2019-12-11 10:52:47 UTC
Description of problem:
When querying the hrSWRunStatus table via SNMP when using snmpd, it should generally return 1 or 2 for processes that are running or runnable. However, if the process name contains a space, snmpd return 4 (invalid) for the process state. This appears to be because it's reading /proc/$PID/stat and simply splitting on space and then grabbing the third element, which would normally be the process status, but when the process name contains a space, this is no longer true.
Version-Release number of selected component (if applicable):
net-snmp-5.7.2-43.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Install above net-snmp version
2. Configure SNMP using rocommunity
3. As an example of a process where this is failing:
$ cat /proc/52425/stat
52425 (spamd child) S 52423 52423 52423 0 -1 1077944384 525 0 0 0 0 0 0 0 20 0 1 0 4144660 296542208 17648 18446744073709551615 1 1 0 0 0 0 0 4224 2048 18446744073709551615 0 0 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0
$ snmpwalk -v2c -c **** localhost .1.3.6.1.2.1.25.4.2.1.7.52425
HOST-RESOURCES-MIB::hrSWRunStatus.52425 = INTEGER: invalid(4) <<<----
Actual results:
it should generally return 1 or 2 for processes that are running.
Expected results:
The snmpwalk result should be correct instead of returning any invalid error.
Additional info:
This looks to have been fixed in upstream snmpd in 5.7.3 in this commit https://github.com/net-snmp/net-snmp/commit/8fa46f29613c1792c4a14432944273b6d74e3f3c#diff-bdb35b3a9a24eb5464a067632ef01ddf which is the version after the one that's currently in RHEL7, - 5.7.2.
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 (net-snmp bug fix and enhancement update), 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-2020:4037