'call-with-container' fails to mount /dev/mqueue with EBUSY (on Ubuntu)

OpenSubmitted by Konrad Hinsen.
Details
4 participants
  • Ben Woodcroft
  • Konrad Hinsen
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Severity
normal
K
K
Konrad Hinsen wrote on 19 May 2016 17:17
Test failure on "make check" from a fresh git checkout (commit 9684e30b9b597b93ae9c797ba8f3b40eff893ebe)
(address . bug-guix@gnu.org)
573DD91E.5080702@fastmail.net
SKIP: tests/base32.scmPASS: tests/base64.scmPASS: tests/cpio.scmPASS: tests/hash.scmPASS: tests/pk-crypto.scmPASS: tests/pki.scmPASS: tests/sets.scmPASS: tests/gnu-maintenance.scmPASS: tests/substitute.scmPASS: tests/builders.scmPASS: tests/derivations.scmPASS: tests/grafts.scmPASS: tests/ui.scmPASS: tests/records.scmPASS: tests/upstream.scmPASS: tests/combinators.scmPASS: tests/utils.scmPASS: tests/build-utils.scmPASS: tests/packages.scmSKIP: tests/snix.scmPASS: tests/hackage.scmPASS: tests/cran.scmPASS: tests/elpa.scmPASS: tests/store.scmPASS: tests/monads.scmPASS: tests/gexp.scmPASS: tests/nar.scmPASS: tests/union.scmPASS: tests/profiles.scmPASS: tests/syscalls.scmSKIP: tests/gremlin.scmPASS: tests/lint.scmPASS: tests/publish.scmPASS: tests/scripts.scmPASS: tests/size.scmPASS: tests/graph.scmPASS: tests/challenge.scmPASS: tests/cve.scmPASS: tests/file-systems.scmPASS: tests/system.scmPASS: tests/services.scmPASS: tests/scripts-build.scmPASS: tests/containers.scmPASS: tests/import-utils.scmPASS: tests/pypi.scmPASS: tests/cpan.scmPASS: tests/gem.scmPASS: tests/guix-build.shPASS: tests/guix-download.shPASS: tests/guix-hash.shPASS: tests/guix-package.shPASS: tests/guix-package-net.shPASS: tests/guix-system.shPASS: tests/guix-archive.shPASS: tests/guix-authenticate.shPASS: tests/guix-environment.shFAIL: tests/guix-environment-container.shPASS: tests/guix-graph.shPASS: tests/guix-lint.shPASS: tests/guix-register.shPASS: tests/guix-gc.shPASS: tests/guix-daemon.sh============================================================================Testsuite summary for GNU Guix 0.10.0============================================================================# TOTAL: 565# PASS: 561# SKIP: 3# XFAIL: 0# FAIL: 1# XPASS: 0# ERROR: 0============================================================================See ./test-suite.logPlease report to bug-guix@gnu.org============================================================================
======================================= GNU Guix 0.10.0: ./test-suite.log=======================================
# TOTAL: 565# PASS: 561# SKIP: 3# XFAIL: 0# FAIL: 1# XPASS: 0# ERROR: 0
.. contents:: :depth: 2
SKIP: tests/base32==================
sh: nix-hash: command not foundtest-name: bytevector->base32-stringlocation: /home/hinsen/Development/guix/tests/base32.scm:48source:+ (test-assert+ "bytevector->base32-string"+ (fold (lambda (bv expected result)+ (and result+ (string=?+ (bytevector->base32-string bv)+ expected)))+ #t+ (map string->utf8+ '("" "f" "fo" "foo" "foob" "fooba" "foobar"))+ '(""+ "my"+ "mzxq"+ "mzxw6"+ "mzxw6yq"+ "mzxw6ytb"+ "mzxw6ytboi")))actual-value: #tresult: PASS
test-name: base32-string->bytevectorlocation: /home/hinsen/Development/guix/tests/base32.scm:65source:+ (test-assert+ "base32-string->bytevector"+ (every (lambda (bv)+ (equal?+ (base32-string->bytevector+ (bytevector->base32-string bv))+ bv))+ (map string->utf8+ '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))actual-value: #tresult: PASS
test-name: nix-base32-string->bytevectorlocation: /home/hinsen/Development/guix/tests/base32.scm:73source:+ (test-assert+ "nix-base32-string->bytevector"+ (every (lambda (bv)+ (equal?+ (nix-base32-string->bytevector+ (bytevector->nix-base32-string bv))+ bv))+ (map string->utf8+ '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))actual-value: #tresult: PASS
test-name: &invalid-base32-characterlocation: /home/hinsen/Development/guix/tests/base32.scm:81source:+ (test-equal+ "&invalid-base32-character"+ #\e+ (guard (c ((invalid-base32-character? c)+ (invalid-base32-character-value c)))+ (nix-base32-string->bytevector+ (string-append (make-string 51 #\a) "e"))))expected-value: eactual-value: eresult: PASS
test-name: sha256 & bytevector->nix-base32-stringlocation: /home/hinsen/Development/guix/tests/base32.scm:92source:+ (test-assert+ "sha256 & bytevector->nix-base32-string"+ (let ((file (search-path %load-path "tests/test.drv")))+ (equal?+ (bytevector->nix-base32-string+ (sha256+ (call-with-input-file file get-bytevector-all)))+ (let* ((c (format+ #f+ "~a --type sha256 --base32 --flat \"~a\""+ %nix-hash+ file))+ (p (open-input-pipe c))+ (l (read-line p)))+ (close-pipe p)+ l))))result: SKIP

SKIP: tests/snix================
test-name: factorize-urilocation: /home/hinsen/Development/guix/tests/snix.scm:36source:+ (test-assert+ "factorize-uri"+ (every?+ (match-lambda+ ((uri version '-> expected)+ (equal? (factorize-uri uri version) expected)))+ '(("http://example.com/foo.tgz"+ "1.0"+ ->+ "http://example.com/foo.tgz")+ ("http://example.com/foo-2.8.tgz"+ "2.8"+ ->+ ("http://example.com/foo-"version ".tgz"))+ ("http://example.com/2.8/foo-2.8.tgz"+ "2.8"+ ->+ ("http://example.com/"+ version+ "/foo-"+ version+ ".tgz")))))actual-value: #tresult: PASS
test-name: nixpkgs->guix-packagelocation: /home/hinsen/Development/guix/tests/snix.scm:54source:+ (test-assert+ "nixpkgs->guix-package"+ (match (nixpkgs->guix-package+ %nixpkgs-directory+ "guile")+ (('package+ ('name "guile")+ ('version (? string?))+ ('source ('origin _ ...))+ ('build-system _)+ ('inputs ('quasiquote (inputs ...)))+ ('propagated-inputs ('quasiquote (pinputs ...)))+ ('home-page (? string?))+ ('synopsis (? string?))+ ('description (? string?))+ ('license (? symbol?)))+ (and (member '("libffi" ,libffi) inputs)+ (member '("gmp" ,gmp) pinputs)+ #t))+ (x (pk 'fail x #f))))result: SKIP

SKIP: tests/gremlin===================
test-name: elf-dynamic-info-needed, executablelocation: /home/hinsen/Development/guix/tests/gremlin.scm:44source:+ (test-assert+ "elf-dynamic-info-needed, executable"+ (let* ((elf (call-with-input-file %guile-executable read-elf))+ (dyninfo (elf-dynamic-info elf)))+ (or (not dyninfo)+ (lset<=+ string=?+ (list (string-append "libguile-" (effective-version))+ "libgc"+ "libunistring"+ "libffi")+ (map (lambda (lib)+ (string-take lib (string-contains lib ".so")))+ (elf-dynamic-info-needed dyninfo))))))result: SKIP
test-name: expand-originlocation: /home/hinsen/Development/guix/tests/gremlin.scm:55source:+ (test-equal+ "expand-origin"+ '("OOO/../lib"+ "OOO"+ "../OOO/bar/OOO/baz"+ "ORIGIN/foo")+ (map (cut expand-origin <> "OOO")+ '("$ORIGIN/../lib"+ "${ORIGIN}"+ "../${ORIGIN}/bar/$ORIGIN/baz"+ "ORIGIN/foo")))expected-value: (OOO/../lib OOO ../OOO/bar/OOO/baz ORIGIN/foo)actual-value: (OOO/../lib OOO ../OOO/bar/OOO/baz ORIGIN/foo)result: PASS

FAIL: tests/guix-environment-container======================================
+ set -e+ guix environment --versionguix environment (GNU Guix) 0.10.0Copyright (C) 2016 the Guix authorsLicense GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.htmlThis is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.+ guile -c '((@@ (guix scripts environment) assert-container-features))'+ tmpdir=t-guix-environment-20990+ trap 'rm -r "$tmpdir"' EXIT+ mkdir t-guix-environment-20990+ guix environment --container --ad-hoc --bootstrap guile-bootstrap -- guile -c '(exit 42)'accepted connection from pid 21005, user hinsen+ test 1 = 42+ rm -r t-guix-environment-20990FAIL tests/guix-environment-container.sh (exit status: 1)
L
L
Ludovic Courtès wrote on 20 May 2016 14:12
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)
87lh35exmv.fsf@gnu.org
Hi Konrad,
Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:
Toggle quote (20 lines)> FAIL: tests/guix-environment-container> ======================================>> + set -e> + guix environment --version> guix environment (GNU Guix) 0.10.0> Copyright (C) 2016 the Guix authors> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>> This is free software: you are free to change and redistribute it.> There is NO WARRANTY, to the extent permitted by law.> + guile -c '((@@ (guix scripts environment) assert-container-features))'> + tmpdir=t-guix-environment-20990> + trap 'rm -r "$tmpdir"' EXIT> + mkdir t-guix-environment-20990> + guix environment --container --ad-hoc --bootstrap guile-bootstrap -- guile -c '(exit 42)'> accepted connection from pid 21005, user hinsen> + test 1 = 42> + rm -r t-guix-environment-20990> FAIL tests/guix-environment-container.sh (exit status: 1)
Could you show the output of “uname -srvo” on this machine? Whatdistribution does it run?
Also, from the top-level build directory, could you run:
./pre-inst-env strace -f -s 234 -o log \ guix environment --container --ad-hoc --bootstrap guile-bootstrap \ -- guile -c '(exit 42)'
and send the ‘log’ file (gzipped)?
Thanks for your report!
Ludo’.
K
K
Konrad Hinsen wrote on 20 May 2016 20:42
(name . Ludovic Courtès)(address . ludo@gnu.org)
573F5A7D.4020008@fastmail.net
Hi Ludovic,
> Could you show the output of “uname -srvo” on this machine? What
Toggle quote (2 lines)> distribution does it run?
$ uname -srvoLinux 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 GNU/Linux
The base system is Ubuntu 16.04, to which I added the Guix binary distribution 0.10.
Toggle quote (6 lines)> Also, from the top-level build directory, could you run:>> ./pre-inst-env strace -f -s 234 -o log \> guix environment --container --ad-hoc --bootstrap guile-bootstrap \> -- guile -c '(exit 42)'
$ guix environment guix
[dev] $ ./pre-inst-env strace -f -s 234 -o log guix environment --container --ad-hoc --bootstrap guile-bootstrap -- guile -c '(exit 42)'guix environment: error: failed to connect to `/usr/local/var/guix/daemon-socket/socket': No such file or directory
The log file is attached, but I somehow suspect that the above error message already suggests what's going on - but not to me!
Konrad.
Attachment: log.gz
L
L
Leo Famulari wrote on 21 May 2016 00:48
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)
20160520224810.GA4494@jasmine
On Fri, May 20, 2016 at 08:42:05PM +0200, Konrad Hinsen wrote:
Toggle quote (3 lines)> $ uname -srvo> Linux 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 GNU/Linux
I'd guess that Ubuntu, like Debian, by default disables the unprivilegedcreation of containers.
What is the value of '/proc/sys/kernel/unprivileged_userns_clone'?
Toggle quote (5 lines)> [dev] $ ./pre-inst-env strace -f -s 234 -o log guix environment --container> --ad-hoc --bootstrap guile-bootstrap -- guile -c '(exit 42)'> guix environment: error: failed to connect to> `/usr/local/var/guix/daemon-socket/socket': No such file or directory
I think this is unrelated.
If you followed the instructions in the manual while installing Guix[0], then your daemon's socket should be in /var/guix. When buildingGuix from the Git checkout, did you set the value of localstatedir likethis when configuring?
$ ./configure --localstatedir=/var
If not, it defaults to '/usr/local'. If that's what happened, can youreconfigure as shown above, and try Ludo's command again?
[0]https://www.gnu.org/software/guix/manual/html_node/Binary-Installation.html#Binary-Installation
K
K
Konrad Hinsen wrote on 21 May 2016 09:21
(name . Leo Famulari)(address . leo@famulari.name)
57400C83.8010208@fastmail.net
Hi Leo,
> I'd guess that Ubuntu, like Debian, by default disables the unprivileged
Toggle quote (4 lines)> creation of containers.>> What is the value of '/proc/sys/kernel/unprivileged_userns_clone'?
$ cat /proc/sys/kernel/unprivileged_userns_clone1
Toggle quote (7 lines)> If you followed the instructions in the manual while installing Guix> [0], then your daemon's socket should be in /var/guix. When building> Guix from the Git checkout, did you set the value of localstatedir like> this when configuring?>> $ ./configure --localstatedir=/var
No. I just followed the instructions under "contributing" blindly.
Toggle quote (3 lines)> If not, it defaults to '/usr/local'. If that's what happened, can you> reconfigure as shown above, and try Ludo's command again?
I did:
$ ./configure --localstatedir=/var$ make check
The environment test case still fails. Then again
[dev]$ ./pre-inst-env strace -f -s 234 -o log guix environment --container --ad-hoc --bootstrap guile-bootstrap -- guile -c '(exit 42)'substitute: warning: failed to install locale: Invalid argumentsubstitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0%substitute: updating list of substitutes from 'https://hydra.gnu.org'... 100.0%The following derivations will be built: /gnu/store/n1mv18v7dvjx3zz6xwryqw6mvfjj68ls-profile.drv /gnu/store/90b3v64bp7rjpsd841bxflh7a2h544f9-module-import.drv /gnu/store/sc9w2yza3af4p0vjgkkwf7jmdh1m05n6-module-import-compiled.drvThe following file will be downloaded: /gnu/store/aiz8db2gni401wc9fgidmcggxyb1czis-guile-bootstrap-2.0warning: failed to install locale: Invalid argument
Found valid signature for /gnu/store/aiz8db2gni401wc9fgidmcggxyb1czis-guile-bootstrap-2.0 From https://mirror.hydra.gnu.org/nar/aiz8db2gni401wc9fgidmcggxyb1czis-guile-bootstrap-2.0Downloading aiz8db...-guile-bootstrap-2.0 (12.1MiB installed)... https://mirror.hydra.gnu.org/nar/aiz8db2gni401wc9fgidmcggxyb1czis-guile-bootstrap-2.01.1MiB/s 00:03 | 3.4MiB transferred

No error message this time. The log is attached.
Konrad.
Attachment: log.gz
B
B
Ben Woodcroft wrote on 21 May 2016 12:37
57403A7D.3090002@uq.edu.au
On 21/05/16 17:21, Konrad Hinsen wrote:
Toggle quote (2 lines)> No error message this time. The log is attached.
From teh log: > 10526 mkdir("/tmp/guix-directory.2EiFxS/dev/mqueue", 0775) = 0 > 10526 mount("mqueue", "/tmp/guix-directory.2EiFxS//dev/mqueue", "mqueue", MS_NOSUID|MS_NODEV|MS_NOEXEC, NULL) = -1 EBUSY (Device or resource busy)
This then might be the same issue as discussed previouslyhttp://lists.gnu.org/archive/html/help-guix/2016-05/msg00006.html
I managed to reproduce this using a binary download too on a different machine, I suspect that there is something Ubuntu/Xenial-specific at play.ben
L
L
Leo Famulari wrote on 21 May 2016 17:19
(name . Ben Woodcroft)(address . b.woodcroft@uq.edu.au)
20160521151910.GA25589@jasmine
On Sat, May 21, 2016 at 08:37:49PM +1000, Ben Woodcroft wrote:
Toggle quote (11 lines)> On 21/05/16 17:21, Konrad Hinsen wrote:> > No error message this time. The log is attached.> > From teh log:> > 10526 mkdir("/tmp/guix-directory.2EiFxS/dev/mqueue", 0775) = 0> > 10526 mount("mqueue", "/tmp/guix-directory.2EiFxS//dev/mqueue", "mqueue",> MS_NOSUID|MS_NODEV|MS_NOEXEC, NULL) = -1 EBUSY (Device or resource busy)> > This then might be the same issue as discussed previously> http://lists.gnu.org/archive/html/help-guix/2016-05/msg00006.html
A quick scan through the mqueue man pages suggests mq_notify(3):
"mq_notify - register for notification when a message is available
[...]
EBUSY Another process has already registered to receivenotification for this message queue."
L
L
Ludovic Courtès wrote on 21 May 2016 20:25
retitle
(address . request@debbugs.gnu.org)
87zirjtgio.fsf@gnu.org
retitle 23582 'call-with-container' fails to mount /dev/mqueue with EBUSY (on Ubuntu)thanks
?
Your comment

Commenting via the web interface is currently disabled.

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