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