* guix shell: error: mount: Invalid argument @ 2022-11-19 11:15 bbb ee 2022-11-19 11:23 ` Tobias Geerinckx-Rice 0 siblings, 1 reply; 12+ messages in thread From: bbb ee @ 2022-11-19 11:15 UTC (permalink / raw) To: help-guix The example in the documentation( https://guix.gnu.org/en/manual/devel/en/html_node/Invoking-guix-shell.html#Invoking-guix-shell) for guix shell --share fails: ``` $ guix shell --container --expose=$HOME=/exchange guile -- guile guix shell: error: mount: mount "/home/dev_1" on "/tmp/guix-directory.X5HsZw//exchange": Invalid argument ``` I feel guix shell --container can only mount subdir in /tmp, and fail for all other dir: ``` # success in subdir of /tmp dev_1@dev_1 /tmp/test$ guix shell --container coreutils dev_1@dev_1 /tmp/test [env]$ exit # fail for all other dir dev_1@dev_1 ~$ guix shell --container coreutils guix shell: error: mount: mount "/home/dev_1" on "/tmp/guix-directory.63aHz8//home/dev_1": Invalid argument dev_1@dev_1 /mnt$ guix shell --container coreutils guix shell: error: mount: mount "/mnt" on "/tmp/guix-directory.Zu897m//mnt": Invalid argument ``` ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-19 11:15 guix shell: error: mount: Invalid argument bbb ee @ 2022-11-19 11:23 ` Tobias Geerinckx-Rice 2022-11-19 19:17 ` bbb ee 2022-11-20 0:29 ` Maxim Cournoyer 0 siblings, 2 replies; 12+ messages in thread From: Tobias Geerinckx-Rice @ 2022-11-19 11:23 UTC (permalink / raw) To: bbb ee; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 1977 bytes --] Hi bbb, bbb ee 写道: > I feel guix shell --container can only mount subdir in /tmp, and > fail for > all other dir: Your example for ‘all other dir’ just tests /home/dev_1 again, which looks extremely much like a mount point. So does /mnt. So no mystery there, but I do wonder what's *special* about these mountpoints compared to others. What is mounted at /home/dev_1 and (presumably) /mnt on your system? Anything mounted at /home? Anything mounted *below* /mnt/*? On my system: --8<---------------cut here---------------start------------->8--- ~ λ mountpoint /tmp /tmp is a mountpoint ~ λ guix shell -C --expose=/tmp=/test coreutils -- echo Elmo world Elmo world ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo world guix shell: error: mount: mount "/proc" on "/tmp/guix-directory.zTa1qb//test": Invalid argument --8<---------------cut here---------------end--------------->8--- Weird! Clearly, /proc is imbued with magical Kernel magick and simply canno— what? Oh: --8<---------------cut here---------------start------------->8--- ~ λ mount | grep /proc none on /proc type proc (rw,relatime) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime) --8<---------------cut here---------------end--------------->8--- Surely not… --8<---------------cut here---------------start------------->8--- ~ λ sudo umount /proc/sys/fs/binfmt_misc ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo world Elmo world --8<---------------cut here---------------end--------------->8--- …huh. So, ‘guix shell --container’ apparently takes issue with rbind'ing mounts, or something like that. Maybe that's something Guix can handle by bind-mounting the entire subtree itself, or maybe it's a hard permissions error enforced by the kernel. I don't know. Someone with podman/Docker/similar experience might. Kind regards, T G-R [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 247 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-19 11:23 ` Tobias Geerinckx-Rice @ 2022-11-19 19:17 ` bbb ee 2022-11-19 19:21 ` Tobias Geerinckx-Rice 2022-11-20 0:29 ` Maxim Cournoyer 1 sibling, 1 reply; 12+ messages in thread From: bbb ee @ 2022-11-19 19:17 UTC (permalink / raw) To: Tobias Geerinckx-Rice; +Cc: help-guix /tmp, /, $HOME are in same partition. But only subdir of /tmp are mountable: ``` dev_1@dev_1 /tmp/test2$ df . Filesystem 1K-blocks Used Available Use% Mounted on /dev/nvme0n1p7 209921236 180793652 19663932 91% / dev_1@dev_1 /tmp/test2$ guix shell --container coreutils -- echo Elmo Elmo dev_1@dev_1 /tmp/test2$ cd /tmp/ dev_1@dev_1 /tmp$ df . Filesystem 1K-blocks Used Available Use% Mounted on /dev/nvme0n1p7 209921236 180793720 19663864 91% / dev_1@dev_1 /tmp$ guix shell --container coreutils -- echo Elmo Elmo dev_1@dev_1 /tmp$ cd / dev_1@dev_1 /$ df . Filesystem 1K-blocks Used Available Use% Mounted on /dev/nvme0n1p7 209921236 180793808 19663776 91% / dev_1@dev_1 /$ guix shell --container coreutils -- echo Elmo guix shell: error: mount: mount "/" on "/tmp/guix-directory.fKcwvT//": Invalid argument dev_1@dev_1 /mnt/recoverData$ cd ~ dev_1@dev_1 ~$ df . Filesystem 1K-blocks Used Available Use% Mounted on /dev/nvme0n1p7 209921236 180793732 19663852 91% / dev_1@dev_1 ~$ guix shell --container coreutils -- echo Elmo guix shell: error: mount: mount "/home/dev_1" on "/tmp/guix-directory.LUuYdU//home/dev_1": Invalid argument ``` Other partition is also no mountable: ``` dev_1@dev_1 /mnt$ cd recoverData/ dev_1@dev_1 /mnt/recoverData$ df . Filesystem 1K-blocks Used Available Use% Mounted on /dev/nvme0n1p8 122503676 91394804 25287412 79% /mnt/recoverData dev_1@dev_1 /mnt/recoverData$ guix shell --container coreutils -- echo Elmo guix shell: error: mount: mount "/mnt/recoverData" on "/tmp/guix-directory.ut68VE//mnt/recoverData": Invalid argument ``` I don't think it is a partition issue. Le sam. 19 nov. 2022 à 12:47, Tobias Geerinckx-Rice <me@tobias.gr> a écrit : > Hi bbb, > > bbb ee 写道: > > I feel guix shell --container can only mount subdir in /tmp, and > > fail for > > all other dir: > > Your example for ‘all other dir’ just tests /home/dev_1 again, > which looks extremely much like a mount point. So does /mnt. So > no mystery there, but I do wonder what's *special* about these > mountpoints compared to others. > > What is mounted at /home/dev_1 and (presumably) /mnt on your > system? Anything mounted at /home? Anything mounted *below* > /mnt/*? > > On my system: > > --8<---------------cut here---------------start------------->8--- > ~ λ mountpoint /tmp > /tmp is a mountpoint > > ~ λ guix shell -C --expose=/tmp=/test coreutils -- echo Elmo world > Elmo world > > ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo > world > guix shell: error: mount: mount "/proc" on > "/tmp/guix-directory.zTa1qb//test": Invalid argument > --8<---------------cut here---------------end--------------->8--- > > Weird! Clearly, /proc is imbued with magical Kernel magick and > simply canno— what? Oh: > > --8<---------------cut here---------------start------------->8--- > ~ λ mount | grep /proc > none on /proc type proc (rw,relatime) > binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc > (rw,relatime) > --8<---------------cut here---------------end--------------->8--- > > Surely not… > > --8<---------------cut here---------------start------------->8--- > ~ λ sudo umount /proc/sys/fs/binfmt_misc > > ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo > world > Elmo world > --8<---------------cut here---------------end--------------->8--- > > …huh. > > So, ‘guix shell --container’ apparently takes issue with rbind'ing > mounts, or something like that. > > Maybe that's something Guix can handle by bind-mounting the entire > subtree itself, or maybe it's a hard permissions error enforced by > the kernel. I don't know. > > Someone with podman/Docker/similar experience might. > > Kind regards, > > T G-R > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-19 19:17 ` bbb ee @ 2022-11-19 19:21 ` Tobias Geerinckx-Rice 2022-11-19 19:27 ` bbb ee 0 siblings, 1 reply; 12+ messages in thread From: Tobias Geerinckx-Rice @ 2022-11-19 19:21 UTC (permalink / raw) To: bbb ee; +Cc: help-guix So /home/dev_1 (not $HOME; see error message) is not a mount point? OK, the name to me implied it was. Kind regards, T G-R Sent on the go. Excuse or enjoy my brevity. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-19 19:21 ` Tobias Geerinckx-Rice @ 2022-11-19 19:27 ` bbb ee 2022-11-19 19:46 ` Tobias Geerinckx-Rice 0 siblings, 1 reply; 12+ messages in thread From: bbb ee @ 2022-11-19 19:27 UTC (permalink / raw) To: Tobias Geerinckx-Rice; +Cc: help-guix > So /home/dev_1 (not $HOME; see error message) $HOME is /home/dev_1 in my system. Sorry, I have written $HOME, it is a little confusing, but it is same thing. No, my home dir isn't a mount point. Le sam. 19 nov. 2022 à 20:21, Tobias Geerinckx-Rice <me@tobias.gr> a écrit : > So /home/dev_1 (not $HOME; see error message) is not a mount point? OK, > the name to me implied it was. > > Kind regards, > > T G-R > > Sent on the go. Excuse or enjoy my brevity. > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-19 19:27 ` bbb ee @ 2022-11-19 19:46 ` Tobias Geerinckx-Rice 2022-11-19 20:18 ` bbb ee 2022-11-19 20:19 ` Tobias Geerinckx-Rice 0 siblings, 2 replies; 12+ messages in thread From: Tobias Geerinckx-Rice @ 2022-11-19 19:46 UTC (permalink / raw) To: bbb ee; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 812 bytes --] bbb ee 写道: >> So /home/dev_1 (not $HOME; see error message) No, I was confused as well, sorry. In the back of my mind was another user reporting they used some FUSE-based encryption of $HOME, and I thought you might be using that. This tainted my thinking. I have no other idea what could be happening. What I ‘reproduced’ in my previous mail is probably not what is happening to you, even if the error messages are the same. But it is definitely something related to your installation: > guix shell --container coreutils -- echo Elmo should, of course, always work. Does this system have ‘uncommon’ kernel restrictions in place, like SELinux or other hardening? Is there anything printed in dmesg when the container fails to start? Kind regards, T G-R [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 247 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-19 19:46 ` Tobias Geerinckx-Rice @ 2022-11-19 20:18 ` bbb ee 2022-11-19 20:19 ` Tobias Geerinckx-Rice 1 sibling, 0 replies; 12+ messages in thread From: bbb ee @ 2022-11-19 20:18 UTC (permalink / raw) To: Tobias Geerinckx-Rice; +Cc: help-guix > Does this system have ‘uncommon’ kernel restrictions in place, like SELinux or other hardening? No, I have never used this feature. > Is there anything printed in dmesg when the container fails to start? No changement in dmesg Le sam. 19 nov. 2022 à 20:50, Tobias Geerinckx-Rice <me@tobias.gr> a écrit : > bbb ee 写道: > >> So /home/dev_1 (not $HOME; see error message) > > No, I was confused as well, sorry. > > In the back of my mind was another user reporting they used some > FUSE-based encryption of $HOME, and I thought you might be using > that. This tainted my thinking. > > I have no other idea what could be happening. What I ‘reproduced’ > in my previous mail is probably not what is happening to you, even > if the error messages are the same. > > But it is definitely something related to your installation: > > > guix shell --container coreutils -- echo Elmo > > should, of course, always work. > > Does this system have ‘uncommon’ kernel restrictions in place, > like SELinux or other hardening? Is there anything printed in > dmesg when the container fails to start? > > Kind regards, > > T G-R > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-19 19:46 ` Tobias Geerinckx-Rice 2022-11-19 20:18 ` bbb ee @ 2022-11-19 20:19 ` Tobias Geerinckx-Rice 2022-11-19 20:20 ` bbb ee 1 sibling, 1 reply; 12+ messages in thread From: Tobias Geerinckx-Rice @ 2022-11-19 20:19 UTC (permalink / raw) Cc: bbb ee, help-guix [-- Attachment #1: Type: text/plain, Size: 288 bytes --] Tobias Geerinckx-Rice 写道: > Does this system have ‘uncommon’ kernel restrictions in place, > like > SELinux or other hardening? Is there anything printed in dmesg > when > the container fails to start? I forgot: which distribution is this? Kind regards, T G-R [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 247 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-19 20:19 ` Tobias Geerinckx-Rice @ 2022-11-19 20:20 ` bbb ee 0 siblings, 0 replies; 12+ messages in thread From: bbb ee @ 2022-11-19 20:20 UTC (permalink / raw) To: Tobias Geerinckx-Rice; +Cc: help-guix > I forgot: which distribution is this? I use GuixSD, and the kernel ``` $ uname -a Linux dev_1 5.18.18 #1 SMP PREEMPT_DYNAMIC 1 x86_64 GNU/Linux ``` Le sam. 19 nov. 2022 à 21:18, Tobias Geerinckx-Rice <me@tobias.gr> a écrit : > Tobias Geerinckx-Rice 写道: > > Does this system have ‘uncommon’ kernel restrictions in place, > > like > > SELinux or other hardening? Is there anything printed in dmesg > > when > > the container fails to start? > > I forgot: which distribution is this? > > Kind regards, > > T G-R > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-19 11:23 ` Tobias Geerinckx-Rice 2022-11-19 19:17 ` bbb ee @ 2022-11-20 0:29 ` Maxim Cournoyer 2022-11-20 9:32 ` bbb ee 1 sibling, 1 reply; 12+ messages in thread From: Maxim Cournoyer @ 2022-11-20 0:29 UTC (permalink / raw) To: Tobias Geerinckx-Rice; +Cc: bbb ee, help-guix Hi, Tobias Geerinckx-Rice <me@tobias.gr> writes: [...] > ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo > world > guix shell: error: mount: mount "/proc" on > "/tmp/guix-directory.zTa1qb//test": Invalid argument > > > Weird! Clearly, /proc is imbued with magical Kernel magick and > simply canno— what? Oh: > > ~ λ mount | grep /proc > none on /proc type proc (rw,relatime) > binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc > (rw,relatime) > > > Surely not… > > ~ λ sudo umount /proc/sys/fs/binfmt_misc > > ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo > world > Elmo world > > …huh. > > So, ‘guix shell --container’ apparently takes issue with rbind'ing > mounts, or something like that. > > Maybe that's something Guix can handle by bind-mounting the entire > subtree itself, or maybe it's a hard permissions error enforced by > the kernel. I don't know. > > Someone with podman/Docker/similar experience might. I'm not useful, but just want to point out that this looks a lot like https://issues.guix.gnu.org/46782 (guix environment --expose options cannot be layered onto $PWD). -- Thanks, Maxim ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-20 0:29 ` Maxim Cournoyer @ 2022-11-20 9:32 ` bbb ee 2022-11-21 22:45 ` bbb ee 0 siblings, 1 reply; 12+ messages in thread From: bbb ee @ 2022-11-20 9:32 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: Tobias Geerinckx-Rice, help-guix I have posted in the help mailing list, because I want to be sure that the command doesn't run is not because of bad usage from me. Apparently, my usage is correct, it is from my environment. I will also post a bug report. But the difficulty to get help for this problem is to provide a reproducible test. I have tried to reproduce this issue in a guix container ``` dev_1@dev_1 /mnt/recoverData$ guix shell --no-cwd --network --container guix dev_1@dev_1 ~ [env]$ guix-daemon & dev_1@dev_1 ~ [env]$ guix shell --container coreutils -- echo Elmo accepted connection from pid 3, user dev_1 substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable .. ``` The issue with my reproducible test is that the guix in guix container doesn't find any substitute, so it will compile all package, which will take time. Le dim. 20 nov. 2022 à 01:29, Maxim Cournoyer <maxim.cournoyer@gmail.com> a écrit : > Hi, > > Tobias Geerinckx-Rice <me@tobias.gr> writes: > > > [...] > > > ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo > > world > > guix shell: error: mount: mount "/proc" on > > "/tmp/guix-directory.zTa1qb//test": Invalid argument > > > > > > Weird! Clearly, /proc is imbued with magical Kernel magick and > > simply canno— what? Oh: > > > > ~ λ mount | grep /proc > > none on /proc type proc (rw,relatime) > > binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc > > (rw,relatime) > > > > > > Surely not… > > > > ~ λ sudo umount /proc/sys/fs/binfmt_misc > > > > ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo > > world > > Elmo world > > > > …huh. > > > > So, ‘guix shell --container’ apparently takes issue with rbind'ing > > mounts, or something like that. > > > > Maybe that's something Guix can handle by bind-mounting the entire > > subtree itself, or maybe it's a hard permissions error enforced by > > the kernel. I don't know. > > > > Someone with podman/Docker/similar experience might. > > I'm not useful, but just want to point out that this looks a lot like > https://issues.guix.gnu.org/46782 (guix environment --expose options > cannot be layered onto $PWD). > > -- > Thanks, > Maxim > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: guix shell: error: mount: Invalid argument 2022-11-20 9:32 ` bbb ee @ 2022-11-21 22:45 ` bbb ee 0 siblings, 0 replies; 12+ messages in thread From: bbb ee @ 2022-11-21 22:45 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: Tobias Geerinckx-Rice, help-guix I have submitted a bug report : https://issues.guix.gnu.org/issue/59425. Tobias is right, some of my tests fail because the current path is a mountpoint, but other tests fail because some paths of the host system can't be mounted. `guix shell --container coreutils -- echo Elmo` is runnable for me if I avoid this two condition above Le dim. 20 nov. 2022 à 10:32, bbb ee <blasforr@gmail.com> a écrit : > I have posted in the help mailing list, because I want to be sure that the > command doesn't run is not because of bad usage from me. Apparently, my > usage is correct, it is from my environment. > > I will also post a bug report. But the difficulty to get help for this > problem is to provide a reproducible test. I have tried to reproduce this > issue in a guix container > ``` > dev_1@dev_1 /mnt/recoverData$ guix shell --no-cwd --network --container > guix > dev_1@dev_1 ~ [env]$ guix-daemon & > dev_1@dev_1 ~ [env]$ guix shell --container coreutils -- echo Elmo > accepted connection from pid 3, user dev_1 > substitute: guix substitute: warning: ACL for archive imports seems to be > uninitialized, substitutes may be unavailable > .. > ``` > The issue with my reproducible test is that the guix in guix container > doesn't find any substitute, so it will compile all package, which will > take time. > > > Le dim. 20 nov. 2022 à 01:29, Maxim Cournoyer <maxim.cournoyer@gmail.com> > a écrit : > >> Hi, >> >> Tobias Geerinckx-Rice <me@tobias.gr> writes: >> >> >> [...] >> >> > ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo >> > world >> > guix shell: error: mount: mount "/proc" on >> > "/tmp/guix-directory.zTa1qb//test": Invalid argument >> > >> > >> > Weird! Clearly, /proc is imbued with magical Kernel magick and >> > simply canno— what? Oh: >> > >> > ~ λ mount | grep /proc >> > none on /proc type proc (rw,relatime) >> > binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc >> > (rw,relatime) >> > >> > >> > Surely not… >> > >> > ~ λ sudo umount /proc/sys/fs/binfmt_misc >> > >> > ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo >> > world >> > Elmo world >> > >> > …huh. >> > >> > So, ‘guix shell --container’ apparently takes issue with rbind'ing >> > mounts, or something like that. >> > >> > Maybe that's something Guix can handle by bind-mounting the entire >> > subtree itself, or maybe it's a hard permissions error enforced by >> > the kernel. I don't know. >> > >> > Someone with podman/Docker/similar experience might. >> >> I'm not useful, but just want to point out that this looks a lot like >> https://issues.guix.gnu.org/46782 (guix environment --expose options >> cannot be layered onto $PWD). >> >> -- >> Thanks, >> Maxim >> > ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-11-21 23:08 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-11-19 11:15 guix shell: error: mount: Invalid argument bbb ee 2022-11-19 11:23 ` Tobias Geerinckx-Rice 2022-11-19 19:17 ` bbb ee 2022-11-19 19:21 ` Tobias Geerinckx-Rice 2022-11-19 19:27 ` bbb ee 2022-11-19 19:46 ` Tobias Geerinckx-Rice 2022-11-19 20:18 ` bbb ee 2022-11-19 20:19 ` Tobias Geerinckx-Rice 2022-11-19 20:20 ` bbb ee 2022-11-20 0:29 ` Maxim Cournoyer 2022-11-20 9:32 ` bbb ee 2022-11-21 22:45 ` bbb ee
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).