FS#56622 - {arch-install-scripts} arch-chroot doesn't fix /proc after unshare --pid
Attached to Project:
Arch Linux
Opened by Yuxuan Shui (yshui) - Thursday, 07 December 2017, 16:45 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 05 January 2019, 16:36 GMT
Opened by Yuxuan Shui (yshui) - Thursday, 07 December 2017, 16:45 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 05 January 2019, 16:36 GMT
|
Details
Trying to interact with PIDs outside the namespace will just
fail, while 'ps' still shows those processes.
On the other hand, it's impossible to query information about processes inside the namespace, it's really hard to find the correct PID to, say, kill a process. Some applications that relies on /proc might also fail. |
This task depends upon
Closed by Dave Reisner (falconindy)
Saturday, 05 January 2019, 16:36 GMT
Reason for closing: Won't fix
Additional comments about closing: Not really a supported use case for arch-chroot. Use systemd-nspawn or some other container solution if you need to do things in the chroot other than finish your arch install.
Saturday, 05 January 2019, 16:36 GMT
Reason for closing: Won't fix
Additional comments about closing: Not really a supported use case for arch-chroot. Use systemd-nspawn or some other container solution if you need to do things in the chroot other than finish your arch install.
Comment by
Dave Reisner (falconindy) -
Thursday, 07 December 2017, 18:49 GMT
Comment by Yuxuan Shui (yshui) -
Friday, 08 December 2017, 10:37 GMT
Comment by
Dave Reisner (falconindy) - Friday,
08 December 2017, 12:22 GMT
Comment by Xiao (leonshaw) -
Friday, 14 December 2018, 06:34 GMT
What are you doing in the chroot that this matters? arch-chroot
wasn't meant for long running tasks -- just an easy way of
sneaking into the chroot for initial setup. You could just as
easily use systemd-nspawn instead, and that probably gives you the
feature you're looking for.
If that's the case, why do we use --pid at all?
https://git.archlinux.org/arch-install-scripts.git/commit/?id=2be79c6259cfbf9ebcd258a68fea3ec79f532e32
To hide parent processes from chroot /proc, we probably need
--mount-proc option of unshare. To map pids to parent namespace,
look for NSpid in /proc/$pid/status outside.