nfsiostat broken and exits with traceback

Bug #1821261 reported by Matthew Ruffell
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NFS-Utils
Unknown
Unknown
nfs-utils (Debian)
Fix Released
Unknown
nfs-utils (Ubuntu)
Fix Released
Medium
Matthew Ruffell
Bionic
Fix Released
Medium
Matthew Ruffell
Cosmic
Fix Released
Medium
Matthew Ruffell
Disco
Fix Released
Medium
Matthew Ruffell

Bug Description

[Impact]

 * nfsiostat, in nfs-common-1.3.4-2, is broken in bionic, cosmic and disco.

 * nfsiostat will not run at all, and is unusuable when users run the command. Users should be able to run the command and see output of their nfs mounts.

 * The bug is caused by the 'list' reserved word being used as a variable name in list_nfs_mounts(), and is explained here: https://askubuntu.com/questions/1123319/nfsiostat-failing-on-18-04/1123336#1123336?s=a1e9150fbf284e849efe6fe084e7c7b8

[Test Case]

* When you run the command nfsiostat, either as root or a regular user, the following traceback is printed:

$ nfsiostat
Traceback (most recent call last):
  File "/usr/sbin/nfsiostat", line 640, in <module>
    iostat_command(prog)
  File "/usr/sbin/nfsiostat", line 593, in iostat_command
    devices = list_nfs_mounts(origdevices, mountstats)
  File "/usr/sbin/nfsiostat", line 495, in list_nfs_mounts
    for device, descr in list(mountstats.items()):
TypeError: 'list' object is not callable

* Instead, the correct behaviour is not crash, and do something like the following on a system with no current nfs mounts:

$ nfsiostat
No NFS mount points were found

[Regression Potential]

 * There is only one file modified, which is the nfsiostat python script. There is no other changes to any other executable in the package. Since nfsiostat was in complete failure before, the fix makes it work again, there should not be any cause for concern regarding regressions.

 * In the event of a regression, worst case scenario is that users are impacted in getting the status of their nfs mounts, while still being able to freely mount and use such devices, since they are handled by other packages.

 * I have built and tested all versions of packages in a ppa, which you can find here:
 https://launchpad.net/~mruffell/+archive/ubuntu/nfs-utils-testing

[Other Info]

 * The impacted code is present in xenial and trusty, since it was merged into upstream in 2009. However, due to how the function works, the program executes fine and does not crash.

* Upstream commit:
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=c4c14011b70375050d7bba7c57e2eaf4c715dc7c

description: updated
Changed in nfs-utils (Ubuntu):
assignee: nobody → Matthew Ruffell (mruffell)
importance: Undecided → Medium
status: New → In Progress
tags: added: sts
Revision history for this message
Matthew Ruffell (mruffell) wrote :

Upstream bug: https://bugzilla.linux-nfs.org/show_bug.cgi?id=334

Attached is the patch that was sent upstream

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "[PATCH] nfsiostat: replace 'list' reserved word" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Matthew Ruffell (mruffell) wrote :
Revision history for this message
Matthew Ruffell (mruffell) wrote :

Builds have been done in a ppa, and can be pulled for testing here:
https://launchpad.net/~mruffell/+archive/ubuntu/nfs-utils-testing

autopkgtests pass for all builds.

description: updated
Revision history for this message
Matthew Ruffell (mruffell) wrote :

Attached is the debdiff for nfs-utils in disco.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Attached is the debdiff for nfs-utils for cosmic. Please SRU once disco package is released.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Attached is the debdiff for nfs-utils for bionic. Please SRU once disco package has been released.

tags: added: sts-sponsor
Revision history for this message
Matthew Ruffell (mruffell) wrote :

Revised nfs-utils debdiff for disco
Changes: Moved patch from git to dep3

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Revised nfs-utils debdiff for cosmic
Changes: Moved patch from git to dep3

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Revised nfs-utils debdiff for bionic
Changes: Moved patch from git to dep3

Eric Desrochers (slashd)
tags: added: sts-sponsor-slashd
Eric Desrochers (slashd)
description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

Sponsored in Disco, considering the fix was merged upstream and submitted in Debian.

Let's wait until the package lands in disco-releases, and I'll sponsor the SRU in B/C release.

Great work Matthew !

- Eric

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.3.4-2.3ubuntu3

---------------
nfs-utils (1:1.3.4-2.3ubuntu3) disco; urgency=medium

  * d/p/nfsiostat-replace-list-reserved-word.patch: fix nfsiostat crash due to
    using 'list' as a variable name. (LP: #1821261)

 -- Matthew Ruffell <email address hidden> Tue, 02 Apr 2019 11:09:15 +1300

Changed in nfs-utils (Ubuntu Disco):
status: In Progress → Fix Released
Eric Desrochers (slashd)
Changed in nfs-utils (Ubuntu Cosmic):
assignee: nobody → Matthew Ruffell (mruffell)
Changed in nfs-utils (Ubuntu Bionic):
assignee: nobody → Matthew Ruffell (mruffell)
Changed in nfs-utils (Ubuntu Cosmic):
importance: Undecided → Medium
Changed in nfs-utils (Ubuntu Bionic):
importance: Undecided → Medium
status: New → In Progress
Changed in nfs-utils (Ubuntu Cosmic):
status: New → In Progress
Revision history for this message
Eric Desrochers (slashd) wrote :

Sponsored for B & C release. They are both wainting in their respective upload queues for approval by the SRU team to start building in their respective -proposed pockets.

- Eric

Revision history for this message
Brian Murray (brian-murray) wrote :

There is a bucket / crash for this in the Error Tracker:

https://errors.ubuntu.com/problem/e4edf523918aa63bd2d4b6c370ff92953b7af0a8

Changed in nfs-utils (Ubuntu Cosmic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Matthew, or anyone else affected,

Accepted nfs-utils into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nfs-utils/1:1.3.4-2.2ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nfs-utils (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Matthew, or anyone else affected,

Accepted nfs-utils into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nfs-utils/1:1.3.4-2.1ubuntu5.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

I started a fresh cosmic virtual machine and enabled -proposed, and installed nfs-common (1:1.3.4-2.2ubuntu3.1), which is a subpackage of nfs-utils.

I ran the command:
$ nfsiostat
No NFS mount points were found

The program ran successfully and did not error out. Verifying for cosmic.

tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Revision history for this message
Matthew Ruffell (mruffell) wrote :

I started a fresh bionic virtual machine and enabled -proposed, and installed nfs-common (1:1.3.4-2.1ubuntu5.1), which is a subpackage of nfs-utils.

I ran the command:
$ nfsiostat
No NFS mount points were found

The program ran successfully and did not error out. Verifying for bionic.

tags: added: verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.3.4-2.2ubuntu3.1

---------------
nfs-utils (1:1.3.4-2.2ubuntu3.1) cosmic; urgency=medium

  * d/p/nfsiostat-replace-list-reserved-word.patch: fix nfsiostat crash due to
    using 'list' as a variable name. (LP: #1821261)

 -- Matthew Ruffell <email address hidden> Tue, 02 Apr 2019 13:40:52 +1300

Changed in nfs-utils (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for nfs-utils has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.3.4-2.1ubuntu5.1

---------------
nfs-utils (1:1.3.4-2.1ubuntu5.1) bionic; urgency=medium

  * d/p/nfsiostat-replace-list-reserved-word.patch: fix nfsiostat crash due to
    using 'list' as a variable name. (LP: #1821261)

 -- Matthew Ruffell <email address hidden> Tue, 02 Apr 2019 13:46:35 +1300

Changed in nfs-utils (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in nfs-utils (Debian):
status: Unknown → Confirmed
Dan Streetman (ddstreet)
tags: removed: sts-sponsor
Changed in nfs-utils (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.