all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test
@ 2021-08-07 21:54 Maxime Devos
  2021-08-08  6:27 ` Thiago Jung Bauermann via Guix-patches via
  2021-11-09  9:07 ` [bug#49933] " Brendan Tildesley
  0 siblings, 2 replies; 8+ messages in thread
From: Maxime Devos @ 2021-08-07 21:54 UTC (permalink / raw)
  To: 49933


[-- Attachment #1.1: Type: text/plain, Size: 94 bytes --]

In <https://issues.guix.gnu.org/XXXXX>, XXXXX will need
to be replaced with the debbugs id.

[-- Attachment #1.2: 0001-gnu-util-linux-Disable-unreliable-ioctl_ns-test.patch --]
[-- Type: text/x-patch, Size: 1654 bytes --]

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(+)

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


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test
  2021-08-07 21:54 [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test Maxime Devos
@ 2021-08-08  6:27 ` Thiago Jung Bauermann via Guix-patches via
  2021-08-08  9:06   ` Maxime Devos
  2021-11-09  9:07 ` [bug#49933] " Brendan Tildesley
  1 sibling, 1 reply; 8+ messages in thread
From: Thiago Jung Bauermann via Guix-patches via @ 2021-08-08  6:27 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 49933

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







^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test
  2021-08-08  6:27 ` Thiago Jung Bauermann via Guix-patches via
@ 2021-08-08  9:06   ` Maxime Devos
  2021-08-08 10:56     ` Maxime Devos
  2021-08-15 10:16     ` bug#49933: " Mathieu Othacehe
  0 siblings, 2 replies; 8+ messages in thread
From: Maxime Devos @ 2021-08-08  9:06 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: 49933


[-- Attachment #1.1: Type: text/plain, Size: 594 bytes --]

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.

[-- Attachment #1.2: 0001-gnu-util-linux-Disable-unreliable-ioctl_ns-test-on-I.patch --]
[-- Type: text/x-patch, Size: 2088 bytes --]

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(+)

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


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test
  2021-08-08  9:06   ` Maxime Devos
@ 2021-08-08 10:56     ` Maxime Devos
  2021-08-09 16:09       ` Thiago Jung Bauermann via Guix-patches via
  2021-08-15 10:16     ` bug#49933: " Mathieu Othacehe
  1 sibling, 1 reply; 8+ messages in thread
From: Maxime Devos @ 2021-08-08 10:56 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: 49933

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test
  2021-08-08 10:56     ` Maxime Devos
@ 2021-08-09 16:09       ` Thiago Jung Bauermann via Guix-patches via
  0 siblings, 0 replies; 8+ messages in thread
From: Thiago Jung Bauermann via Guix-patches via @ 2021-08-09 16:09 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 49933

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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#49933: [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test
  2021-08-08  9:06   ` Maxime Devos
  2021-08-08 10:56     ` Maxime Devos
@ 2021-08-15 10:16     ` Mathieu Othacehe
  1 sibling, 0 replies; 8+ messages in thread
From: Mathieu Othacehe @ 2021-08-15 10:16 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 49933-done, Thiago Jung Bauermann


Hey,

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

Pushed, thanks!

Mathieu




^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test
  2021-08-07 21:54 [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test Maxime Devos
  2021-08-08  6:27 ` Thiago Jung Bauermann via Guix-patches via
@ 2021-11-09  9:07 ` Brendan Tildesley
  2021-11-12  0:29   ` Thiago Jung Bauermann via Guix-patches via
  1 sibling, 1 reply; 8+ messages in thread
From: Brendan Tildesley @ 2021-11-09  9:07 UTC (permalink / raw)
  To: 49933@debbugs.gnu.org
  Cc: Mathieu Othacehe, maximedevos@telenet.be, Thiago Jung Bauermann

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.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test
  2021-11-09  9:07 ` [bug#49933] " Brendan Tildesley
@ 2021-11-12  0:29   ` Thiago Jung Bauermann via Guix-patches via
  0 siblings, 0 replies; 8+ messages in thread
From: Thiago Jung Bauermann via Guix-patches via @ 2021-11-12  0:29 UTC (permalink / raw)
  To: 49933@debbugs.gnu.org
  Cc: Mathieu Othacehe, maximedevos@telenet.be, Brendan Tildesley

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3162 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-12  0:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-07 21:54 [bug#49933] [PATCH core-updates-frozen] gnu: util-linux: Disable unreliable ioctl_ns test Maxime Devos
2021-08-08  6:27 ` Thiago Jung Bauermann via Guix-patches via
2021-08-08  9:06   ` Maxime Devos
2021-08-08 10:56     ` Maxime Devos
2021-08-09 16:09       ` Thiago Jung Bauermann via Guix-patches via
2021-08-15 10:16     ` bug#49933: " Mathieu Othacehe
2021-11-09  9:07 ` [bug#49933] " Brendan Tildesley
2021-11-12  0:29   ` Thiago Jung Bauermann via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.