mount-points test failure within build environment in linux-libre-3.19.3

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Mark H Weaver
Owner
unassigned
Submitted by
Mark H Weaver
Severity
normal
M
M
Mark H Weaver wrote on 5 Apr 2015 08:12
(mount-points) returns bogus values within the build environment
(address . bug-guix@gnu.org)
87lhi73xzb.fsf@netris.org
Within the guix-daemon build environment, tests/syscalls.scm
consistently fails on my i686 Libreboot X60 running linux-libre-3.19.3.
Outside of the build environment the test passes.

Here's the relevant except from syscalls.log:

Toggle snippet (10 lines)
Test begin:
test-name: "mount-points"
source-file: "tests/syscalls.scm"
source-line: 47
source-form: (test-assert "mount-points" (member "/" (mount-points)))
Test end:
result-kind: fail
actual-value: #f

I built a simple derivation to print the result of (mount-points) within
the build environment:

Toggle snippet (35 lines)
mhw@jojen:~/guix$ ./pre-inst-env guile
GNU Guile 2.0.11
Copyright (C) 1995-2014 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (guix packages) (guix derivations) (guix store) (gnu packages commencement))
scheme@(guile-user)> (define store (open-connection))
scheme@(guile-user)> (build-expression->derivation
store "test"
'(begin (use-modules (guix build syscalls))
(format #t "Mount points: ~S\n" (mount-points)))
#:modules '((guix build syscalls))
#:guile-for-build (package-derivation store guile-final "i686-linux" #:graft? #f)
#:local-build? #t)

$1 = #<derivation /gnu/store/l7386hy58ffnj5pcvm621x6myml00bkj-test.drv => /gnu/store/8kya2xpgn89crq5cfrmj7952yhfhr4dv-test a2420f0>
scheme@(guile-user)> (build-derivations store (list $1))
building path(s) `/gnu/store/8kya2xpgn89crq5cfrmj7952yhfhr4dv-test'
Mount points: ("/dev/full" "/dev/kvm" "/dev/null" "/dev/random" "/dev/tty" "/dev/urandom" "/dev/zero" "/gnu/store/0ya00x8w06c1ph11lj5xwhiygy4b2lxd-gmp-6.0.0a" "/gnu/store/1d0s2rhqzrjqyb27n0b6w84knj8y51xq-libatomic-ops-7.4.2" "/gnu/store/269nlkyj5cqm7s4yfw3msc5sgj9is5qs-libunistring-0.9.5" "/gnu/store/3195f0cppgglxr91ir631f4bnvpqk9z0-bash-4.3.33" "/gnu/store/3xil4ahvng7iqvcbprp40glbvmjd843p-readline-6.3" "/gnu/store/5p57p4vznrf5j8wxpikwsdvxi4niv1dl-ncurses-5.9" "/gnu/store/7br8pxkz6jgkpjldr6hjzbxhzgsp1hx1-module-import-compiled" "/gnu/store/8lzvbsabc85pwfcszpav91flrl1lnc37-gcc-4.8.4-lib" "/gnu/store/bna6pmd8llg7g63is95rrkf8cfb8ly0q-ncurses-5.9" "/gnu/store/jzw8d98hrmjqgx9lfwmmnsgahqhcsbbr-pkg-config-0.28" "/gnu/store/lfh6q5ascp8b3545j9vr7ckbqi1al741-readline-6.3" "/gnu/store/mlmxnahghpvnj9wmhmqbi14fq408vjxx-module-import" "/gnu/store/nkv48yr5rhwdwgwv78gnap05nysq9wkn-libgc-7.4.2" "/gnu/store/vd8ij01bq08icp87bz5gs2v4bq53bls6-glibc-2.21" "/gnu/store/wd3wpzzl3z8bygkvjf4ka7486afbj0z3-libltdl-2.4.6" "/gnu/store/y2m6nf3w605k951fzmyanibzm3fd0caa-libffi-3.1" "/gnu/store/y5x64mcyzxjkjlq5la547lhd13b531mk-guile-2.0.11" "/tmp/nix-build-test.drv-0" "/proc" "/dev/shm" "/dev/pts")
builder for `/gnu/store/l7386hy58ffnj5pcvm621x6myml00bkj-test.drv' failed to produce output path `/gnu/store/8kya2xpgn89crq5cfrmj7952yhfhr4dv-test'
guix/store.scm:621:0: In procedure build-things:
guix/store.scm:621:0: Throw to key `srfi-34' with args `(#<condition &nix-protocol-error [message: "build of `/gnu/store/l7386hy58ffnj5pcvm621x6myml00bkj-test.drv' failed" status: 100] a971d50>)'.

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,q
scheme@(guile-user)> (use-modules (guix build syscalls))
scheme@(guile-user)> (mount-points)
$2 = ("/proc" "/sys" "/" "/dev" "/home/mhw/Videos" "/dev/pts" "/dev/shm" "/sys/kernel/debug")
scheme@(guile-user)>

As you can see, "/" is listed as a mount point outside of the build
environment, but not inside.

Mark
M
M
Mark H Weaver wrote on 5 Apr 2015 08:26
(address . 20261@debbugs.gnu.org)
87384fum3p.fsf@netris.org
retitle 20261 mount-points test failure within build environment in linux-libre-3.19.3
thanks

Mark H Weaver <mhw@netris.org> writes:

Toggle quote (55 lines)
> Within the guix-daemon build environment, tests/syscalls.scm
> consistently fails on my i686 Libreboot X60 running linux-libre-3.19.3.
> Outside of the build environment the test passes.
>
> Here's the relevant except from syscalls.log:
>
> Test begin:
> test-name: "mount-points"
> source-file: "tests/syscalls.scm"
> source-line: 47
> source-form: (test-assert "mount-points" (member "/" (mount-points)))
> Test end:
> result-kind: fail
> actual-value: #f
>
> I built a simple derivation to print the result of (mount-points) within
> the build environment:
>
> mhw@jojen:~/guix$ ./pre-inst-env guile
> GNU Guile 2.0.11
> Copyright (C) 1995-2014 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> (use-modules (guix packages) (guix derivations) (guix store) (gnu packages commencement))
> scheme@(guile-user)> (define store (open-connection))
> scheme@(guile-user)> (build-expression->derivation
> store "test"
> '(begin (use-modules (guix build syscalls))
> (format #t "Mount points: ~S\n" (mount-points)))
> #:modules '((guix build syscalls))
> #:guile-for-build (package-derivation store guile-final "i686-linux" #:graft? #f)
> #:local-build? #t)
>
> $1 = #<derivation /gnu/store/l7386hy58ffnj5pcvm621x6myml00bkj-test.drv => /gnu/store/8kya2xpgn89crq5cfrmj7952yhfhr4dv-test a2420f0>
> scheme@(guile-user)> (build-derivations store (list $1))
> building path(s) `/gnu/store/8kya2xpgn89crq5cfrmj7952yhfhr4dv-test'
> Mount points: ("/dev/full" "/dev/kvm" "/dev/null" "/dev/random" "/dev/tty" "/dev/urandom" "/dev/zero" "/gnu/store/0ya00x8w06c1ph11lj5xwhiygy4b2lxd-gmp-6.0.0a" "/gnu/store/1d0s2rhqzrjqyb27n0b6w84knj8y51xq-libatomic-ops-7.4.2" "/gnu/store/269nlkyj5cqm7s4yfw3msc5sgj9is5qs-libunistring-0.9.5" "/gnu/store/3195f0cppgglxr91ir631f4bnvpqk9z0-bash-4.3.33" "/gnu/store/3xil4ahvng7iqvcbprp40glbvmjd843p-readline-6.3" "/gnu/store/5p57p4vznrf5j8wxpikwsdvxi4niv1dl-ncurses-5.9" "/gnu/store/7br8pxkz6jgkpjldr6hjzbxhzgsp1hx1-module-import-compiled" "/gnu/store/8lzvbsabc85pwfcszpav91flrl1lnc37-gcc-4.8.4-lib" "/gnu/store/bna6pmd8llg7g63is95rrkf8cfb8ly0q-ncurses-5.9" "/gnu/store/jzw8d98hrmjqgx9lfwmmnsgahqhcsbbr-pkg-config-0.28" "/gnu/store/lfh6q5ascp8b3545j9vr7ckbqi1al741-readline-6.3" "/gnu/store/mlmxnahghpvnj9wmhmqbi14fq408vjxx-module-import" "/gnu/store/nkv48yr5rhwdwgwv78gnap05nysq9wkn-libgc-7.4.2" "/gnu/store/vd8ij01bq08icp87bz5gs2v4bq53bls6-glibc-2.21" "/gnu/store/wd3wpzzl3z8bygkvjf4ka7486afbj0z3-libltdl-2.4.6" "/gnu/store/y2m6nf3w605k951fzmyanibzm3fd0caa-libffi-3.1" "/gnu/store/y5x64mcyzxjkjlq5la547lhd13b531mk-guile-2.0.11" "/tmp/nix-build-test.drv-0" "/proc" "/dev/shm" "/dev/pts")
> builder for `/gnu/store/l7386hy58ffnj5pcvm621x6myml00bkj-test.drv' failed to produce output path `/gnu/store/8kya2xpgn89crq5cfrmj7952yhfhr4dv-test'
> guix/store.scm:621:0: In procedure build-things:
> guix/store.scm:621:0: Throw to key `srfi-34' with args `(#<condition &nix-protocol-error [message: "build of `/gnu/store/l7386hy58ffnj5pcvm621x6myml00bkj-test.drv' failed" status: 100] a971d50>)'.
>
> Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile-user) [1]> ,q
> scheme@(guile-user)> (use-modules (guix build syscalls))
> scheme@(guile-user)> (mount-points)
> $2 = ("/proc" "/sys" "/" "/dev" "/home/mhw/Videos" "/dev/pts" "/dev/shm" "/sys/kernel/debug")
> scheme@(guile-user)>
>
> As you can see, "/" is listed as a mount point outside of the build
> environment, but not inside.

The test above was done when running linux-libre-3.19.3. I rebooted
into an older system with linux-libre-3.18.10 and performed the same
test, and this time "/" is listed among the mount points (twice even):

Toggle snippet (34 lines)
mhw@jojen:~/guix$ ./pre-inst-env guile
GNU Guile 2.0.11
Copyright (C) 1995-2014 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (guix packages) (guix derivations) (guix store) (gnu packages commencement))
scheme@(guile-user)> (define store (open-connection))
scheme@(guile-user)> (build-expression->derivation
store "test"
'(begin (use-modules (guix build syscalls))
(format #t "Mount points: ~S\n" (mount-points)))
#:modules '((guix build syscalls))
#:guile-for-build (package-derivation store guile-final "i686-linux" #:graft? #f)
#:local-build? #t)
$1 = #<derivation /gnu/store/l7386hy58ffnj5pcvm621x6myml00bkj-test.drv => /gnu/store/8kya2xpgn89crq5cfrmj7952yhfhr4dv-test 9b5c410>
scheme@(guile-user)> (build-derivations store (list $1))
building path(s) `/gnu/store/8kya2xpgn89crq5cfrmj7952yhfhr4dv-test'
Mount points: ("/" "/" "/dev" "/dev/pts" "/dev/shm" "/proc" "/sys" "/sys/kernel/debug" "/home/mhw/Videos" "/dev/full" "/dev/kvm" "/dev/null" "/dev/random" "/dev/tty" "/dev/urandom" "/dev/zero" "/gnu/store/0ya00x8w06c1ph11lj5xwhiygy4b2lxd-gmp-6.0.0a" "/gnu/store/1d0s2rhqzrjqyb27n0b6w84knj8y51xq-libatomic-ops-7.4.2" "/gnu/store/269nlkyj5cqm7s4yfw3msc5sgj9is5qs-libunistring-0.9.5" "/gnu/store/3195f0cppgglxr91ir631f4bnvpqk9z0-bash-4.3.33" "/gnu/store/3xil4ahvng7iqvcbprp40glbvmjd843p-readline-6.3" "/gnu/store/5p57p4vznrf5j8wxpikwsdvxi4niv1dl-ncurses-5.9" "/gnu/store/7br8pxkz6jgkpjldr6hjzbxhzgsp1hx1-module-import-compiled" "/gnu/store/8lzvbsabc85pwfcszpav91flrl1lnc37-gcc-4.8.4-lib" "/gnu/store/bna6pmd8llg7g63is95rrkf8cfb8ly0q-ncurses-5.9" "/gnu/store/jzw8d98hrmjqgx9lfwmmnsgahqhcsbbr-pkg-config-0.28" "/gnu/store/lfh6q5ascp8b3545j9vr7ckbqi1al741-readline-6.3" "/gnu/store/mlmxnahghpvnj9wmhmqbi14fq408vjxx-module-import" "/gnu/store/nkv48yr5rhwdwgwv78gnap05nysq9wkn-libgc-7.4.2" "/gnu/store/vd8ij01bq08icp87bz5gs2v4bq53bls6-glibc-2.21" "/gnu/store/wd3wpzzl3z8bygkvjf4ka7486afbj0z3-libltdl-2.4.6" "/gnu/store/y2m6nf3w605k951fzmyanibzm3fd0caa-libffi-3.1" "/gnu/store/y5x64mcyzxjkjlq5la547lhd13b531mk-guile-2.0.11" "/tmp/nix-build-test.drv-0" "/proc" "/dev/shm" "/dev/pts")
builder for `/gnu/store/l7386hy58ffnj5pcvm621x6myml00bkj-test.drv' failed to produce output path `/gnu/store/8kya2xpgn89crq5cfrmj7952yhfhr4dv-test'
guix/store.scm:621:0: In procedure build-things:
guix/store.scm:621:0: Throw to key `srfi-34' with args `(#<condition &nix-protocol-error [message: "build of `/gnu/store/l7386hy58ffnj5pcvm621x6myml00bkj-test.drv' failed" status: 100] a28a0a8>)'.

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,q
scheme@(guile-user)> (use-modules (guix build syscalls))
scheme@(guile-user)> (mount-points)
$2 = ("/" "/proc" "/sys" "/" "/dev" "/home/mhw/Videos" "/dev/pts" "/dev/shm" "/sys/kernel/debug")
scheme@(guile-user)>

So, clearly there has been a change (regression?) in linux-libre-3.19
that is causing this test to fail.

For now, might I suggest checking for the existence of "/proc" instead?

Mark
M
M
Mark H Weaver wrote on 6 Apr 2015 00:37
(address . 20261@debbugs.gnu.org)
878ue642y9.fsf@netris.org
Andy Wingo reported running into the same problem on Linux-4.0-rc6.

Mark
L
L
Ludovic Courtès wrote on 6 Apr 2015 21:56
(name . Mark H Weaver)(address . mhw@netris.org)(address . 20261-done@debbugs.gnu.org)
87h9st81yt.fsf@gnu.org
Fixed in 381ac93, thanks!

Ludo’.
Closed
?