GNU bug report logs - #49933
[PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test

Previous Next

Package: guix-patches;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Sat, 7 Aug 2021 21:56:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49933 in the body.
You can then email your comments to 49933 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49933; Package guix-patches. (Sat, 07 Aug 2021 21:56:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxime Devos <maximedevos <at> telenet.be>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 07 Aug 2021 21:56:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: guix-patches <at> gnu.org
Subject: [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable
 ioctl_ns test
Date: Sat, 07 Aug 2021 23:54:50 +0200
[Message part 1 (text/plain, inline)]
In <https://issues.guix.gnu.org/XXXXX>, XXXXX will need
to be replaced with the debbugs id.
[0001-gnu-util-linux-Disable-unreliable-ioctl_ns-test.patch (text/x-patch, inline)]
From dae891f54d4ace4ab467d547f1c91cf003f47051 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos <at> 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 <at> 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(+)

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

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49933; Package guix-patches. (Sun, 08 Aug 2021 06:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 49933 <at> debbugs.gnu.org (full text, mbox):

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 49933 <at> debbugs.gnu.org
Subject: Re: [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable
 unreliable ioctl_ns test
Date: Sun, 08 Aug 2021 03:27:46 -0300
Hello Maxime,

Em sábado, 7 de agosto de 2021, às 18:54:50 -03, Maxime Devos escreveu:
> 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







Information forwarded to guix-patches <at> gnu.org:
bug#49933; Package guix-patches. (Sun, 08 Aug 2021 09:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 49933 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: 49933 <at> debbugs.gnu.org
Subject: Re: [bug#49933] [PATCH core-updates-frozen] gnu: util-linux:
 Disable unreliable ioctl_ns test
Date: Sun, 08 Aug 2021 11:06:42 +0200
[Message part 1 (text/plain, inline)]
Hi,

> 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.
[0001-gnu-util-linux-Disable-unreliable-ioctl_ns-test-on-I.patch (text/x-patch, inline)]
From ba4be4629773633ea873db824ff0743a5d0dda8a Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos <at> 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(+)

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 <at> posteo.net>
 ;;; Copyright © 2021 B. Wilson <elaexuotee <at> wilsonb.com>
 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich <at> spbu.ru>
+;;; Copyright © 2021 Maxime Devos <maximedevos <at> 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

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49933; Package guix-patches. (Sun, 08 Aug 2021 10:57:02 GMT) Full text and rfc822 format available.

Message #14 received at 49933 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: 49933 <at> debbugs.gnu.org
Subject: Re: [bug#49933] [PATCH core-updates-frozen] gnu: util-linux:
 Disable unreliable ioctl_ns test
Date: Sun, 08 Aug 2021 12:56:23 +0200
[Message part 1 (text/plain, inline)]
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.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49933; Package guix-patches. (Mon, 09 Aug 2021 16:11:02 GMT) Full text and rfc822 format available.

Message #17 received at 49933 <at> debbugs.gnu.org (full text, mbox):

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 49933 <at> debbugs.gnu.org
Subject: Re: [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable
 unreliable ioctl_ns test
Date: Mon, 09 Aug 2021 13:09:39 -0300
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:
> 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






Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Sun, 15 Aug 2021 10:17:02 GMT) Full text and rfc822 format available.

Notification sent to Maxime Devos <maximedevos <at> telenet.be>:
bug acknowledged by developer. (Sun, 15 Aug 2021 10:17:02 GMT) Full text and rfc822 format available.

Message #22 received at 49933-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 49933-done <at> debbugs.gnu.org, Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Subject: Re: bug#49933: [PATCH core-updates-frozen] gnu: util-linux: Disable
 unreliable ioctl_ns test
Date: Sun, 15 Aug 2021 12:16:01 +0200
Hey,

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

Pushed, thanks!

Mathieu




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 12 Sep 2021 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Brendan Tildesley <mail <at> brendan.scot> to control <at> debbugs.gnu.org. (Tue, 09 Nov 2021 09:07:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#49933; Package guix-patches. (Tue, 09 Nov 2021 09:09:01 GMT) Full text and rfc822 format available.

Message #29 received at 49933 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: "49933 <at> debbugs.gnu.org" <49933 <at> debbugs.gnu.org>
Cc: Mathieu Othacehe <othacehe <at> gnu.org>,
 "maximedevos <at> telenet.be" <maximedevos <at> telenet.be>,
 Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Subject: [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable
 ioctl_ns test
Date: Tue, 9 Nov 2021 10:07:52 +0100 (CET)
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.




Information forwarded to guix-patches <at> gnu.org:
bug#49933; Package guix-patches. (Fri, 12 Nov 2021 00:30:02 GMT) Full text and rfc822 format available.

Message #32 received at 49933 <at> debbugs.gnu.org (full text, mbox):

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: "49933 <at> debbugs.gnu.org" <49933 <at> debbugs.gnu.org>
Cc: Mathieu Othacehe <othacehe <at> gnu.org>,
 "maximedevos <at> telenet.be" <maximedevos <at> telenet.be>,
 Brendan Tildesley <mail <at> brendan.scot>
Subject: Re: [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable
 ioctl_ns test
Date: Thu, 11 Nov 2021 21:29:19 -0300
[Message part 1 (text/plain, inline)]
Hello Brendan,

Em terça-feira, 9 de novembro de 2021, às 06:07:52 -03, Brendan Tildesley escreveu:
> 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.

> 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:

https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?
id=597ccb7bf564f65bb059bfe420224cab0fba46ac[1]

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

> 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

--------
[1] https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?
id=597ccb7bf564f65bb059bfe420224cab0fba46ac
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 10 Dec 2021 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.