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.
DescriptionManjunath Patil
2017-10-31 18:04:01 UTC
Description of problem:
A debugfs mount could include 'No device mounted on /sys/kernel/debug with fstype debugfs' line to '/proc/self/mountstats' file. Present nfsiostat includes the "no device mounted ..." line from /proc/self/mountstats as addition description of the preceding mount point. If the preceding mount point is NFS mountpoint, nfsiostat fails to parse this line eventually.
nfsiostat fails with the below error.
#nfsiostat
:
:Traceback (most recent call last):
: File "/usr/sbin/nfsiostat", line 634, in <module>
: iostat_command(prog)
: File "/usr/sbin/nfsiostat", line 587, in iostat_command
: devices = list_nfs_mounts(origdevices, mountstats)
: File "/usr/sbin/nfsiostat", line 490, in list_nfs_mounts
: stats.parse_stats(descr)
: File "/usr/sbin/nfsiostat", line 179, in parse_stats
: self.__parse_rpc_line(words)
: File "/usr/sbin/nfsiostat", line 163, in __parse_rpc_line
: self.__rpc_data[op] = [long(word) for word in words[1:]]
:ValueError: invalid literal for long() with base 10: 'device'
:
:Local variables in innermost frame:
:_[1]: []
:self: <__main__.DeviceData instance at 0x128a290>
:word: 'device'
:words: ['no', 'device', 'mounted', 'on', '/sys/kernel/debug', 'with',
'fstype', 'debugfs'] >>>>>> error.
:op: 'n'
Version-Release number of selected component (if applicable):
nfs-utils-1.3.0-0.48.el7
How reproducible:
We can manually add the line 'No device mounted on /sys/kernel/debug with fstype debugfs' to a file along with the content of /proc/self/mountstats and make the nfsiostat read this file for parsing.
Steps to Reproduce:
1. cp /proc/self/mountstats /tmp/mountstats
2. update /usr/sbin/nfsiostat to read /tmp/mountstats
[change this line - (mountstats = parse_stats_file('/proc/self/mountstats')"]
3. Append 'No device mounted on /sys/kernel/debug..' below a NFS mount
4. run nfsiostat to see the above error
Actual results:
nfsiostat encounters parsing error
Expected results:
show the nfsiostat output without any parsing error
Additional info:
The following commit fixes this -
nfs-utils]# git log -n 1 0994dc1
commit 0994dc1bb7b348b7bec30f8053841e6d22caf633
Author: Manjunath Patil <manjunath.b.patil>
Date: Thu Oct 5 10:43:56 2017 -0400
nfsiostat: avoid parsing "no device mounted ..." line
Present nfsiostat includes the "no device mounted ..." line from
/proc/self/mountstats as addition description of the preceding mount
point. If the preceding mount point is NFS mountpoint, nfsiostat fails
to parse this line eventually. This patch avoids parsing this line.
Signed-off-by: Manjunath Patil <manjunath.b.patil>
Signed-off-by: Steve Dickson <steved>
(In reply to Manjunath Patil from comment #0)
> commit 0994dc1bb7b348b7bec30f8053841e6d22caf633
> Author: Manjunath Patil <manjunath.b.patil>
> Date: Thu Oct 5 10:43:56 2017 -0400
>
> nfsiostat: avoid parsing "no device mounted ..." line
Hi Manjunath, just want to double confirm that the line (triggering
problem) heads with "no device", *NOT* with (capital) "No device".
Your above patch only handle the lowercase letter. However, there are
some uppercase (i.e. "No device ...") mentioned in the description.
I'm a bit confused as I don't know which one actually exists.
Thanks in advance!
Sorry for the confusion. Its the lower case like "no device ..."
My description wrongly included capital N as in "No device ..."
A typical entry look as follows -
no device mounted on /sys/kernel/debug with fstype debugfs
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-2018:0981
Description of problem: A debugfs mount could include 'No device mounted on /sys/kernel/debug with fstype debugfs' line to '/proc/self/mountstats' file. Present nfsiostat includes the "no device mounted ..." line from /proc/self/mountstats as addition description of the preceding mount point. If the preceding mount point is NFS mountpoint, nfsiostat fails to parse this line eventually. nfsiostat fails with the below error. #nfsiostat : :Traceback (most recent call last): : File "/usr/sbin/nfsiostat", line 634, in <module> : iostat_command(prog) : File "/usr/sbin/nfsiostat", line 587, in iostat_command : devices = list_nfs_mounts(origdevices, mountstats) : File "/usr/sbin/nfsiostat", line 490, in list_nfs_mounts : stats.parse_stats(descr) : File "/usr/sbin/nfsiostat", line 179, in parse_stats : self.__parse_rpc_line(words) : File "/usr/sbin/nfsiostat", line 163, in __parse_rpc_line : self.__rpc_data[op] = [long(word) for word in words[1:]] :ValueError: invalid literal for long() with base 10: 'device' : :Local variables in innermost frame: :_[1]: [] :self: <__main__.DeviceData instance at 0x128a290> :word: 'device' :words: ['no', 'device', 'mounted', 'on', '/sys/kernel/debug', 'with', 'fstype', 'debugfs'] >>>>>> error. :op: 'n' Version-Release number of selected component (if applicable): nfs-utils-1.3.0-0.48.el7 How reproducible: We can manually add the line 'No device mounted on /sys/kernel/debug with fstype debugfs' to a file along with the content of /proc/self/mountstats and make the nfsiostat read this file for parsing. Steps to Reproduce: 1. cp /proc/self/mountstats /tmp/mountstats 2. update /usr/sbin/nfsiostat to read /tmp/mountstats [change this line - (mountstats = parse_stats_file('/proc/self/mountstats')"] 3. Append 'No device mounted on /sys/kernel/debug..' below a NFS mount 4. run nfsiostat to see the above error Actual results: nfsiostat encounters parsing error Expected results: show the nfsiostat output without any parsing error Additional info: The following commit fixes this - nfs-utils]# git log -n 1 0994dc1 commit 0994dc1bb7b348b7bec30f8053841e6d22caf633 Author: Manjunath Patil <manjunath.b.patil> Date: Thu Oct 5 10:43:56 2017 -0400 nfsiostat: avoid parsing "no device mounted ..." line Present nfsiostat includes the "no device mounted ..." line from /proc/self/mountstats as addition description of the preceding mount point. If the preceding mount point is NFS mountpoint, nfsiostat fails to parse this line eventually. This patch avoids parsing this line. Signed-off-by: Manjunath Patil <manjunath.b.patil> Signed-off-by: Steve Dickson <steved>