[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#925943: marked as done (nfs-common: nfsiostat crashes due to using reserved word 'list' as variable name)



Your message dated Fri, 13 Mar 2020 13:51:41 +0000
with message-id <E1jCkiz-000Czt-Bg@fasolo.debian.org>
and subject line Bug#925943: fixed in nfs-utils 1:1.3.4-3
has caused the Debian Bug report #925943,
regarding nfs-common: nfsiostat crashes due to using reserved word 'list' as variable name
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
925943: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925943
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: nfs-utils
Version: 1:1.3.4-2.3
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu disco ubuntu-patch

Dear Maintainer,

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

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

This 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

I have sent a patch upstream to fix this, and it was commited in:
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=c4c14011b70375050d7bba7c57e2eaf4c715dc7c

In Ubuntu, the attached patch was applied to achieve the following:

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

Please land this patch in debian to aid with the SRU process.

Thanks for considering the patch.

-- System Information:
Debian Release: buster/sid
  APT prefers cosmic-updates
  APT policy: (500, 'cosmic-updates'), (500, 'cosmic-security'), (500, 'cosmic'), (100, 'cosmic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-16-generic (SMP w/4 CPU cores)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), LANGUAGE=en_NZ:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru nfs-utils-1.3.4/debian/control nfs-utils-1.3.4/debian/control
--- nfs-utils-1.3.4/debian/control	2019-03-26 01:24:29.000000000 +1300
+++ nfs-utils-1.3.4/debian/control	2019-03-29 11:09:15.000000000 +1300
@@ -1,8 +1,7 @@
 Source: nfs-utils
 Priority: standard
 Section: net
-Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
-XSBC-Original-Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
+Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
 Uploaders: Anibal Monsalve Salazar <anibal@debian.org>, Ben Hutchings <ben@decadent.org.uk>, Steve Langasek <vorlon@debian.org>, Daniel Pocock <pocock@debian.org>
 Build-Depends: debhelper (>= 9.20160709), libwrap0-dev, libevent-dev, libnfsidmap-dev (>= 0.24), libkrb5-dev, libblkid-dev, libkeyutils-dev, pkg-config, libldap2-dev, libcap-dev, libtirpc-dev (>= 1.0.2), libdevmapper-dev, dh-autoreconf, libmount-dev, libsqlite3-dev
 Standards-Version: 4.2.1
diff -Nru nfs-utils-1.3.4/debian/patches/nfsiostat-replace-list-reserved-word.patch nfs-utils-1.3.4/debian/patches/nfsiostat-replace-list-reserved-word.patch
--- nfs-utils-1.3.4/debian/patches/nfsiostat-replace-list-reserved-word.patch	1970-01-01 12:00:00.000000000 +1200
+++ nfs-utils-1.3.4/debian/patches/nfsiostat-replace-list-reserved-word.patch	2019-03-29 11:08:23.000000000 +1300
@@ -0,0 +1,45 @@
+From c4c14011b70375050d7bba7c57e2eaf4c715dc7c Mon Sep 17 00:00:00 2001
+From: Matthew Ruffell <matthew.ruffell@canonical.com>
+Date: Thu, 28 Mar 2019 15:43:21 -0400
+Subject: [PATCH] nfsiostat: replace 'list' reserved word
+
+list is a reserved word in python and should not be used as a variable
+name. Changing list to devicelist for list_nfs_mounts()
+
+Fixes: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1821261
+
+Signed-off-by: Matthew Ruffell <matthew.ruffell@canonical.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ tools/nfs-iostat/nfs-iostat.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: nfs-utils-1.3.4/tools/nfs-iostat/nfs-iostat.py
+===================================================================
+--- nfs-utils-1.3.4.orig/tools/nfs-iostat/nfs-iostat.py
++++ nfs-utils-1.3.4/tools/nfs-iostat/nfs-iostat.py
+@@ -484,20 +484,20 @@ def list_nfs_mounts(givenlist, mountstat
+        return a full list if the given list is empty -
+        may return an empty list if none found
+     """
+-    list = []
++    devicelist = []
+     if len(givenlist) > 0:
+         for device in givenlist:
+             stats = DeviceData()
+             stats.parse_stats(mountstats[device])
+             if stats.is_nfs_mountpoint():
+-                list += [device]
++                devicelist += [device]
+     else:
+         for device, descr in list(mountstats.items()):
+             stats = DeviceData()
+             stats.parse_stats(descr)
+             if stats.is_nfs_mountpoint():
+-                list += [device]
+-    return list
++                devicelist += [device]
++    return devicelist
+ 
+ def iostat_command(name):
+     """iostat-like command for NFS mount points
diff -Nru nfs-utils-1.3.4/debian/patches/series nfs-utils-1.3.4/debian/patches/series
--- nfs-utils-1.3.4/debian/patches/series	2019-03-26 01:24:29.000000000 +1300
+++ nfs-utils-1.3.4/debian/patches/series	2019-03-29 11:02:25.000000000 +1300
@@ -19,3 +19,4 @@
 glibc-2.28-compat.patch
 truncate_uid.patch
 truncate_uid_2.patch
+nfsiostat-replace-list-reserved-word.patch

--- End Message ---
--- Begin Message ---
Source: nfs-utils
Source-Version: 1:1.3.4-3
Done: Salvatore Bonaccorso <carnil@debian.org>

We believe that the bug you reported is fixed in the latest version of
nfs-utils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 925943@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Salvatore Bonaccorso <carnil@debian.org> (supplier of updated nfs-utils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 13 Mar 2020 05:16:46 +0100
Source: nfs-utils
Architecture: source
Version: 1:1.3.4-3
Distribution: unstable
Urgency: medium
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: Salvatore Bonaccorso <carnil@debian.org>
Closes: 892654 925089 925943 940848 953441
Changes:
 nfs-utils (1:1.3.4-3) unstable; urgency=medium
 .
   [ Salvatore Bonaccorso ]
   * nfsiostat: replace 'list' reserved word.
     Thanks to Matthew Ruffell <matthew.ruffell@canonical.com>
     (Closes: #925943, LP: #1821261)
   * Remove Anibal Monsalve Salazar from Uploaders on request of MIA team.
     Thanks to Anibal Monsalve Salazar for all previous work done on nfs-utils.
     (Closes: #925089)
   * statd: take user-id from /var/lib/nfs/sm (CVE-2019-3689) (Closes: #940848)
   * Don't make /var/lib/nfs owned by statd.
     Only sm and sm.bak need to be accessible by statd or sm-notify after
     they drop privileges.
   * debian/control: Point Vcs URLs to kernel-team namespace repository
   * debian/control: Add myself to Uploaders
 .
   [ Andreas Hasenack ]
   * debian/nfs-utils_env.sh: Fix mismatching [RPC]SVCGSSDOPTS defaults
     Export SVCGSSDARGS, which is the variable name expected by the
     rpc-svcgssd systemd service. The old variable is still being
     exported to prevent upgrades from breaking for those who may
     have overridden the systemd service to work around the bug.
     (Closes: #892654)
 .
   [ Ben Hutchings ]
   * debian/control: Remove Daniel Pocock from Uploaders. (Closes: #953441)
   * debian/control: Delete wrong Homepage fields for binary packages
   * debian/control: Change Homepage to HTTP-S URL
   * debian/copyright: Update upstream source URL to match debian/watch
Checksums-Sha1: 
 5123fb77555ff163099dda1c4d13d05004384f0e 2448 nfs-utils_1.3.4-3.dsc
 82c52f3de518413c123640f090370f1dce5e1a5e 50348 nfs-utils_1.3.4-3.debian.tar.xz
Checksums-Sha256: 
 7a4b5cd04f0309c9e9184ed4759ec943a7cb3fd4716644492211fac6de4b8af3 2448 nfs-utils_1.3.4-3.dsc
 1fe2cfc6fba315350ea39423ebe93d930b913dd360a41edd8d0dfb571a602181 50348 nfs-utils_1.3.4-3.debian.tar.xz
Files: 
 601dc44bba5f6f32b8ec5a6f4f590119 2448 net optional nfs-utils_1.3.4-3.dsc
 02c6bb37e6cd52c50eb9731ebdbbeeff 50348 net optional nfs-utils_1.3.4-3.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQKmBAEBCgCQFiEERkRAmAjBceBVMd3uBUy48xNDz0QFAl5rjDxfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDQ2
NDQ0MDk4MDhDMTcxRTA1NTMxRERFRTA1NENCOEYzMTM0M0NGNDQSHGNhcm5pbEBk
ZWJpYW4ub3JnAAoJEAVMuPMTQ89EdwgP/1sF6DkUTMssdrfvPGJqjTwI1iNVV3Xd
suLAHfP+gOBsZ4PoLae6NovKWbGaRObocjGOn5q7wxxxt3Ql54NrMhXNssQu9nm2
laL3WnvRxCkzeI7vAKPCmiN5XhNgdG32a94pCFeWx0xzYMp1aW8J5hhEyHvJOSLi
kjGElwtADMZSo5gm13rHy1MbI0rgksabYdC0zLZbGAhErGtxosgmRQBJ1ycBZAs4
McHi27OzDOWe3J815uxoiBiENQIzHnSUGHueRndSQaLIBycg5gnpHDs6KTbfk3YS
kMP7QCsivZ/UFLYwltlZOXi0HghvLcpzjaK8Nir9MJx7C7FygNz/FO8CM2zMvoVE
yhqomgHWZ2zNpouHFnVtGLRT720obEGbX5YFinBgB6sFmXTqTSi8qKR+mJ1EQ6t9
cRj1U7JrBCdcGAR+nzqRVCgsaLZxH42GU5rkaHwngXRFOrNPRsz6KcYjzi1cFfia
K7oufVruVJU7cC5RJwEsIIw9nEchFOeg0xeqd3G8JVxwfaZBHU48dmLzzsGe8oVw
ET3ZS5a094SwemUxqJaqLaKElS5k8OONtY/sGJZ0yI0F31S+nwsvWAX2FynkWX2R
RfQNo0mLIlGx7R/DaEVo3Uy0DgYEfCRleOYpreOevEQLdlg3Vv54h+t34E23t6Vv
Zh28LLLtxhum
=4jIY
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: