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 1508046 - nfsiostat errors on 'no device mounted on /sys/kernel/debug with fstype'
Summary: nfsiostat errors on 'no device mounted on /sys/kernel/debug with fstype'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks: 1565071
TreeView+ depends on / blocked
 
Reported: 2017-10-31 18:04 UTC by Manjunath Patil
Modified: 2021-12-10 15:22 UTC (History)
4 users (show)

Fixed In Version: nfs-utils-1.3.0-0.52.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1565071 (view as bug list)
Environment:
Last Closed: 2018-04-10 18:21:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3526191 0 None None None 2020-10-05 06:40:11 UTC
Red Hat Product Errata RHBA-2018:0981 0 None None None 2018-04-10 18:22:27 UTC

Description Manjunath 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>

Comment 3 Yongcheng Yang 2017-11-09 09:39:14 UTC
(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!

Comment 4 Manjunath Patil 2017-11-09 18:06:28 UTC
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

Comment 5 Yongcheng Yang 2017-11-10 07:36:40 UTC
Thanks Manjunath for the prompt help.

Moving to VERIFIED now as nfs-utils-1.3.0-0.52.el7 has resolved this problem.

Comment 9 errata-xmlrpc 2018-04-10 18:21:01 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-2018:0981


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