[PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test

  • Done
  • quality assurance status badge
Details
4 participants
  • Thiago Jung Bauermann
  • Brendan Tildesley
  • Maxime Devos
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 7 Aug 2021 23:54
(address . guix-patches@gnu.org)
cc327a48ae0b6e2a2570f923b428d4dbd5eeb7cc.camel@telenet.be
to be replaced with the debbugs id.
From dae891f54d4ace4ab467d547f1c91cf003f47051 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 7 Aug 2021 23:41:10 +0200
Subject: [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable
ioctl_ns test.
To: guix-patches@gnu.org

* gnu/packages/linux.scm
(util-linux)[arguments]<#:phases>{delete-lsns-test}: New phase.
---
gnu/packages/linux.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (23 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a5fd8ddaee..c964602e63 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1804,6 +1804,14 @@ providing the system administrator with some help in common tasks.")
(string-append
all "\n"
"ts_skip \"setarch tests are unreliable under QEMU\"")))))
+ (add-before 'check 'disable-lsns-test
+ (lambda _
+ ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
+ ;; returning ENOTTY, indicating this kernel does not
+ ;; support user namespaces. Curiously, this test can fail
+ ;; on i686 even if the same test passes on x86_64 on the
+ ;; same machine. See <https://issues.guix.gnu.org/XXXXX>.
+ (delete-file "tests/ts/lsns/ioctl_ns")))
(add-after 'install 'move-static-libraries
(lambda* (#:key outputs #:allow-other-keys)
(let ((lib (assoc-ref outputs "lib"))

base-commit: 944ba4237f4c0ccab1bc62a23a31f577ce1878e5
--
2.32.0
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYQ8BKhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tXFAP93o8pD972MUQikOsvNPFKQulfn
xJJfZD2WevWgyI+/bAD/aKBPfq2ceLggI0Ke5WkWMQGFbhFecH86JvAgg1pjXAM=
=e1vD
-----END PGP SIGNATURE-----


T
T
Thiago Jung Bauermann wrote on 8 Aug 2021 08:27
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 49933@debbugs.gnu.org)
74088102.xUv88IJzmX@popigai
Hello Maxime,

Em sábado, 7 de agosto de 2021, às 18:54:50 -03, Maxime Devos escreveu:
Toggle quote (20 lines)
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index a5fd8ddaee..c964602e63 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -1804,6 +1804,14 @@ providing the system administrator with some help in common tasks.")
> (string-append
> all "\n"
> "ts_skip \"setarch tests are unreliable under QEMU\"")))))
> + (add-before 'check 'disable-lsns-test
> + (lambda _
> + ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
> + ;; returning ENOTTY, indicating this kernel does not
> + ;; support user namespaces. Curiously, this test can fail
> + ;; on i686 even if the same test passes on x86_64 on the
> + ;; same machine. See <https://issues.guix.gnu.org/XXXXX>.
> + (delete-file "tests/ts/lsns/ioctl_ns")))
> (add-after 'install 'move-static-libraries
> (lambda* (#:key outputs #:allow-other-keys)
> (let ((lib (assoc-ref outputs "lib"))

Thanks! I can confirm this behavior also happens on my machine, running
Guix on a foreign distro (Ubuntu, with kernel 5.11.0-25-generic). I ran
into the problem while trying to build ‘bootstrap-tarballs’, and with
your patch it works.

Just one suggestion: what about only deleting the problematic test if
‘%current-system’ is "i686-linux"?

--
Thanks,
Thiago
M
M
Maxime Devos wrote on 8 Aug 2021 11:06
(name . Thiago Jung Bauermann)(address . bauermann@kolabnow.com)(address . 49933@debbugs.gnu.org)
073f4c2a0ec6bae374e65dd3abb8fdba2e94d749.camel@telenet.be
Hi,

Toggle quote (8 lines)
> Thanks! I can confirm this behavior also happens on my machine, running
> Guix on a foreign distro (Ubuntu, with kernel 5.11.0-25-generic). I ran
> into the problem while trying to build ‘bootstrap-tarballs’, and with
> your patch it works.
>
> Just one suggestion: what about only deleting the problematic test if
> ‘%current-system’ is "i686-linux"?

Maybe it's required on other arches as well (32-bit arches that have a
64-bit counterpart maybe?), but that seems reasonable (more arches
can be added later). A revised patch is attached.

Greetings,
Maxime.
From ba4be4629773633ea873db824ff0743a5d0dda8a Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 7 Aug 2021 23:41:10 +0200
Subject: [PATCH core-updates-frozen v2] gnu: util-linux: Disable unreliable
ioctl_ns test on IA-32.

* gnu/packages/linux.scm
(util-linux)[arguments]<#:phases>{delete-lsns-test}: New phase.
---
gnu/packages/linux.scm | 11 +++++++++++
1 file changed, 11 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a5fd8ddaee..5690b81bf1 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -53,6 +53,7 @@
;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1804,6 +1805,16 @@ providing the system administrator with some help in common tasks.")
(string-append
all "\n"
"ts_skip \"setarch tests are unreliable under QEMU\"")))))
+ ,@(if (target-x86-32?)
+ `((add-before 'check 'disable-lsns-test
+ (lambda _
+ ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
+ ;; returning ENOTTY, indicating this kernel does not
+ ;; support user namespaces. Curiously, this test can fail
+ ;; on i686 even if the same test passes on x86_64 on the
+ ;; same machine. See <https://issues.guix.gnu.org/49933>.
+ (delete-file "tests/ts/lsns/ioctl_ns"))))
+ '())
(add-after 'install 'move-static-libraries
(lambda* (#:key outputs #:allow-other-keys)
(let ((lib (assoc-ref outputs "lib"))

base-commit: 944ba4237f4c0ccab1bc62a23a31f577ce1878e5
--
2.32.0
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYQ+eoxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7se6AP0aQZduG88dTK1lEBCMBYFeVL5X
7ww5ZNur5buG+H+NagEApaZZ9vekblZkb1RQz0hd2mAa5eEzpMuOy9uS70aDaw8=
=xep4
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 8 Aug 2021 12:56
(name . Thiago Jung Bauermann)(address . bauermann@kolabnow.com)(address . 49933@debbugs.gnu.org)
a947525a7232955d6f22f2e6ff9c9b2b7e16d9df.camel@telenet.be
Maxime Devos schreef op zo 08-08-2021 om 11:06 [+0200]:
Toggle quote (6 lines)
> + ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
> + ;; returning ENOTTY, indicating this kernel does not
> + ;; support user namespaces. Curiously, this test can fail
> + ;; on i686 even if the same test passes on x86_64 on the
> + ;; same machine. See <https://issues.guix.gnu.org/49933>;.

This happend with a 5.10.47 kernel. According to ioctl_ns(2), NS_GET_USERNS
is available since Linux 4.9. I wonder if this happens on i686 kernels as well,
and if some extra things needs to be enabled in the kernel configuration.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYQ+4WBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7r3sAP9s1J2FSzGBn/MzE58xqj9GUR4a
d3GleDHyA76CFxAH8AEAiHo5P1i0GDI0CmVnLIW7xwY0FQjtvRF5lIFihjxM3Q0=
=Cw0Q
-----END PGP SIGNATURE-----


T
T
Thiago Jung Bauermann wrote on 9 Aug 2021 18:09
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 49933@debbugs.gnu.org)
1671752.noS1iWLZrW@popigai
Hello Maxime,

Thank you for sending a v2. It looks good to me.

Em domingo, 8 de agosto de 2021, às 07:56:23 -03, Maxime Devos escreveu:
Toggle quote (13 lines)
> Maxime Devos schreef op zo 08-08-2021 om 11:06 [+0200]:
> > + ;; The lsns tests can fail due to
> > ioctl(_, NS_GET_USERNS) + ;; returning
> > ENOTTY, indicating this kernel does not +
> > ;; support user namespaces. Curiously, this test can fail +
> > ;; on i686 even if the same test passes on x86_64
> > on the + ;; same machine. See
> > <https://issues.guix.gnu.org/49933>;.
> This happend with a 5.10.47 kernel. According to ioctl_ns(2),
> NS_GET_USERNS is available since Linux 4.9. I wonder if this happens on
> i686 kernels as well, and if some extra things needs to be enabled in
> the kernel configuration.

Out of curiosity, I created an i686 KVM guest running Guix System, and the
test passes there, on the core-updates-frozen branch. So it seems to be an
issue with the x86_64 kernel running 32-bit binaries.

I also noticed that the ioctl_ns test is new in util-linux. It was added in
version 2.37.

--
Thanks,
Thiago
M
M
Mathieu Othacehe wrote on 15 Aug 2021 12:16
Re: bug#49933: [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test
(name . Maxime Devos)(address . maximedevos@telenet.be)
877dgn813y.fsf_-_@gnu.org
Hey,

Toggle quote (3 lines)
> * gnu/packages/linux.scm
> (util-linux)[arguments]<#:phases>{delete-lsns-test}: New phase.

Pushed, thanks!

Mathieu
Closed
B
B
Brendan Tildesley wrote on 9 Nov 2021 10:06
(name . control@debbugs.gnu.org)(address . control@debbugs.gnu.org)
95134140.433153.1636448764849@office.mailbox.org
unarchive 49933
B
B
Brendan Tildesley wrote on 9 Nov 2021 10:07
(name . 49933@debbugs.gnu.org)(address . 49933@debbugs.gnu.org)
842514087.433416.1636448872229@office.mailbox.org
I just got this test failure on x86_64 (AMD 5800X):

lsns: ownership and hierarchy ... FAILED (lsns/ioctl_ns)

Maybe the test needs to be disabled completely. It only happened once thoughout of ~10 --check's. Has the issue been reported upstream?


Also, the tests used all 16 threads despite it running make test -c 8, but it guess thats unrelated.
T
T
Thiago Jung Bauermann wrote on 12 Nov 2021 01:29
(name . 49933@debbugs.gnu.org)(address . 49933@debbugs.gnu.org)
2311361.YLgtAUrg3H@popigai
Hello Brendan,

Em terça-feira, 9 de novembro de 2021, às 06:07:52 -03, Brendan Tildesley escreveu:
Toggle quote (7 lines)
> I just got this test failure on x86_64 (AMD 5800X):
>
> lsns: ownership and hierarchy ... FAILED
> (lsns/ioctl_ns)
>
> Maybe the test needs to be disabled completely.

It was, on the core-updates-frozen branch. When it is merged to master, then you won’t
run the test anymore even on x86_64-linux.

Toggle quote (3 lines)
> It only happened once thoughout of ~10 --check's. Has the issue been
> reported upstream?

I wasn’t aware that the test failed intermitently. That’s unfortunate. From a quick search
online, I’m not seeing any report of this problem.

One thing which I did find was this recent change to the ioctl_ns test:

id=597ccb7bf564f65bb059bfe420224cab0fba46ac[1]

Apparently it doesn’t work when run inside a namespace.

Toggle quote (3 lines)
> Also, the tests used all 16 threads despite it running make test -c 8,
> but it guess thats unrelated.

I agree, that would be a separate issue.

--
Thanks,
Thiago

--------
id=597ccb7bf564f65bb059bfe420224cab0fba46ac
Attachment: file
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49933@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49933
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch