unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gábor Boskovits" <boskovits@gmail.com>
To: t_w_@freenet.de
Cc: Guix-devel <guix-devel@gnu.org>, help-guix <help-guix@gnu.org>
Subject: Re: Half a success with chroot
Date: Mon, 12 Mar 2018 23:29:06 +0100	[thread overview]
Message-ID: <CAE4v=pjwGpyN+XJwwOTtnUHVQKDj2d4gJkzXdoDpc1R7omB3pw@mail.gmail.com> (raw)
In-Reply-To: <80adf28a-7058-987a-b934-8e52fa26b68d@freenet.de>

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

2018-03-12 22:10 GMT+01:00 Thorsten Wilms <t_w_@freenet.de>:

> On 12.03.2018 20:17, Gábor Boskovits wrote:
>
> Hello! It would be nice to know the error code returned by the pivot_root
>> syscall. It might point to the reason of the failure.
>> Most probably you can get that using strace. Stracing the daemon is
>> possible using strace -fp pid_of_daemon.
>>
>
> Result of `strace -fp 3364 &> strace_guix-daemon.txt &` attached.
>
> grep -b4 -a4 pivot strace_guix-daemon.txt
> 5208309-[pid  3421] mount("none", "/gnu/store/4vgn265kihmk1aayy3
> rg5h4z00dvlfmy-emacs-bash-completion-2.0.0.drv.chroot/dev/shm", "tmpfs",
> 0, NULL) = 0
> 5208451-[pid  3421] lstat("/dev/pts/ptmx", 0x7fff0a3217a0) = -1 ENOENT (No
> such file or directory)
> 5208542-[pid  3421] chdir("/gnu/store/4vgn265kihmk
> 1aayy3rg5h4z00dvlfmy-emacs-bash-completion-2.0.0.drv.chroot") = 0
> 5208650-[pid  3421] mkdir("real-root", 000)     = 0
> 5208694:[pid  3421] pivot_root(".", "real-root") = -1 EINVAL (Invalid
> argument)
> 5208766-[pid  3421] write(2, "while setting up the build envir"..., 190) =
> 190
> 5208837-[pid  3411] <... read resumed> "w", 1)  = 1
> 5208881-[pid  3421] exit_group(1 <unfinished ...>
> 5208923-[pid  3411] read(15,  <unfinished ...>
>
>
> Context:
> ---
> root@charly # guix-daemon --build-users-group=guixbuild &
> [1] 3364
> root@charly /# strace -fp 3364 &> strace_guix-daemon.txt &
> [2] 3395
> root@charly /# su thorwil
> thorwil@charly /$ source /etc/profile
> thorwil@charly /$ guix package -i emacs-bash-completion
> guile: warning: failed to install locale
> warning: failed to install locale: Invalid argument
> accepted connection from pid 3407, user thorwil
> spurious SIGPOLL
> The following package will be installed:
>    emacs-bash-completion        2.0.0 /gnu/store/7irxjifw4m8sj0if2nj
> 0r26vf0n0imsj-emacs-bash-completion-2.0.0
>
> substitute: guile: warning: failed to install locale
> substitute: warning: failed to install locale: Invalid argument
> substitute: updating list of substitutes from '
> https://mirror.hydra.gnu.org'... 100.0%
> The following derivations will be built:
>    /gnu/store/gdihnrv0zykypajy7p94k9qzpmgqbkvz-profile.drv
>    /gnu/store/xlyyh54y77nm8gzm81rckkcvzaihn7dh-fonts-dir.drv
>    /gnu/store/pm80lbbbx2xhvnfb838zn90bwwcw2818-xdg-desktop-database.drv
>    /gnu/store/nkcspwxnd7hmf144krxzv1clq4gch6ms-ca-certificate-bundle.drv
>    /gnu/store/n72ahz242h07dz32g2fkpr308a6cwdb6-xdg-mime-database.drv
>    /gnu/store/fw9k5rg7p6czcp4bnnqkr57gv1qcyg78-gtk-im-modules.drv
>    /gnu/store/856smz8kn9l2gq2b6qcykv6aa06c3qv7-info-dir.drv
>    /gnu/store/1bybb1dnry03qwkr2d2888xi2z0hb6y7-gtk-icon-themes.drv
>
> /gnu/store/4vgn265kihmk1aayy3rg5h4z00dvlfmy-emacs-bash-
> completion-2.0.0.drv
>    /gnu/store/gwlj87yvqfsrv6lzcphfm65ndwpar0df-manual-database.drv
> guix package: error: build failed: while setting up the build environment:
> cannot pivot old root directory onto '/gnu/store/4vgn265kihmk1aayy3
> rg5h4z00dvlfmy-emacs-bash-completion-2.0.0.drv.chroot/real-root': Invalid
> argument
> ---
>
>
>
Could you please check, if the solution mentioned here works for you:
https://bugzilla.redhat.com/show_bug.cgi?id=1361043

A short summary: Similar error can be caused by shared mounts.

This way you can check if this applies.

Note 'shared' in the output:

grep -iP '/ /\s' /proc/$$/mountinfo
...
25 0 252:1 / / rw,relatime shared:1 - ext4 /dev/mapper/my--vg-root
rw,errors=remount-ro,data=ordered
...

This is usual in systemd systems, and Ubuntu is one of them.

Calling unshare -m within the process context helps this.

I'm forwarding this also to devel, so that we can discuss, if doing this is
advisable in
general. WDYT?


>
> --
> Thorsten Wilms
>
> thorwil's design for free software:
> http://thorwil.wordpress.com/
>

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

       reply	other threads:[~2018-03-12 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <acf6e2e4-91ee-a580-8723-9057ad636200@freenet.de>
     [not found] ` <CAE4v=pjULSxMdTn=XQWZ+-5cDTpiGzO-yiExMBhQ_nbg-YSdHQ@mail.gmail.com>
     [not found]   ` <80adf28a-7058-987a-b934-8e52fa26b68d@freenet.de>
2018-03-12 22:29     ` Gábor Boskovits [this message]
2018-03-13 10:16       ` Half a success with chroot Thorsten Wilms

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE4v=pjwGpyN+XJwwOTtnUHVQKDj2d4gJkzXdoDpc1R7omB3pw@mail.gmail.com' \
    --to=boskovits@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=help-guix@gnu.org \
    --cc=t_w_@freenet.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).