- 13 Jun, 2017 10 commits
-
-
Pavel Emelyanov authored
This routine cleans any file remap. ✓ travis-ci: success for Sanitize initialization bits Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Ghost remaps allocate path with shmalloc. Add comment why this is such. ✓ travis-ci: success for Sanitize initialization bits Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
We used to have users counter on remap which was incremented each time this routine was called. Nowadays remaps are managed w/o the refcounting and we no longer need global mutex protection for it. ✓ travis-ci: success for Sanitize initialization bits Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
There's no need in separate call to prepare_procfs_remaps(). All remaps are collected one step earlier and we can do open_remap_dead_process() right at once. Also rename the latter routine. ✓ travis-ci: success for Sanitize initialization bits Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
This just moves all the deprecated code into one place. ✓ travis-ci: success for Sanitize fsnotify legacy code Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
The lists are only needed to collect marks (deprecated) into notify objects. The latter ones are stored in fdsec hash, so for this legacy case we can find them there. ✓ travis-ci: success for Sanitize fsnotify legacy code Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Marks images were merged into regular in 1.3. ✓ travis-ci: success for Sanitize fsnotify legacy code Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Wrong helper is called. ✓ travis-ci: success for Sanitize fsnotify legacy code Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kir Kolyshkin authored
We only needed it for kernel 3.19. Apparently, Ubuntu 14.04.5 comes with a kernel from 16.04 (i.e. 4.4), so we can disable this workaround! Anyway, just in case, let's do it conditionally. While at it, slightly improve the comment. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kir Kolyshkin authored
asciidoc pulls in a lot of dependencies, most of those are not needed as we just use it to convert txt to a man page. Adding --no-install-recommended option to apt-get makes it skip those additional dependencies. The only needed package is xmlto, so let's add it explicitly. This results is some 50 packages being skipped (mostly TeX/LaTeX and some extra SGML tools), wow! Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 22 May, 2017 2 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
This reverts commit a8409956, that got into master by mistake. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 19 May, 2017 21 commits
-
-
Cyrill Gorcunov authored
Currently we support restoring opened /dev/tty reference if only control terminal belongs to the same process, ie no inheritance is allowed. Thus we should refuse to dump in such scenario otherwise restore will fail. Reported-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Currently it is only used to get a file descriptor to the mount namespace root, but if we have only one mntns, we can open "/". Cc: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Processes can be restored in another mntns, so mnt_id will be useless in this case. If mntns isn't dumped, we have to dump a path to a mount point. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
There were kernel bug with 32-bit mmap() returning 64-bit pointer. The fix is in Torvalds master, will be released in v4.12 kernel. Checkpointing after v4.9 kernel works good, but restoring will result in application which will mmap() 64-bit addresses resulting in segfault/memory corruptions/etc. As our policy is fail on dump if we can't restore on the same target, error checkpointing for v4.9. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
The idea is simple. Everyone has to wait its children, a restore is interrupted if we found abandoned zombie. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
We currently can batch pagemap entries into page-read list, but will need to queue them into per-pstree_entry one. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
The pages.img will need to get opened one more time w/o the pagemap.img. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kir Kolyshkin authored
1. Commit 8b99809a ("compel: make plugins .a archives") changed the suffix of compel plugins, so this test no longer compiles. 2. "compel plugins" can print auxiliary plugins now, let's use it. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kir Kolyshkin authored
As we have more than 1 working plugin right now, let's implement the TODO item for "compel plugins" command. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Ubuntu 14.04 (Travis) doesn't have it. Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Looks-good-to: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Looks-good-to: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kir Kolyshkin authored
Apparently, setup.py from distutils interprets --root= option without an argument as "--root=." and we end up with what is described in https://github.com/xemul/criu/issues/309. Fix is to prepend DESTDIR value (if any) to --prefix argument. v2: fix uninstall as well v3: same code, resent via gmail Reported-by:
Juraj Oršulić <juraj.orsulic@fer.hr> Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
soccr.h: After previous patch <linux/types.h> is not needed anymore, <netinet/tcp.h> is needed as we test for it in feature tests, i.e., struct tcp_repair_window is declared there. Also drop forward-declaration of (struct libsoccr_sk) - it's declared again below. soccr.c: Sort headers by name so errors like twice-including errno.h will not happen again. Also remove assert.h. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
As uint32_t already has occupied the header, use it for all 32-bit unsigns. That will allow to drop additional include <linux/types.h>. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
When running 'cirt x dir rss' one will see the way pagemap chunks are scatered across the VMs of processes. Sample output from the env00 zdtm test is 22 400000 / 1 00400000 / 5 /root/criu/test/zdtm/static/env00 604000 / 2 00604000 / 1 /root/criu/test/zdtm/static/env00 00605000 / 1 /root/criu/test/zdtm/static/env00 853000 / 1 00853000 / 33 7faba2d4b000 / 6 7faba2d4b000 / 4 /usr/lib64/libc-2.22.so 7faba2d4f000 / 2 /usr/lib64/libc-2.22.so 7faba2d51000 / 2 7faba2d51000 / 4 7faba2d54000 / 1 ~ 7faba2f64000 / 3 7faba2f64000 / 3 7faba2f74000 / 1 7faba2f74000 / 1 7faba2f75000 / 2 7faba2f75000 / 1 /usr/lib64/ld-2.22.so 7faba2f76000 / 1 /usr/lib64/ld-2.22.so 7faba2f77000 / 1 7faba2f77000 / 1 7fffb4de3000 / 3 7fffb4de2000 / 70 7fffb4e24000 / 2 ~ 7fffb4e27000 / 1 ~ 7fffb4f6a000 / 2 7fffb4f6a000 / 2 Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
The same as for Checkpointing - we need to call 32-bit syscall for compatible tasks here to correctly restore compat_robust_list, not robust_list. Note: I check here restorer's *task* arg for compatible mode, not restorer *thread* arg. As changing application's mode during runtime is very rare thing itself, application that runs different bitness threads is most likely not present at all. If we ever meet such application, this could be improved. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
The kernel keeps two different pointers for 32-bit and 64-bit futex lists: robust_list and compat_robust_list in task_struct. So, dump compat_robust_list for ia32 tasks. Note: this means that one can set *both* compat_robust_list and robust_list pointers by using as we're here 32-bit and 64-bit syscalls. That's one of mixed-bitness application questions. For simplification (and omitting more syscalls), we dump here only one of the pointers. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Check for presence of robust futex list is in the reality (futex_rla_len != 0). That does code on dumping, in get_task_futex_robust_list(): > ret = syscall(SYS_get_robust_list, pid, &head, &len); > if (ret < 0 && errno == ENOSYS) { [..] > len = 0; [..] > } [..] > info->futex_rla_len = (u32)len; And in images: futex_rla_len == 0 means that futex is not present. So, we don't need additional restorer's parameter `has_futex' which is always true, remove it. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Cleanup: use nr, provided by compel. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 10 May, 2017 7 commits
-
-
Pavel Emelyanov authored
Modules pre-load is also slow, but guarding this code with the presence of criu.kdat cache file seems reasonable. Or course, one may unload the needed modules by hands, but such smart user may as well remove the /run/criu.kdat file :) Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Doing kerndat checks on every criu start is way too slow. We need some way to speed this checks up on a particular box. As suggested by Andre, Dima and Mike let's try to keep the collected kdat bits into some tmpfs file. Keeping it on tmpfs would invaludate this cache on every machine reboot. There have been many suggestions how to generate this file, my proposal is to create it once the kdat object is filled by criu, w/o any explicit command. Optionally we can add 'criu kdat --save|--drop' actions to manage this file. v2: * don't ignore return code of write() (some glibcs complain) * unlink tmp file in case rename failed v3: * add one more magic into kerndat_s which is the 'date +%s' * ignore any errors opening or saving cache. Only size/magic mismatch matters (and result in dropping the cache) * cache file path is Makefile-configurable (RUNDIR) * don't save cache if kerndat auto-detection failed v4: * Use ?= for RUNDIR definition. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
v2: When uffd is present, the reported features may still be 0, so we need one more bool for uffd syscall itself. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
Introduce 3-state mode and check them always. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kirill Tkhai authored
Some get_status() methods may allocate data, because not all of the fields in /proc/[pid]/status file have the fixed size. For example, NSpid, which size may vary. Introduce new method free_status() in counterweight for such type get_status() methods. it will be called in case of we go to try_again and need to free allocated data. Also, introduce data parameter for a use in the future. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kirill Tkhai authored
The goal of this function is to compare everything except caps, but caps size is took to compare. It's wrong, there must be used offsetof(struct proc_status_creds, cap_inh) instead. Also, sigpnd may be different too. v3: Move excluding sigpnd from comparation in this patch (was in another patch). Reorder fields in seize_task_status(). Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-