- 07 Aug, 2015 3 commits
-
-
Gabriel Guimaraes authored
This is here only to support the Linux Kernel between versions 3.18 and 4.2. After that, this workaround is not needed anymore, but it will work properly on both a kernel with and without the bug. The bug is that when a process has a file open in an OverlayFS directory, the information in /proc/<pid>/fd/<fd> and /proc/<pid>/fdinfo/<fd> is wrong, so we grab that information from the mountinfo table instead. This is done every time fill_fdlink is called. We first check to see if the mnt_id and st_dev numbers currently match some entry in the mountinfo table. If so, we already have the correct mnt_id and no fixup is needed. Then we proceed to see if there are any overlayFS mounted directories in the mountinfo table. If so, we concatenate the mountpoint with the name of the file, and stat the resulting path to check if we found the correct device id and node number. If that is the case, we update the mount id and link variables with the correct values. Signed-off-by:
Gabriel Guimaraes <gabriellimaguimaraes@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It's preparation to use a freezer cgroup for freezing tasks. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 06 Aug, 2015 3 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Hui Kang authored
Signed-off-by:
Hui Kang <hkang.sunysb@gmail.com> Looks-good-to: Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 05 Aug, 2015 7 commits
-
-
Andrey Vagin authored
Currently we skip all userns tests if "criu check" fails. This code was written when the "freature" options of criu check didn't exist. Currently we add userns tests only if "criu check --feature userns" passes. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Dynamically allocated @name doesn't release if error happened. | ** CID 129898: (RESOURCE_LEAK) | /sk-unix.c: 505 in unix_process_name() | /sk-unix.c: 509 in unix_process_name() | /sk-unix.c: 519 in unix_process_name() Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
They should do mostly the same, but the first one checks nothing after c/r. v2: remove sockets03 from Makefile Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
because we are going to restore data of peer. Anyway this is wrong, because we need to restore a message with a sender address. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This test fails currently, because these data are not restored. v2: remove the test from the execution list. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 03 Aug, 2015 9 commits
-
-
Christopher Covington authored
If we want one CRIU binary to work across all AArch64 kernel configurations, a single task size value cannot be hard coded. While trivial applications successfully checkpoint and restore on AArch64 kernels with CONFIG_ARM64_64K_PAGES=y without this patch, replacing the remaining use of the hard-coded value seems like the best way to guard against failures that more complex process trees and future uses may expose. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
If we want one CRIU binary to work across all AArch64 kernel configurations, a single task size value cannot be hard coded. Since vma_area_is_private() is used by both restorer blob code and non restorer blob code, which must use different variables for recording the task size, make task_size a function argument and modify the call sites accordingly. This fixes the following error on AArch64 kernels with CONFIG_ARM64_64K_PAGES=y. pie: Error (pie/restorer.c:929): Can't restore 0x3ffb7e70000 mapping w> pie: ith 0xfffffffffffffff7 Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
If we want one CRIU binary to work across all AArch64 kernel configurations, a single task size value cannot be hard coded. This fixes the following error on AArch64 kernels with CONFIG_ARM64_64K_PAGES=y. pie: Error (pie/restorer.c:772): Unable to unmap (-): -1211695104 Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
If we want one CRIU binary to work across all AArch64 kernel configurations, a single task size value cannot be hard coded. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Currently each task subtracts number of zombies from task_entries->nr_threads without locks, so if two tasks will do this operation concurrently, the result may be unpredictable. https://github.com/xemul/criu/issues/13 Cc: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Andrew Vagin <avagin@openvz.org> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Users shouldn't use it directly anyway, they should use criu_set* fucntions for that. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 31 Jul, 2015 6 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
In case if socket's cwd lays on nested mount point we might resolve its path a bit incorrectly (mount_resolve_path helper should not obtain paths with leading dot). Thus send a path without leading dot for correct name resolving. Also add some error messages. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
In this mode libcriu will execute criu binary in swrk mode, so users are not always obliged to run criu service daemon. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 30 Jul, 2015 4 commits
-
-
Cédric Bosdonnat authored
Use CRTOOLSVERSION instead of GITID to write criu.pc version. With GITID, criu.pc had version '0' when built from tarballs. Signed-off-by:
Cédric Bosdonnat <cbosdonnat@suse.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Make sure we don't pass any trash value here, because the kernel does copy it explicitly. We allocate the memory for frame as zero filled but stack segment is special and zero is not acceptable (we've had a discussion on LKML if we need a special handling for zero ss but end up that new kernels need new CRIU version, upon which all agreed). Finally in commit 296bbf7e I managed to hit exactly this problem :) Reported-by:
Andrey Wagin <avagin@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrey Wagin <avagin@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Jul, 2015 7 commits
-
-
Christopher Covington authored
Also remove the cast of a pointer-to-void variable to the type it already is. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Make it more readable. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Artem Kuzmitskiy authored
* Added test for dumping\restoring of unnamed unix sockets. Also test added to test/Makefile. Use make run for launch. * Cleanup env after call run.sh in test/libcriu. Signed-off-by:
Artem Kuzmitskiy <artem.kuzmitskiy@lge.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Artem Kuzmitskiy authored
Added functionality for restoring unnamed unix sockets using already implemented feature - inherit fd and using same command line option. Usage example: criu restore -d -D images -o restore.log --pidfile restore.pid -v4 \ -x --inherit-fd fd[3]:socket:[9677263] Signed-off-by:
Artem Kuzmitskiy <artem.kuzmitskiy@lge.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Artem Kuzmitskiy authored
* Added functionality for dumping unnamed unix sockets. When we call CRIU with dump option, for unnamed socket we should pass it inode into --ext-unix-sk. Details about this problem described in http://criu.org/External_UNIX_socket#What_to_do_with_socketpair.28.29-s.3F. Usage example: criu dump -D images -o dump.log -v4 --ext-unix-sk=4529709 -t 13506 * fix typo error in log output Signed-off-by:
Artem Kuzmitskiy <artem.kuzmitskiy@lge.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Unix sockets may be created with non-absolute (relative) path (when kernel creates one it always use AT_FDCWD for name resolving), So when we collect sockets we see them as having names without leading slash. In common cases for such sockets application doesn't change own working directory after that but this is not always the true. So we need to invent some name resolver. The good candidate is IRMAP cache but after a number of testings I found that it might slow down performance very dramatically. Thus we need some more intelligent way here. For a while, for common applications such as postfix, fetching dumpee working directory and root is enough. So here what we do - when socket get collected from diag interface we remember its relative name parameters (device and inode) but postprone name resolving to not bring perf penalty until really needed - when we meet a socket to dump with relative name assigned we try to use $cwd/name and $root/name for this socket to check if it has been created in those directories. On success we simply remember the directory in image and when restore such socket call for chdir helper to change working dir and generate relative name v2: - Use new unlink_stale to remove sockets we're to restore - Use *at() helpers once we're changed working dir in bind_unix_sk - Add more debug ouput Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 Jul, 2015 1 commit
-
-
Cyrill Gorcunov authored
It gonna be extende to support relative names. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-