test failures: nar, syscalls, containers

  • Done
  • quality assurance status badge
Details
3 participants
  • Thompson, David
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal
L
L
Leo Famulari wrote on 17 Aug 2015 05:43
(address . bug-guix@gnu.org)
1439783007.1743108.357849649.18351DEC@webmail.messagingengine.com
Running `make check` on HEAD ( commit 4e014373 ), I got failures for
tests/nar.scm, tests/syscalls.scm, and tests/containers.scm.

The same tests also failed when I checked out tag v0.8.3 but I don't
have those
logs anymore. Let me know if you want them.

I've attached test-suite.log and the logs for the failed modules.

Let me know if you need more tests.
Attachment: test-suite.log
Attachment: nar.log
%%%% Starting test containers
Group begin: containers
Test begin:
test-name: "call-with-container, user namespace"
source-file: "tests/containers.scm"
source-line: 37
source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "call-with-container, uts namespace"
source-file: "tests/containers.scm"
source-line: 45
source-form: (test-assert "call-with-container, uts namespace" (zero? (call-with-container (quote ()) (lambda () (sethostname "test-container") (primitive-exit 0)) #:namespaces (quote (user uts)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "call-with-container, pid namespace"
source-file: "tests/containers.scm"
source-line: 55
source-form: (test-assert "call-with-container, pid namespace" (zero? (call-with-container (quote ()) (lambda () (match (primitive-fork) (0 (assert-exit (= 2 (getpid)))) (pid (primitive-exit (match (waitpid pid) ((_ . status) (status:exit-val status))))))) #:namespaces (quote (user pid)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "call-with-container, mnt namespace"
source-file: "tests/containers.scm"
source-line: 70
source-form: (test-assert "call-with-container, mnt namespace" (zero? (call-with-container (quote (("none" device "/testing" "tmpfs" () #f #f))) (lambda () (assert-exit (file-exists? "/testing"))) #:namespaces (quote (user mnt)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "call-with-container, all namespaces"
source-file: "tests/containers.scm"
source-line: 77
source-form: (test-assert "call-with-container, all namespaces" (zero? (call-with-container (quote ()) (lambda () (primitive-exit 0)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "container-excursion"
source-file: "tests/containers.scm"
source-line: 83
source-form: (test-assert "container-excursion" (call-with-temporary-directory (lambda (root) (match (list (pipe) (pipe)) (((start-in . start-out) (end-in . end-out)) (define (container) (close end-out) (close start-in) (write (quote ready) start-out) (close start-out) (read end-in) (close end-in)) (define (namespaces pid) (let ((pid (number->string pid))) (map (lambda (ns) (readlink (string-append "/proc/" pid "/ns/" ns))) (quote ("user" "ipc" "uts" "net" "pid" "mnt"))))) (let* ((pid (run-container root (quote ()) %namespaces 1 container)) (container-namespaces (namespaces pid)) (result (begin (close start-out) (read start-in) (close start-in) (container-excursion pid (lambda () (match (primitive-fork) (0 (assert-exit (equal? container-namespaces (namespaces (getpid))))) (fork-pid (match (waitpid fork-pid) ((_ . status) (primitive-exit (status:exit-val status))))))))))) (close end-in) (write (quote done) end-out) (close end-out) (waitpid pid) (zero? result)))))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Group end: containers
# of unexpected failures 6
Attachment: syscalls.log
T
T
Thompson, David wrote on 17 Aug 2015 17:42
(name . Leo Famulari)(address . leo@famulari.name)(address . 21280@debbugs.gnu.org)
CAJ=RwfbtinDBba_yW3nEdEwqS3oUKjS7GKGP5X0c9XMDVNOp=A@mail.gmail.com
On Sun, Aug 16, 2015 at 11:43 PM, Leo Famulari <leo@famulari.name> wrote:
Toggle quote (11 lines)
> Running `make check` on HEAD ( commit 4e014373 ), I got failures for
> tests/nar.scm, tests/syscalls.scm, and tests/containers.scm.
>
> The same tests also failed when I checked out tag v0.8.3 but I don't
> have those
> logs anymore. Let me know if you want them.
>
> I've attached test-suite.log and the logs for the failed modules.
>
> Let me know if you need more tests.

Thanks for the report. I'm going to look into the issues with the
container and syscall tests. Which version of Linux[-libre] are you
using? It looks like you're using a kernel that doesn't properly
support containers, which we should detect and skip tests accordingly.

- Dave
L
L
Leo Famulari wrote on 18 Aug 2015 05:00
(name . Thompson, David)(address . dthompson2@worcester.edu)(address . 21280@debbugs.gnu.org)
1439866839.3345798.358861153.21B64C54@webmail.messagingengine.com
$ uname -a
Linux hostname 4.1.0-1-amd64 #1 SMP Debian 4.1.3-1 (2015-08-03) x86_64
GNU/Linux

This is Debian testing so things may be broken. Sorry, I didn't think of
that before submitting the report.

On Mon, Aug 17, 2015, at 11:42, Thompson, David wrote:
Toggle quote (18 lines)
> On Sun, Aug 16, 2015 at 11:43 PM, Leo Famulari <leo@famulari.name> wrote:
> > Running `make check` on HEAD ( commit 4e014373 ), I got failures for
> > tests/nar.scm, tests/syscalls.scm, and tests/containers.scm.
> >
> > The same tests also failed when I checked out tag v0.8.3 but I don't
> > have those
> > logs anymore. Let me know if you want them.
> >
> > I've attached test-suite.log and the logs for the failed modules.
> >
> > Let me know if you need more tests.
>
> Thanks for the report. I'm going to look into the issues with the
> container and syscall tests. Which version of Linux[-libre] are you
> using? It looks like you're using a kernel that doesn't properly
> support containers, which we should detect and skip tests accordingly.
>
> - Dave
L
L
Ludovic Courtès wrote on 18 Aug 2015 23:54
(name . Leo Famulari)(address . leo@famulari.name)(address . 21280@debbugs.gnu.org)
87si7gfejf.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (4 lines)
> %%%% Starting test nar (Writing full log to "nar.log")
> tests/nar.scm:202: FAIL write-file + restore-file
> tests/nar.scm:219: FAIL write-file + restore-file with symlinks

What is the file system of /home/leo/work/guix (see the output of the
‘mount’ command)?

Could you apply this patch (copy it to a file and run
“patch -p1 < the-patch” from the top-level source directory):
Toggle diff (16 lines)
diff --git a/tests/nar.scm b/tests/nar.scm
index b8e50c7..a47d522 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -211,6 +211,11 @@
(cut write-file input <>))
(call-with-input-file nar
(cut restore-file <> output))
+ (setvbuf (current-output-port) _IONBF)
+ (system (string-append "find " input "|xargs stat -c '%n %s'|sort"))
+ (display "\n-----------\n")
+ (system (string-append "find " output "|xargs stat -c '%n %s'|sort"))
+ (display "\n+++++++++++\n")
(file-tree-equal? input output))
(lambda ()
(false-if-exception (delete-file nar))
and then run “make check TESTS=tests/nar.scm” from the top-level build
directory, and post both the top-level ‘nar.log’ file and
‘tests/nar.log’?

Thanks in advance!

Ludo’.
L
L
Leo Famulari wrote on 19 Aug 2015 03:55
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 21280@debbugs.gnu.org)
1439949357.1343604.359857913.0408A579@webmail.messagingengine.com
On Tue, Aug 18, 2015, at 17:54, Ludovic Courtès wrote:
Toggle quote (3 lines)
> What is the file system of /home/leo/work/guix (see the output of the
> ‘mount’ command)?

$ mount
[...]
/dev/mapper/hostname--vg-home on /home type btrfs (rw,relatime,space_cache)
[...]

Toggle quote (4 lines)
> and then run “make check TESTS=tests/nar.scm” from the top-level build
> directory, and post both the top-level ‘nar.log’ file and
> ‘tests/nar.log’?

The logs are attached. I renamed tests/nar.log to tests-nar.log.

Let me know if you need more!
Attachment: nar.log
Attachment: tests-nar.log
L
L
Ludovic Courtès wrote on 20 Aug 2015 01:14
(name . Leo Famulari)(address . leo@famulari.name)(address . 21280@debbugs.gnu.org)
87614a50sk.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (9 lines)
> On Tue, Aug 18, 2015, at 17:54, Ludovic Courtès wrote:
>> What is the file system of /home/leo/work/guix (see the output of the
>> ‘mount’ command)?
>
> $ mount
> [...]
> /dev/mapper/hostname--vg-home on /home type btrfs (rw,relatime,space_cache)
> [...]

OK.

Toggle quote (6 lines)
>> and then run “make check TESTS=tests/nar.scm” from the top-level build
>> directory, and post both the top-level ‘nar.log’ file and
>> ‘tests/nar.log’?
>
> The logs are attached. I renamed tests/nar.log to tests-nar.log.

Hmm the output of ‘find’ in tests/nar.log suggests that the files are
indeed identical, so maybe it’s ‘file-tree-equal?’ that’s not working as
expected.

Could you try this patch and send tests/nar.log again?
Toggle diff (29 lines)
diff --git a/tests/nar.scm b/tests/nar.scm
index b8e50c7..37a357b 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -112,7 +112,8 @@
(file-system-fold (const #t)
(lambda (name stat result) ; leaf
(and result
- (file=? name (sibling name))))
+ (pk 'file=? name (sibling name)
+ (file=? name (sibling name)))))
(lambda (name stat result) ; down
result)
(lambda (name stat result) ; up

diff --git a/guix/tests.scm b/guix/tests.scm
index cd8eda2..efa1a6f 100644
--- a/guix/tests.scm
+++ b/guix/tests.scm
@@ -101,7 +101,8 @@
(define (file=? a b)
"Return true if files A and B have the same type and same content."
- (and (eq? (stat:type (lstat a)) (stat:type (lstat b)))
+ (and (eq? (pk 'stat a (stat:type (lstat a)))
+ (pk 'stat2 b (stat:type (lstat b))))
(case (stat:type (lstat a))
((regular)
(equal?
Thanks in advance,
Ludo’.
L
L
Leo Famulari wrote on 20 Aug 2015 06:14
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 21280@debbugs.gnu.org)
1440044072.3615090.360939601.63AA1D36@webmail.messagingengine.com
I applied the patch on a clean checkout of
8a0263f17b9c754f6de7ee0b869249e87bfb7e3f (gnu: tk: Build with Xft
support.). No luck.

On Wed, Aug 19, 2015, at 19:14, Ludovic Courtès wrote:
Toggle quote (31 lines)
> Leo Famulari <leo@famulari.name> skribis:
>
> > On Tue, Aug 18, 2015, at 17:54, Ludovic Courtès wrote:
> >> What is the file system of /home/leo/work/guix (see the output of the
> >> ‘mount’ command)?
> >
> > $ mount
> > [...]
> > /dev/mapper/hostname--vg-home on /home type btrfs (rw,relatime,space_cache)
> > [...]
>
> OK.
>
> >> and then run “make check TESTS=tests/nar.scm” from the top-level build
> >> directory, and post both the top-level ‘nar.log’ file and
> >> ‘tests/nar.log’?
> >
> > The logs are attached. I renamed tests/nar.log to tests-nar.log.
>
> Hmm the output of ‘find’ in tests/nar.log suggests that the files are
> indeed identical, so maybe it’s ‘file-tree-equal?’ that’s not working as
> expected.
>
> Could you try this patch and send tests/nar.log again?
>
>
> Thanks in advance,
> Ludo’.
> Email had 1 attachment:
> + Attachment2
> 1k (text/x-patch)
Attachment: nar.log
Attachment: tests-nar.log
L
L
Ludovic Courtès wrote on 20 Aug 2015 12:02
(name . Leo Famulari)(address . leo@famulari.name)(address . 21280@debbugs.gnu.org)
87bne22s6v.fsf@gnu.org
One last ‘pk’. Could you apply it and resend tests/nar.log?
Toggle diff (13 lines)
diff --git a/tests/nar.scm b/tests/nar.scm
index b8e50c7..9b39913 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -121,7 +122,8 @@
(lambda (name stat errno result)
(pk 'error name stat errno)
#f)
- (> (stat:nlink (stat output)) 2)
+ (> (pk 'stat-output output
+ (stat:nlink (stat output))) 2)
input
lstat))
I suspect the ‘nlink’ count on directories work differently on btrfs, or
something like that.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 25 Aug 2015 00:07
(name . Leo Famulari)(address . leo@famulari.name)(address . 21280@debbugs.gnu.org)
878u90s5lb.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (2 lines)
> On Thu, Aug 20, 2015, at 06:02, Ludovic Courtès wrote:

[...]

Toggle quote (3 lines)
>> I suspect the ‘nlink’ count on directories work differently on btrfs, or
>> something like that.

[...]

Toggle quote (8 lines)
> %%%% Starting test nar (Writing full log to "nar.log")
>
> ;;; (stat-output "./test-nar-7151" 1)
> tests/nar.scm:203: FAIL write-file + restore-file
>
> ;;; (stat-output "./test-nar-7151" 1)
> tests/nar.scm:220: FAIL write-file + restore-file with symlinks

Indeed, that confirms what I thought.

This looks like buggy or at least borderline behavior from Btrfs.
However, it seems that this ‘nlink’ test can be sidestepped altogether.

Could you apply this last patch and run:

make check TESTS=tests/nar.scm

again?

If it works for you, I’ll just apply it.

Thanks!

Ludo’.
Toggle diff (12 lines)
diff --git a/tests/nar.scm b/tests/nar.scm
index b8e50c7..58adb95 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -121,7 +121,7 @@
(lambda (name stat errno result)
(pk 'error name stat errno)
#f)
- (> (stat:nlink (stat output)) 2)
+ #t
input
lstat))
L
L
Leo Famulari wrote on 25 Aug 2015 19:38
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 21280@debbugs.gnu.org)
1440524289.2349338.365755033.3F2C22E4@webmail.messagingengine.com
Success!

# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0

I've attached the logs again, just in case.

Thanks for looking into this!

On Mon, Aug 24, 2015, at 18:07, Ludovic Courtès wrote:
Toggle quote (39 lines)
> Leo Famulari <leo@famulari.name> skribis:
>
> > On Thu, Aug 20, 2015, at 06:02, Ludovic Courtès wrote:
>
> [...]
>
> >> I suspect the ‘nlink’ count on directories work differently on btrfs, or
> >> something like that.
>
> [...]
>
> > %%%% Starting test nar (Writing full log to "nar.log")
> >
> > ;;; (stat-output "./test-nar-7151" 1)
> > tests/nar.scm:203: FAIL write-file + restore-file
> >
> > ;;; (stat-output "./test-nar-7151" 1)
> > tests/nar.scm:220: FAIL write-file + restore-file with symlinks
>
> Indeed, that confirms what I thought.
>
> This looks like buggy or at least borderline behavior from Btrfs.
> However, it seems that this ‘nlink’ test can be sidestepped altogether.
>
> Could you apply this last patch and run:
>
> make check TESTS=tests/nar.scm
>
> again?
>
> If it works for you, I’ll just apply it.
>
> Thanks!
>
> Ludo’.
>
> Email had 1 attachment:
> + Attachment2
> 1k (text/x-patch)
Attachment: nar.log
Attachment: tests-nar.log
L
L
Ludovic Courtès wrote on 26 Aug 2015 00:44
(name . Leo Famulari)(address . leo@famulari.name)(address . 21280-done@debbugs.gnu.org)
87k2sjc7jd.fsf@gnu.org
Pushed in fe32241, thanks for your patience!

Ludo’.
Closed
?