[systemd-devel] Odd /proc/$pid/fd symlinks in nspawn container

Ben Gamari ben at smart-cactus.org
Mon Jul 27 12:08:14 PDT 2015


Lennart Poettering <lennart at poettering.net> writes:

> On Mon, 27.07.15 20:29, Ben Gamari (ben at smart-cactus.org) wrote:
>
>> Lennart Poettering <lennart at poettering.net> writes:
>> 
>> > On Fri, 17.07.15 12:23, Ben Gamari (ben at smart-cactus.org) wrote:
>> >
>> snip
>> 
>> >> Why might this be the case? Does nspawn prevent the process from getting
>> >> a controlling tty?
>> >
>> > The pty setup code changed in nspawn evrsions, hence it is important
>> > to say which version you are running?
>> >
>> Ahh, of course. This is a Debian sid machine, so systemd 221.
>
> That's pretty recent. Any chance you can strace this, checking where
> this "/7" file comes from?
>
Sure.

This Gist [1] is the output from

    $ strace -f -ohi systemd-nspawn --personality=x86-64 -D$MY_CHROOT

and running `ls /proc/self/fd -lh` in the resulting shell. This
produced,

    $ ls /proc/self/fd -lh
    total 0
    lrwx------ 1 root root 64 Jul 27 15:02 0 -> /8
    lrwx------ 1 root root 64 Jul 27 15:02 1 -> /8
    lrwx------ 1 root root 64 Jul 27 15:02 2 -> /8
    lr-x------ 1 root root 64 Jul 27 15:02 3 -> /proc/13/fd

Where the links to /8 were broken.

Cheers,

- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150727/499ca550/attachment.sig>


More information about the systemd-devel mailing list