Your message dated Sun, 10 Dec 2023 11:55:16 +0000
with message-id <[email protected]>
and subject line Bug#1057031: fixed in nvme-stas 2.3.1-1
has caused the Debian Bug report #1057031,
regarding nvme-stas: autopkgtest hanging on s390x
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 [email protected]
immediately.)


-- 
1057031: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057031
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: nvme-stas
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu noble ubuntu-patch

Dear Maintainer,

After applying fixes from bug 1054533 [1], autopkgtest
for nvme-stas hangs on s390x and ends up failing on timeout.

Excerpt from an autopkgtest run on Ubuntu [2].

> 96s test__data_matches_ip (test-iputil.Test.test__data_matches_ip) ... ok
> 596s test_get_interface (test-iputil.Test.test_get_interface)
> 10600s Check that get_interface() returns the right info ... autopkgtest 
> [02:09:30]: ERROR: timed out on command "su -s /bin/bash ubuntu -c set -e; 
> [...]

This is caused by an endianness issue in staslib.iputil when
packing/unpacking netlink data structures. It can be fixed by using host
byte ordering instead of "hard-coding" little endian.

I forwarded the fix upstream [3].

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

  * Fix endianness issues in staslib.iputil causing hangs on s390x.
    (LP: #2045000)

Thanks for considering the patch.

[1] https://bugs.debian.org/1054533
[2] 
https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/s390x/n/nvme-stas/20231128_021002_94626@/log.gz
[3] https://github.com/linux-nvme/nvme-stas/pull/406

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

Kernel: Linux 6.1.0-16-generic (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru nvme-stas-2.3/debian/control nvme-stas-2.3/debian/control
--- nvme-stas-2.3/debian/control        2023-11-27 17:45:04.000000000 +0100
+++ nvme-stas-2.3/debian/control        2023-11-28 11:01:46.000000000 +0100
@@ -1,8 +1,7 @@
 Source: nvme-stas
 Section: net
 Priority: optional
-Maintainer: Ubuntu Developers <[email protected]>
-XSBC-Original-Maintainer: Daniel Baumann <[email protected]>
+Maintainer: Daniel Baumann <[email protected]>
 Uploaders:
  Benjamin Drung <[email protected]>,
 Build-Depends:
diff -Nru nvme-stas-2.3/debian/patches/fix-iputil-endianness-issue.patch 
nvme-stas-2.3/debian/patches/fix-iputil-endianness-issue.patch
--- nvme-stas-2.3/debian/patches/fix-iputil-endianness-issue.patch      
1970-01-01 01:00:00.000000000 +0100
+++ nvme-stas-2.3/debian/patches/fix-iputil-endianness-issue.patch      
2023-11-28 11:01:46.000000000 +0100
@@ -0,0 +1,103 @@
+Description: iputil: pack and unpack using native byte ordering
+ On big-endian architectures (such as s390x), tests defined in
+ test-iputil.py would hang:
+ .
+  > 596s test_get_interface (test-iputil.Test.test_get_interface)
+  >   10600s Check that get_interface() returns the right info ...
+ .
+ Indeed, running the following hangs as well:
+ .
+  > from staslib import iputil
+  >
+  > iputil.net_if_addrs()
+ .
+ This is an endianness issue that can be fixed by using native
+ byte-ordering when packing and unpacking netlink data structures such as
+ ifaddrmsg.
+Author: Olivier Gayot <[email protected]>
+Bug-Ubuntu: https://launchpad.net/bugs/2045000
+Forwarded: https://github.com/linux-nvme/nvme-stas/pull/406
+Last-Update: 2023-11-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/staslib/iputil.py
++++ b/staslib/iputil.py
+@@ -42,7 +42,7 @@
+         __u32 nlmsg_pid;   /* Sending process port ID */
+     };
+     '''
+-    return struct.pack('<LHHLL', NLMSG_LENGTH(msg_len), nlmsg_type, 
nlmsg_flags, nlmsg_seq, nlmsg_pid)
++    return struct.pack('=LHHLL', NLMSG_LENGTH(msg_len), nlmsg_type, 
nlmsg_flags, nlmsg_seq, nlmsg_pid)
+ 
+ 
+ def _ifaddrmsg(family=0, prefixlen=0, flags=0, scope=0, index=0):
+@@ -55,7 +55,7 @@
+         __u32  ifa_index;      /* Link index           */
+     };
+     '''
+-    return struct.pack('<BBBBL', family, prefixlen, flags, scope, index)
++    return struct.pack('=BBBBL', family, prefixlen, flags, scope, index)
+ 
+ 
+ def _ifinfomsg(family=0, dev_type=0, index=0, flags=0, change=0):
+@@ -69,7 +69,7 @@
+         unsigned int    ifi_change; /* change mask: IFF_* */
+     };
+     '''
+-    return struct.pack('<BBHiII', family, 0, dev_type, index, flags, change)
++    return struct.pack('=BBHiII', family, 0, dev_type, index, flags, change)
+ 
+ 
+ def _nlmsg(nlmsg_type, nlmsg_flags, msg: bytes):
+@@ -102,7 +102,7 @@
+                 nlmsg += sock.recv(8192)
+ 
+             nlmsghdr = nlmsg[nlmsg_idx : nlmsg_idx + NLMSG_HDRLEN]
+-            nlmsg_len, nlmsg_type, _, _, _ = struct.unpack('<LHHLL', nlmsghdr)
++            nlmsg_len, nlmsg_type, _, _, _ = struct.unpack('=LHHLL', nlmsghdr)
+ 
+             if nlmsg_type == NLMSG_DONE:
+                 break
+@@ -110,13 +110,13 @@
+             if nlmsg_type == RTM_BASE:
+                 msg_indx = nlmsg_idx + NLMSG_HDRLEN
+                 msg = nlmsg[msg_indx : msg_indx + IFINFOMSG_SZ]  # ifinfomsg
+-                _, _, ifi_type, ifi_index, _, _ = struct.unpack('<BBHiII', 
msg)
++                _, _, ifi_type, ifi_index, _, _ = struct.unpack('=BBHiII', 
msg)
+ 
+                 if ifi_type in (ARPHRD_LOOPBACK, ARPHRD_ETHER):
+                     rtattr_indx = msg_indx + IFINFOMSG_SZ
+                     while rtattr_indx < (nlmsg_idx + nlmsg_len):
+                         rtattr = nlmsg[rtattr_indx : rtattr_indx + RTATTR_SZ]
+-                        rta_len, rta_type = struct.unpack('<HH', rtattr)
++                        rta_len, rta_type = struct.unpack('=HH', rtattr)
+                         if rta_type == IFLA_ADDRESS:
+                             data = nlmsg[rtattr_indx + RTATTR_SZ : 
rtattr_indx + rta_len]
+                             if _data_matches_mac(data, mac):
+@@ -206,7 +206,7 @@
+                 nlmsg += sock.recv(8192)
+ 
+             nlmsghdr = nlmsg[nlmsg_idx : nlmsg_idx + NLMSG_HDRLEN]
+-            nlmsg_len, nlmsg_type, _, _, _ = struct.unpack('<LHHLL', nlmsghdr)
++            nlmsg_len, nlmsg_type, _, _, _ = struct.unpack('=LHHLL', nlmsghdr)
+ 
+             if nlmsg_type == NLMSG_DONE:
+                 break
+@@ -214,7 +214,7 @@
+             if nlmsg_type == RTM_NEWADDR:
+                 msg_indx = nlmsg_idx + NLMSG_HDRLEN
+                 msg = nlmsg[msg_indx : msg_indx + IFADDRMSG_SZ]  # ifaddrmsg
+-                ifa_family, _, _, _, ifa_index = struct.unpack('<BBBBL', msg)
++                ifa_family, _, _, _, ifa_index = struct.unpack('=BBBBL', msg)
+ 
+                 if ifa_family in (socket.AF_INET, socket.AF_INET6):
+                     interfaces.setdefault(ifa_index, {4: [], 6: []})
+@@ -222,7 +222,7 @@
+                     rtattr_indx = msg_indx + IFADDRMSG_SZ
+                     while rtattr_indx < (nlmsg_idx + nlmsg_len):
+                         rtattr = nlmsg[rtattr_indx : rtattr_indx + RTATTR_SZ]
+-                        rta_len, rta_type = struct.unpack('<HH', rtattr)
++                        rta_len, rta_type = struct.unpack('=HH', rtattr)
+ 
+                         if rta_type == IFLA_IFNAME:
+                             data = nlmsg[rtattr_indx + RTATTR_SZ : 
rtattr_indx + rta_len]
diff -Nru nvme-stas-2.3/debian/patches/series 
nvme-stas-2.3/debian/patches/series
--- nvme-stas-2.3/debian/patches/series 2023-11-27 17:45:04.000000000 +0100
+++ nvme-stas-2.3/debian/patches/series 2023-11-28 11:01:46.000000000 +0100
@@ -1,2 +1,3 @@
 fix-test-libnvme-version.patch
 fix-test-udev-failing-multiple-IPv6.patch
+fix-iputil-endianness-issue.patch

--- End Message ---
--- Begin Message ---
Source: nvme-stas
Source-Version: 2.3.1-1
Done: Daniel Baumann <[email protected]>

We believe that the bug you reported is fixed in the latest version of
nvme-stas, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <[email protected]> (supplier of updated 
nvme-stas 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 [email protected])


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

Format: 1.8
Date: Sun, 10 Dec 2023 11:42:55 +0100
Source: nvme-stas
Architecture: source
Version: 2.3.1-1
Distribution: sid
Urgency: medium
Maintainer: Daniel Baumann <[email protected]>
Changed-By: Daniel Baumann <[email protected]>
Closes: 1054533 1057031 1057530
Changes:
 nvme-stas (2.3.1-1) sid; urgency=medium
 .
   * Uploading to sid.
   * Merging upstream version 2.3.1: - properly handles big-endian data in
     `iputils.py` (Closes: #1057031).
   * Adding patch from upstream to fix udev tests with dummy interfaces,
     thanks to Olivier Gayot <[email protected]> (Closes:
     #1057530).
   * Adding patch from upstream to fix tests with esoteric interface names,
     thanks to Olivier Gayot <[email protected]> (Closes:
     #1057530).
   * Adding nvme-cli to autopkg depends, thanks to Olivier Gayot
     <[email protected]> (Closes: #1054533).
Checksums-Sha1:
 7346116cfc61434119dc8740380e47c574646c68 2275 nvme-stas_2.3.1-1.dsc
 04190583049b555ffd0f0a090155e301553392d5 323696 nvme-stas_2.3.1.orig.tar.xz
 7b036ab95906aee855a7c0d481d629d21f1a603b 4744 nvme-stas_2.3.1-1.debian.tar.xz
 ac7b23208cd6c305a8a0d3ee2347ae9e1b107a0d 7800 nvme-stas_2.3.1-1_amd64.buildinfo
Checksums-Sha256:
 72e1241a446b50a655b82038ff8d8c9fd76d687662ab4e81d8892c7b8811991b 2275 
nvme-stas_2.3.1-1.dsc
 0f9664d1d1fc119ffcc3792582026ee3ccbab15b944d7d055b56979cb5ea6449 323696 
nvme-stas_2.3.1.orig.tar.xz
 157bf7dd144e8f8c160475576c05d4f4464713458d5162db7e7520b51cec9dcf 4744 
nvme-stas_2.3.1-1.debian.tar.xz
 74ec8d2b8a1a62705cd9a850204f9551239557c591613cf1580b057ef135006e 7800 
nvme-stas_2.3.1-1_amd64.buildinfo
Files:
 1508607c69a73b38e7177e1592176b2c 2275 net optional nvme-stas_2.3.1-1.dsc
 ca5e152780abed8945623af9daf23af2 323696 net optional 
nvme-stas_2.3.1.orig.tar.xz
 eadcde7d5c40d72903cf085ab48a0da0 4744 net optional 
nvme-stas_2.3.1-1.debian.tar.xz
 0e44d7b7e11c304a0b6ec33110df034f 7800 net optional 
nvme-stas_2.3.1-1_amd64.buildinfo

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

iQIzBAEBCgAdFiEEgTbtJcfWfpLHSkKSVc8b+YaruccFAmV1lokACgkQVc8b+Yar
uccgZQ/7BADtF9o7EPf3WzZgPaAH72awqX7g8s2ZG2nlVOGsQINSVI/AfidV8Pll
E9yOdpJcsm8sgFGoXLxjN6uvvdL4RAIBY6Es5WIPW6yJeVVB74tKGp8LkAioXdO3
S422FhrQITQUQe2lkbxX8qBVJOAXTEnHXdgtxeR6rmVh9O6pG0fQt09wkJzqUw2b
BBDhzotQppCSnWNxJv9VuhoMzK8JmN5DgcnnX8fHuzxtbVRg4p117R770TV4YFin
GEbmOAst+SRnI2NRH+HC+hYm5lxdpueKMl9OxTy1fQ2IpKwT5A/nwJCpstQnQqXK
AUZ7HAvuC3ViV/TTo+/E+7OFGehPqhKi+7JSKSulYnobvtUNdhIWzr2iAFY+gd4k
vFCKqRUXuH97QmnMZUDIGnd5gaipTq7/cNhC9ndl7o9bZo6AoMAby3KJsPuNzG0Z
PHmSMjzmEoowTWwhSx8JW7aW+3a6joj29BKrM7S9Qo8WEtpNYnC5Vhmraikwg6hL
ltw3pN21Dwvn42mE3VPrQkjSMtQfRfOyj8K+1Uc8054Jrj9fBKE1WdL7yksUdTso
39hSLeKjeYPqZt/W1FO/vB2+TBmaOmx5YdnSM26riWzkXb9bEhNWeRuWDgOv9yC1
sg6o8PtbJP2AdRe+wM8ngqikmWyD0zZkDXaLCNwRsB35xQ2NPNw=
=KeCq
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to