<div dir="ltr">Hi Tycho, <div><br></div><div>Unfortunately, looks like I don&#39;t have any <a href="http://tty.info">tty.info</a> in my checkpoint directory...</div><div>Hard to give you the output then :)</div><div><br></div><div>Thanks, <br>Alex </div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-14 16:50 GMT+02:00 Tycho Andersen <span dir="ltr">&lt;<a href="mailto:tycho.andersen@canonical.com" target="_blank">tycho.andersen@canonical.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi alex,<br>
<span class=""><br>
On Thu, Jun 09, 2016 at 05:53:26PM +0200, alex vk wrote:<br>
&gt; Hi everyone,<br>
&gt;<br>
&gt; I&#39;m now trying to checkpoint and restore an LXC container on a raspberry PI<br>
&gt; 2. (Criu 2.0 is working fine with the kernel 3.18, and LXC 2.0 works as<br>
&gt; well on the RPI2)<br>
&gt; Checkpointing a container apparently succeeds after disabling seccomp and<br>
&gt; adding these lines to the container config (according to the wiki):<br>
&gt;<br>
&gt; lxc.seccomp =<br>
&gt; # hax for criu<br>
&gt; lxc.console = none<br>
&gt; lxc.tty = 0<br>
&gt; lxc.cgroup.devices.deny = c 5:1 rwm<br>
&gt;<br>
&gt; However restoring fails with this message : &quot;lxc-checkpoint: criu.c:<br>
&gt; exec_criu: 305 lxc.console configured on source host but not target&quot;<br>
<br>
</span>Looks like you have tried a lot of stuff, let&#39;s sort out the liblxc<br>
issue first.<br>
<br>
Can you post the output of `cat <a href="http://tty.info" rel="noreferrer" target="_blank">tty.info</a>` in your checkpoint<br>
directory?<br>
<br>
Thanks,<br>
<br>
Tycho<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; I&#39;read on this post (<br>
&gt; <a href="https://lists.linuxcontainers.org/pipermail/lxc-devel/2016-March/013856.html" rel="noreferrer" target="_blank">https://lists.linuxcontainers.org/pipermail/lxc-devel/2016-March/013856.html</a>)<br>
&gt; not to pass the --ext-mount-map option when console=none.<br>
&gt; In this case, I have another error : &quot;1: Error (mount.c:3381): mnt: New<br>
&gt; root and old root are the same&quot;<br>
&gt;<br>
&gt; Interestingly, I have another error when trying to restore, if i run all<br>
&gt; the container creation, start, dump and restore with sudo (not directly in<br>
&gt; root):<br>
&gt;<br>
&gt; pie: 1: Error (pie/restorer.c:888): Can&#39;t restore ticks/time for timer&gt;<br>
&gt; pie: 1: fd - 0<br>
&gt; pie: 1: Error (pie/restorer.c:1408): Can&#39;t restore timerfd -22<br>
&gt;<br>
&gt; I&#39;ve put the full log of dumping and restoring, as well as the container<br>
&gt; config attached below, if anyone has any ideas ?<br>
&gt;<br>
&gt; Thanks for your help,<br>
&gt; Alex<br>
&gt;<br>
&gt;<br>
&gt; ----------------------------------------------------------------------------------------------------<br>
&gt; Here is what i get from the restore :<br>
&gt;<br>
&gt; root@pi-desktop:/home/pi/checkpoint# lxc-checkpoint -r -D<br>
&gt; /home/pi/checkpoint/ -n test-container --logfile=debug_restore<br>
&gt; --logpriority=DEBUG<br>
&gt; lxc-checkpoint: criu.c: do_restore: 705 criu process exited 1, output:<br>
&gt; lxc-checkpoint: criu.c: exec_criu: 305 lxc.console configured on source<br>
&gt; host but not target<br>
&gt;<br>
&gt;<br>
&gt; lxc-checkpoint: cgfsng.c: recursive_destroy: 983 Error destroying<br>
&gt; /sys/fs/cgroup/systemd//lxc/test-container<br>
&gt; lxc-checkpoint: cgfsng.c: recursive_destroy: 983 Error destroying<br>
&gt; /sys/fs/cgroup/blkio//lxc/test-container<br>
&gt; lxc-checkpoint: cgfsng.c: recursive_destroy: 983 Error destroying<br>
&gt; /sys/fs/cgroup/freezer//lxc/test-container<br>
&gt; lxc-checkpoint: cgfsng.c: recursive_destroy: 983 Error destroying<br>
&gt; /sys/fs/cgroup/debug//lxc/test-container<br>
&gt; lxc-checkpoint: cgfsng.c: recursive_destroy: 983 Error destroying<br>
&gt; /sys/fs/cgroup/cpu//lxc/test-container<br>
&gt; lxc-checkpoint: cgfsng.c: recursive_destroy: 983 Error destroying<br>
&gt; /sys/fs/cgroup/devices//lxc/test-container<br>
&gt; lxc-checkpoint: cgfsng.c: recursive_destroy: 983 Error destroying<br>
&gt; /sys/fs/cgroup/perf_event//lxc/test-container<br>
&gt; lxc-checkpoint: cgfsng.c: recursive_destroy: 983 Error destroying<br>
&gt; /sys/fs/cgroup/cpuset//lxc/test-container<br>
&gt; lxc-checkpoint: cgfsng.c: recursive_destroy: 983 Error destroying<br>
&gt; /sys/fs/cgroup/net_cls//lxc/test-container<br>
&gt; lxc-checkpoint: criu.c: __criu_restore: 953 restore process died<br>
&gt; Restoring test-container failed.<br>
&gt;<br>
&gt; ----------------------------------------------------------------------------------------------------<br>
&gt; Here is the log of the dumping created with the lxc-checkpoint -s<br>
&gt; --logfile=debug_dump :<br>
&gt; root@pi-desktop:/home/pi/checkpoint# lxc-checkpoint -s -D<br>
&gt; /home/pi/checkpoint/ -n test-container --logfile=debug_dump<br>
&gt; --logpriority=DEBUG<br>
&gt; root@pi-desktop:/home/pi/checkpoint# cat debug_dump<br>
&gt;  lxc-checkpoint 20160609165234.776 WARN     lxc_confile -<br>
&gt; confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored.  It will soon<br>
&gt; become an error.<br>
&gt;  lxc-checkpoint 20160609165234.777 WARN     lxc_confile -<br>
&gt; confile.c:config_personality:1117 - unsupported personality &#39;armhf&#39;<br>
&gt;  lxc-checkpoint 20160609165234.784 DEBUG    lxc_commands -<br>
&gt; commands.c:lxc_cmd_get_state:579 - &#39;test-container&#39; is in &#39;RUNNING&#39; state<br>
&gt;  lxc-checkpoint 20160609165234.799 INFO     lxc_criu - criu.c:exec_criu:387<br>
&gt; - execing: /usr/local/sbin/criu dump --tcp-established --file-locks<br>
&gt; --link-remap --manage-cgroups --ext-mount-map auto<br>
&gt; --enable-external-sharing --enable-external-masters --enable-fs hugetlbfs<br>
&gt; --enable-fs tracefs -D /home/pi/checkpoint/ -o<br>
&gt; /home/pi/checkpoint//dump.log -t 4617 --freeze-cgroup<br>
&gt; /sys/fs/cgroup/freezer///lxc/test-container --force-irmap<br>
&gt; -------------------------------------------------------------------------------------------<br>
&gt;<br>
&gt; And here is the dump.log :<br>
&gt; root@pi-desktop:/home/pi/checkpoint# cat dump.log<br>
&gt; Warn  (autofs.c:77): Failed to find pipe_ino option (old kernel?)<br>
&gt; Detected FS_EVENT_ON_CHILD bit in mask (will be ignored on restore)<br>
&gt; tar: ./systemd/journal/socket: socket ignored<br>
&gt; tar: ./systemd/journal/stdout: socket ignored<br>
&gt; tar: ./systemd/journal/syslog: socket ignored<br>
&gt; tar: ./systemd/journal/dev-log: socket ignored<br>
&gt; tar: ./systemd/private: socket ignored<br>
&gt; tar: ./systemd/notify: socket ignored<br>
&gt;<br>
&gt; ----------------------------------------------------------------------------------------------------<br>
&gt;<br>
&gt; Here is the log created with lxc-checkpoint -r --logfile :<br>
&gt;<br>
&gt; root@pi-desktop:/home/pi/checkpoint# cat debug_restore<br>
&gt;  lxc-checkpoint 20160609165308.055 WARN     lxc_confile -<br>
&gt; confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored.  It will soon<br>
&gt; become an error.<br>
&gt;  lxc-checkpoint 20160609165308.056 WARN     lxc_confile -<br>
&gt; confile.c:config_personality:1117 - unsupported personality &#39;armhf&#39;<br>
&gt;  lxc-checkpoint 20160609165308.075 INFO     lxc_lsm - lsm/lsm.c:lsm_init:48<br>
&gt; - LSM security driver nop<br>
&gt;  lxc-checkpoint 20160609165308.076 DEBUG    lxc_start -<br>
&gt; start.c:setup_signal_fd:289 - sigchild handler set<br>
&gt;  lxc-checkpoint 20160609165308.076 INFO     lxc_start -<br>
&gt; start.c:lxc_init:488 - &#39;test-container&#39; is initialized<br>
&gt;  lxc-checkpoint 20160609165308.076 INFO     lxc_cgroup -<br>
&gt; cgroup.c:cgroup_init:68 - cgroup driver cgroupfs-ng initing for<br>
&gt; test-container<br>
&gt;  lxc-checkpoint 20160609165308.087 ERROR    lxc_criu - criu.c:exec_criu:305<br>
&gt; - lxc.console configured on source host but not target<br>
&gt;  lxc-checkpoint 20160609165308.115 INFO     lxc_conf -<br>
&gt; conf.c:run_script_argv:367 - Executing script<br>
&gt; &#39;/usr/share/lxcfs/lxc.reboot.hook&#39; for container &#39;test-container&#39;, config<br>
&gt; section &#39;lxc&#39;<br>
&gt;  lxc-checkpoint 20160609165308.686 ERROR    lxc_criu -<br>
&gt; criu.c:do_restore:705 - criu process exited 1, output:<br>
&gt; lxc-checkpoint: criu.c: exec_criu: 305 lxc.console configured on source<br>
&gt; host but not target<br>
&gt;<br>
&gt;<br>
&gt;  lxc-checkpoint 20160609165308.689 INFO     lxc_conf -<br>
&gt; conf.c:run_script_argv:367 - Executing script<br>
&gt; &#39;/usr/share/lxcfs/lxc.reboot.hook&#39; for container &#39;test-container&#39;, config<br>
&gt; section &#39;lxc&#39;<br>
&gt;  lxc-checkpoint 20160609165309.206 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:recursive_destroy:983 - Error destroying<br>
&gt; /sys/fs/cgroup/systemd//lxc/test-container<br>
&gt;  lxc-checkpoint 20160609165309.208 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:recursive_destroy:983 - Error destroying<br>
&gt; /sys/fs/cgroup/blkio//lxc/test-container<br>
&gt;  lxc-checkpoint 20160609165309.209 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:recursive_destroy:983 - Error destroying<br>
&gt; /sys/fs/cgroup/freezer//lxc/test-container<br>
&gt;  lxc-checkpoint 20160609165309.211 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:recursive_destroy:983 - Error destroying<br>
&gt; /sys/fs/cgroup/debug//lxc/test-container<br>
&gt;  lxc-checkpoint 20160609165309.212 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:recursive_destroy:983 - Error destroying<br>
&gt; /sys/fs/cgroup/cpu//lxc/test-container<br>
&gt;  lxc-checkpoint 20160609165309.213 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:recursive_destroy:983 - Error destroying<br>
&gt; /sys/fs/cgroup/devices//lxc/test-container<br>
&gt;  lxc-checkpoint 20160609165309.214 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:recursive_destroy:983 - Error destroying<br>
&gt; /sys/fs/cgroup/perf_event//lxc/test-container<br>
&gt;  lxc-checkpoint 20160609165309.215 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:recursive_destroy:983 - Error destroying<br>
&gt; /sys/fs/cgroup/cpuset//lxc/test-container<br>
&gt;  lxc-checkpoint 20160609165309.217 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:recursive_destroy:983 - Error destroying<br>
&gt; /sys/fs/cgroup/net_cls//lxc/test-container<br>
&gt;  lxc-checkpoint 20160609165309.220 ERROR    lxc_criu -<br>
&gt; criu.c:__criu_restore:953 - restore process died<br>
&gt;<br>
&gt;<br>
&gt; ----------------------------------------------------------------------------------------------------<br>
&gt;<br>
&gt; The log without --ext-mount-map<br>
&gt;<br>
&gt; /usr/local/sbin/criu restore --tcp-established --file-locks --link-remap<br>
&gt; --manage-cgroups --ext-mount-map auto --enable-external-sharing<br>
&gt; --enable-external-masters --enable-fs hugetlbfs --enable-fs tracefs -D<br>
&gt; /home/pi/checkpoint -o /home/pi/checkpoint/restore.log --root<br>
&gt; /usr/lib/arm-linux-gnueabihf/lxc --restore-detached --restore-sibling<br>
&gt; --pidfile /tmp/filet0XGku --cgroup-root /lxc/test-container console:<br>
&gt; --veth-pair eth0=vethINVTTV@lxcbr0<br>
&gt;<br>
&gt; root@pi-desktop:/home/pi/checkpoint# cat restore.log<br>
&gt; Warn  (cr-restore.c:812): Set CLONE_PARENT | CLONE_NEWPID but it might<br>
&gt; cause restore problem,because not all kernels support such clone flags<br>
&gt; combinations!<br>
&gt; RTNETLINK answers: File exists<br>
&gt; RTNETLINK answers: File exists<br>
&gt; RTNETLINK answers: File exists<br>
&gt; RTNETLINK answers: File exists<br>
&gt;      1: Warn  (autofs.c:77): Failed to find pipe_ino option (old kernel?)<br>
&gt;      1: Error (mount.c:3381): mnt: New root and old root are the same<br>
&gt; Error (cr-restore.c:988): 5521 killed by signal 9: Killed<br>
&gt; Error (cr-restore.c:1867): Restoring FAILED.<br>
&gt;<br>
&gt; ----------------------------------------------------------------------------------------------------<br>
&gt;<br>
&gt; As a normal user, with sudo :<br>
&gt;<br>
&gt; pi@pi-desktop:~/checkpoint$ cat debug_restore<br>
&gt;  lxc-checkpoint 20160609171247.434 WARN     lxc_confile -<br>
&gt; confile.c:config_pivotdir:1879 - lxc.pivotdir is ignored.  It will soon<br>
&gt; become an error.<br>
&gt;  lxc-checkpoint 20160609171247.435 WARN     lxc_confile -<br>
&gt; confile.c:config_personality:1117 - unsupported personality &#39;armhf&#39;<br>
&gt;  lxc-checkpoint 20160609171247.454 INFO     lxc_lsm - lsm/lsm.c:lsm_init:48<br>
&gt; - LSM security driver nop<br>
&gt;  lxc-checkpoint 20160609171247.455 DEBUG    lxc_start -<br>
&gt; start.c:setup_signal_fd:289 - sigchild handler set<br>
&gt;  lxc-checkpoint 20160609171247.455 INFO     lxc_start -<br>
&gt; start.c:lxc_init:488 - &#39;test-container&#39; is initialized<br>
&gt;  lxc-checkpoint 20160609171247.455 INFO     lxc_cgroup -<br>
&gt; cgroup.c:cgroup_init:68 - cgroup driver cgroupfs-ng initing for<br>
&gt; test-container<br>
&gt;  lxc-checkpoint 20160609171247.456 ERROR    lxc_cgfsng -<br>
&gt; cgfsng.c:cgfsng_create:1072 - No such file or directory - Failed to create<br>
&gt; /sys/fs/cgroup/systemd//lxc/test-container: No such file or directory<br>
&gt;  lxc-checkpoint 20160609171247.466 INFO     lxc_criu - criu.c:exec_criu:387<br>
&gt; - execing: /usr/local/sbin/criu restore --tcp-established --file-locks<br>
&gt; --link-remap --manage-cgroups --ext-mount-map auto<br>
&gt; --enable-external-sharing --enable-external-masters --enable-fs hugetlbfs<br>
&gt; --enable-fs tracefs -D /home/pi/checkpoint -o<br>
&gt; /home/pi/checkpoint/restore.log --root /usr/lib/arm-linux-gnueabihf/lxc<br>
&gt; --restore-detached --restore-sibling --pidfile /tmp/file8x1eFF<br>
&gt; --cgroup-root /lxc/test-container-1 --ext-mount-map console: --veth-pair<br>
&gt; eth0=veth6AHNY2@lxcbr0<br>
&gt;  lxc-checkpoint 20160609171248.456 ERROR    lxc_criu -<br>
&gt; criu.c:do_restore:705 - criu process exited 1, output:<br>
&gt;<br>
&gt;<br>
&gt;  lxc-checkpoint 20160609171248.458 INFO     lxc_conf -<br>
&gt; conf.c:run_script_argv:367 - Executing script<br>
&gt; &#39;/usr/share/lxcfs/lxc.reboot.hook&#39; for container &#39;test-container&#39;, config<br>
&gt; section &#39;lxc&#39;<br>
&gt;  lxc-checkpoint 20160609171248.984 ERROR    lxc_criu -<br>
&gt; criu.c:__criu_restore:953 - restore process died<br>
&gt;<br>
&gt; ----------------------------------<br>
&gt;<br>
&gt; The restore.log as a normal user, with sudo :<br>
&gt;<br>
&gt; pi@pi-desktop:~/checkpoint$ sudo cat restore.log<br>
&gt; Warn  (cr-restore.c:812): Set CLONE_PARENT | CLONE_NEWPID but it might<br>
&gt; cause restore problem,because not all kernels support such clone flags<br>
&gt; combinations!<br>
&gt; RTNETLINK answers: File exists<br>
&gt; RTNETLINK answers: File exists<br>
&gt; RTNETLINK answers: File exists<br>
&gt; RTNETLINK answers: File exists<br>
&gt;      1: Warn  (autofs.c:77): Failed to find pipe_ino option (old kernel?)<br>
&gt;      1: Warn  (sk-unix.c:1292): sk unix: Can&#39;t unlink stale socket 0x88b4<br>
&gt; peer 0 (name /run/systemd/notify dir -)<br>
&gt;      1: Warn  (sk-unix.c:1292): sk unix: Can&#39;t unlink stale socket 0x88b6<br>
&gt; peer 0 (name /run/systemd/private dir -)<br>
&gt;      1: Warn  (sk-unix.c:1292): sk unix: Can&#39;t unlink stale socket 0x88ba<br>
&gt; peer 0 (name /run/systemd/journal/dev-log dir -)<br>
&gt;      1: Warn  (sk-unix.c:1292): sk unix: Can&#39;t unlink stale socket 0x8285<br>
&gt; peer 0 (name /run/systemd/journal/stdout dir -)<br>
&gt;      1: Warn  (sk-unix.c:1292): sk unix: Can&#39;t unlink stale socket 0x8287<br>
&gt; peer 0 (name /run/systemd/journal/socket dir -)<br>
&gt;      1: Warn  (sk-unix.c:1292): sk unix: Can&#39;t unlink stale socket 0x88d0<br>
&gt; peer 0 (name /run/systemd/journal/syslog dir -)<br>
&gt;      1: Warn  (sk-unix.c:1292): sk unix: Can&#39;t unlink stale socket 0x83cc<br>
&gt; peer 0x83cb (name /run/systemd/journal/stdout dir -)<br>
&gt;      1: Warn  (sk-unix.c:1292): sk unix: Can&#39;t unlink stale socket 0x83fc<br>
&gt; peer 0x8dfa (name /run/systemd/journal/stdout dir -)<br>
&gt; pie: 1: Error (pie/restorer.c:888): Can&#39;t restore ticks/time for timer&gt;<br>
&gt; pie: 1: fd - 0<br>
&gt; pie: 1: Error (pie/restorer.c:1408): Can&#39;t restore timerfd -22<br>
&gt; pie: 1: Error (pie/restorer.c:1506): Restorer fail 1<br>
&gt; Error (cr-restore.c:985): 6401 exited, status=1<br>
&gt; Error (cr-restore.c:1867): Restoring FAILED.<br>
&gt;<br>
&gt;<br>
&gt; -------------------------------<br>
&gt;<br>
&gt; Here is the config of the container : /var/lib/lxc/test-container/config<br>
&gt;<br>
&gt; # Template used to create this container:<br>
&gt; /usr/share/lxc/templates/lxc-ubuntu<br>
&gt; # Parameters passed to the template:<br>
&gt; # For additional config options, please look at lxc.container.conf(5)<br>
&gt;<br>
&gt; # Uncomment the following line to support nesting containers:<br>
&gt; #lxc.include = /usr/share/lxc/config/nesting.conf<br>
&gt; # (Be aware this has security implications)<br>
&gt;<br>
&gt;<br>
&gt; # Common configuration<br>
&gt; lxc.include = /usr/share/lxc/config/ubuntu.common.conf<br>
&gt;<br>
&gt; # Container specific configuration<br>
&gt; lxc.rootfs = /var/lib/lxc/test-container/rootfs<br>
&gt; lxc.rootfs.backend = dir<br>
&gt; lxc.utsname = test-container<br>
&gt; lxc.arch = armhf<br>
&gt;<br>
&gt; # Network configuration<br>
&gt; lxc.network.type = veth<br>
&gt; lxc.network.link = lxcbr0<br>
&gt; lxc.network.flags = up<br>
&gt; lxc.network.hwaddr = 00:16:3e:d5:62:a5<br>
&gt; lxc.seccomp =<br>
&gt; lxc.console = none<br>
&gt; lxc.tty = 0<br>
&gt; lxc.cgroup.devices.deny = c 5:1 rwm<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">&gt; _______________________________________________<br>
&gt; CRIU mailing list<br>
&gt; <a href="mailto:CRIU@openvz.org">CRIU@openvz.org</a><br>
&gt; <a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
<br>
</div></div></blockquote></div><br></div>