[CRIU] mnt namespaces
Pavel Emelyanov
xemul at parallels.com
Fri Dec 13 01:00:46 PST 2013
On 12/13/2013 02:57 AM, shawn at www.churchofgit.com wrote:
>
> ---- Original Message ----
> From: "Pavel Emelyanov" <xemul at parallels.com>
> To: shawn at www.churchofgit.com
> CC: "Shawn Landden" <shawn at churchofgit.com>, criu at openvz.org
> Sent: Wed, Dec 11, 2013, 02:22 AM
> Subject: Re: [CRIU] mnt namespaces
>
>
> On 12/11/2013 08:50 AM, shawn at www.churchofgit.com wrote:
>
> ---- Original Message ----
> From: "Pavel Emelyanov" <xemul at parallels.com <mailto:xemul at parallels.com>>
> To: "Shawn Landden" <shawn at churchofgit.com <mailto:shawn at churchofgit.com>>
> CC: criu at openvz.org <mailto:criu at openvz.org>
> Sent: Tue, Dec 10, 2013, 08:30 PM
> Subject: Re: [CRIU] mnt namespaces
>
> On 12/11/2013 08:19 AM, Shawn Landden wrote:
>
> I can't figure out how to dump mount namespaces.
>
> Namespaces are dumped by CRIU when it detects them, not when you specify it
> with the option. IOW you should start a task in mount namespace and dump
> one. Then CRIU will detect it and try to dump the mount namespace as well.
>
> I tried that first, and I got the same error. the target pid is pid 1 in the namespace.
>
> criu dump -n mnt,net,pid,uts -t 109811
>
> (00.004942) Warn (sk-unix.c:353): Can't stat socket 0x34de(./run/user/1000/pulse/native), skipping: No such file or directory (err 2)
>
>
>
> This is a warning, that may not affect the dump. Would you show the full dump.log please?
>
> None of these sockets have anything to do with what I am dumping?!?!?!?!?!
>
> root at zephyr:/var/tmp/systemd-criu# criu dump -t 2496
> (00.002533) Warn (sk-unix.c:353): Can't stat socket 0x2b11(./tmp/ssh-MezaRkkHlqm2/agent.816), skipping: No such file or directory (err 2)
> (00.002833) Warn (sk-unix.c:353): Can't stat socket 0x301b(./run/user/1000/keyring-onPV5c/pkcs11), skipping: No such file or directory (err 2)
> (00.002897) Warn (sk-unix.c:353): Can't stat socket 0x3023(./run/user/1000/keyring-onPV5c/gpg), skipping: No such file or directory (err 2)
> (00.002955) Warn (sk-unix.c:353): Can't stat socket 0xd635(./tmp/9BA4686616EF5FDC8957B2D56E0FDFA1E2C0E01D.31.0.1650.63_service_ipc), skipping: No such file or directory (err 2)
> (00.003015) Warn (sk-unix.c:353): Can't stat socket 0x2945(./var/run/libvirt/libvirt-sock), skipping: No such file or directory (err 2)
> (00.003076) Warn (sk-unix.c:353): Can't stat socket 0x2947(./var/run/libvirt/libvirt-sock-ro), skipping: No such file or directory (err 2)
> (00.003128) Warn (sk-unix.c:353): Can't stat socket 0x1847(./run/udev/control), skipping: No such file or directory (err 2)
> (00.003194) Warn (sk-unix.c:353): Can't stat socket 0x7f80(./run/user/1000/wayland-0), skipping: No such file or directory (err 2)
> (00.003248) Warn (sk-unix.c:353): Can't stat socket 0x2b85(./tmp/.ICE-unix/857), skipping: No such file or directory (err 2)
> (00.003303) Warn (sk-unix.c:353): Can't stat socket 0x2c8e(./var/run/wpa_supplicant/wlan0), skipping: No such file or directory (err 2)
> (00.003359) Warn (sk-unix.c:353): Can't stat socket 0x2ba8(./run/user/1000/keyring-onPV5c/control), skipping: No such file or directory (err 2)
> (00.003421) Warn (sk-unix.c:353): Can't stat socket 0x2bb7(./run/user/1000/keyring-onPV5c/ssh), skipping: No such file or directory (err 2)
> (00.003484) Warn (sk-unix.c:353): Can't stat socket 0x2dc1(./tmp/.X11-unix/X0), skipping: No such file or directory (err 2)
> (00.003540) Warn (sk-unix.c:353): Can't stat socket 0xa6c2(./tmp/.org.chromium.Chromium.1jzIWa/SingletonSocket), skipping: No such file or directory (err 2)
> (00.003597) Warn (sk-unix.c:353): Can't stat socket 0x2ee6(./run/user/1000/pulse/native), skipping: No such file or directory (err 2)
> (00.003656) Warn (sk-unix.c:353): Can't stat socket 0x2de6(./tmp/gpg-EqSqB4/S.gpg-agent), skipping: No such file or directory (err 2)
> (00.003709) Warn (sk-unix.c:353): Can't stat socket 0x1be5(./var/run/libvirt/virtlockd-sock), skipping: No such file or directory (err 2)
> (00.003762) Warn (sk-unix.c:353): Can't stat socket 0x2ee8(./run/user/1000/pulse/dbus-socket), skipping: No such file or directory (err 2)
> (00.003830) Warn (sk-unix.c:353): Can't stat socket 0x1be8(./run/acpid.socket), skipping: No such file or directory (err 2)
> (00.003968) Warn (sk-unix.c:353): Can't stat socket 0x1bea(./var/run/avahi-daemon/socket), skipping: No such file or directory (err 2)
> (00.004036) Warn (sk-unix.c:353): Can't stat socket 0x1bed(./var/run/criu-service.socket), skipping: No such file or directory (err 2)
> (00.004220) Warn (sk-unix.c:353): Can't stat socket 0xa504(./run/acpid.socket), skipping: No such file or directory (err 2)
> (00.004299) Warn (sk-unix.c:353): Can't stat socket 0x350d(./run/user/1000/pulse/native), skipping: No such file or directory (err 2)
> (00.004454) Warn (sk-unix.c:353): Can't stat socket 0x351c(./run/user/1000/keyring-onPV5c/pkcs11), skipping: No such file or directory (err 2)
> (00.004606) Warn (sk-unix.c:353): Can't stat socket 0x34f2(./run/user/1000/pulse/native), skipping: No such file or directory (err 2)
> (00.004679) Warn (sk-unix.c:353): Can't stat socket 0x3902(./run/user/1000/keyring-onPV5c/pkcs11), skipping: No such file or directory (err 2)
> (00.004820) Warn (sk-unix.c:353): Can't stat socket 0xda04(./tmp/9BA4686616EF5FDC8957B2D56E0FDFA1E2C0E01D.31.0.1650.63_service_ipc), skipping: No such file or directory (err 2)
> (00.004889) Warn (sk-unix.c:353): Can't stat socket 0x34b0(./run/user/1000/pulse/native), skipping: No such file or directory (err 2)
> (00.005000) Warn (sk-unix.c:353): Can't stat socket 0xa644(./run/user/1000/pulse/native), skipping: No such file or directory (err 2)
> (00.005137) Warn (sk-unix.c:353): Can't stat socket 0x31b4(./run/user/1000/keyring-onPV5c/pkcs11), skipping: No such file or directory (err 2)
> (00.005211) Warn (sk-unix.c:353): Can't stat socket 0x10cbe(./run/user/1000/pulse/native), skipping: No such file or directory (err 2)
> (00.005233) Warn (sk-unix.c:353): Can't stat socket 0x7fc8(./run/user/1000/wayland-0), skipping: No such file or directory (err 2)
These messages are just warnings. Someone uses relative names for unix sockets and
strictly speaking we have no idea where to find them, thus we just warn and drop
that socket from the list. Later _if_ some task has one of those sockets in his
fd table, we fail the dump. But these particular messages do not hurt.
> (00.010486) Error (files.c:245): Can't dump file 8 of that type [600] (anon )
This is some linux-specific file. We currently support inotify, fsnotify,
signalfd, eventfd and eventpoll. This is something else. Maybe timerfd?
There's a bug in how we report these files, please, apply this patch and
check again:
--- a/files.c
+++ b/files.c
@@ -327,7 +327,7 @@ static int dump_one_file(struct parasite_ctl *ctl, int fd, int lfd, struct fd_op
else {
char more[64];
- if (read_fd_link(fd, more, sizeof(more)))
+ if (read_fd_link(fd, more, sizeof(more)) < 0)
more[0] = '\0';
return dump_unsupp_fd(&p, "anon", more);
There will be file "type" in the message.
> (00.010533) Error (cr-dump.c:1491): Dump files (pid: 2496) failed with -1
> (00.010837) Error (cr-dump.c:1811): Dumping FAILED.
> root at zephyr:/var/tmp/systemd-criu# pstree -p 2496
> systemd(2496)─┬─agetty(2526)
> ├─dbus-daemon(2523)
> ├─systemd-journal(2506)
> └─systemd-logind(2522)
>
> I guess it is this line?
>
> (00.010486) Error (files.c:245): Can't dump file 8 of that type [600] (anon ), which would refer to this:
> systemd 2496 root 8u 0000 0,9 0 4507 anon_inode
> from lsof
> which I have no idea what this is.
You can do ls -l /proc/$pid/fd and check where the symlink named "8" points to.
> I spawned this with systemd-nspawn -b
>
> ... trying without -b:
>
> root at zephyr:/var/tmp/systemd-criu# criu dump -t 10414
> (00.001500) Warn (sk-unix.c:353): Can't stat socket 0x2b11(./tmp/ssh-MezaRkkHlqm2/agent.816), skipping: No such file or directory (err 2)
> (trimmed)
> (00.004377) Warn (sk-unix.c:353): Can't stat socket 0x2812(./run/systemd/journal/stdout), skipping: No such file or directory (err 2)
> (00.012143) Error (mount.c:336): Mount 119 (master_id: 1 shared_id: 0) has unreachable sharing
This is some knot in the mount points.
Can you show the cat /proc/$pid-of-systemd/mountinfo output to Andrey (in Cc),
he may help with this?
> (00.012410) Error (namespaces.c:445): Namespaces dumping finished with error 65280
> (00.012510) Error (cr-dump.c:1811): Dumping FAILED.
> root at zephyr:/var/tmp/systemd-criu# pstree -p 10414
> bash(10414)
> root at zephyr:/var/tmp/systemd-criu# pstree -p 10413
> systemd-nspawn(10413)───bash(10414)
>
> etc....
>
> The mount namespace has a folder bind mounted to /
>
> -Shawn
>
> Thanks,
> Pavel
>
More information about the CRIU
mailing list