- 04 Jul, 2018 2 commits
-
-
Dmitry Safonov authored
It's actually number of bytes spliced, not pages. And I bet (unsigned long) suits the purpose more than (int). Signed-off-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
It's unused since commit fd3f33f5 ("headers: image.h -- Drop unused entries"), so let's remove it completely. Signed-off-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 21 May, 2018 1 commit
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 18 May, 2018 1 commit
-
-
Andrei Vagin authored
It is a typo fix which was added on rebase. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 17 May, 2018 15 commits
-
-
Dmitry Safonov authored
Let's warn about binary needed for `install` target. Before: [root@localhost criu]# make install GEN crit.1 make[1]: *** [Makefile:49: crit.1] Error 127 make: *** [Makefile.install:32: install-man] Error 2 After: [root@localhost criu]# make install /bin/sh: line 1: xmlto: command not found make[1]: *** [Makefile:32: check] Error 1 make: *** [Makefile.install:32: install-man] Error 2 Fixes: #481 Reported-by: treaki@gmail.com Signed-off-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Otherwise, tests dependencies are not considered for build. Add an error in Makefile.inc so this won't happen again. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Reported-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
This reverts commit dcafa78b96084216e32b757be62b7fa8aebbdd87. I've found that we already include deps in Makefile.inc, was to fast on the first attempt and overlooked this. (the include just doesn't work like it should yet..) The origin patch may be just dropped before preparing master's merge. Signed-off-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
CID 190174 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS) 6. negative_returns: fd is passed to a parameter that cannot be negative. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
CID 190175 (#1 of 1): Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: goto err;. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
>>> CID 190177: Integer handling issues (NEGATIVE_RETURNS) >>> rpc_sk is passed to a parameter that cannot be negative. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
CID 84654 (#1 of 1): Resource leak (RESOURCE_LEAK) 6. leaked_handle: Handle variable fd going out of scope leaks the handle. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
(00.566486)pie: 1: seccomp: mode 0 on tid 1 Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
The purpose of the num_children field in 'struct lazy_pages_info' was to prevent closing the page-read while there are still active processes that share it. It did work for the case when handling of the child processes finished before the parent process. However, if the parent lpi is closed first, we've got a dangling pointer at lpi->parent. The obvious solution is to use simple reference counting. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
It is possible that notification about restore finish arrives at the same time with a fork event. In such case we return to epoll_run_rfds without resetting the poll_timeout and then we'll keep polling for events indefinitely. To avoid this, we reset the poll_timeout to 0 as soon as we know that restore is finished. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
The only use for the userfault file descriptor after the process exited is for debug logs. Using negative value instead of 0 makes logs more readable. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Although they are the same, xfree() looks more consistent with other code Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
There are a lot of lines, which are longer than 79: (04.331172)pie: 1: Error (criu/pie/restorer.c:460): seccomp: Unexpected tid -> (04.331172)pie: 1: 1 != 1 Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
(00.566486)pie: 1: seccomp: mode 0 on tid 1 (00.566601)pie: 1: Error (criu/pie/restorer.c:460): seccomp: Unexpected tid -> (00.566601)pie: 1: 1 != 1 (00.566601)pie: 1: 1 != 1 (00.566639)pie: 1: Error (criu/pie/restorer.c:1817): Restorer fail 1 Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrey Vagin authored
Otherwise we can skip an error and then criu will hang on switching to the next stage. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 15 May, 2018 1 commit
-
-
Andrei Vagin authored
kerndat_try_load_cache() fills kdat from /run/criu.kdat, so it will contain some trash, if criu.kdat isn't compatible with the current version of criu. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 14 May, 2018 9 commits
-
-
Vitaly Ostrosablin authored
Compiler wants arguments, explicitly casted to (long long) for %llx specifier. Signed-off-by:
Vitaly Ostrosablin <vostrosablin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Vitaly Ostrosablin authored
This is test that triggers a bug with ghost files, that was resolved in patch "Don't fail if ghost file has no parent dirs". Signed-off-by:
Vitaly Ostrosablin <vostrosablin@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
This test creates a pty pair, creates a test process and sets a slave pty as control terminal for it. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Here is one of often mistakes: int funcX() { int ret; ret = funcA() if (ret < 0) goto err; if (smth) goto err; // return 0 !!!! err: return ret; } Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kirill Tkhai authored
There is no reasons we need this cleanup code in generic restore_one_task(), so let's move it for better readability. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andy Tucker authored
When dumping a process with a large number of open files, dump_task_files_seized() processes the fds in batches. If dump_one_file() results in an error, processing of the current batch is stopped but the next batch (if any) will still be fetched and the error value is overwritten. The result is a corrupt dump image (the fdinfo file is missing a bunch of fds) which results in restore failure. Also close all received fds after an error (previously the skipped ones were left open). Signed-off-by:
Andy Tucker <agtucker@google.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
log_init() opens a log file. We want to have criu and kernel versions in each log file, so it looks reasonable to print them from log_init(). Without this patch, versions are not printed, if criu is called in the swrk mode. Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Acked-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
We have three code paths, where we call log_set_loglevel() and in all these places, we need to initialize libraries logging engines, so it is better to do this from one function. For example, currently we forgot to initialize soccr logging for criu swrk. Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Acked-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 12 May, 2018 11 commits
-
-
Andrei Vagin authored
(00.027596) mnt: Dumping mountpoints (00.027600) mnt: 90: 2f:/ @ ./dev/pts (00.027614) mnt: 130: 2e:/ @ ./run tar: /proc/self/fd/1: Cannot open: Not a directory tar: Error is not recoverable: exiting now Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
iptables creates /run/xtables.lock file and we want to have it per-test. (00.332159) 1: Running iptables-restore -w for iptables-restore -w Fatal: can't open lock file /run/xtables.lock: Permission denied Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Starting with iptables 1.6.2, we have to use the --wait option, but it doesn't work properly with userns, because in this case, we don't have enough rights to open /run/xtables.lock. (00.174703) 1: Running iptables-restore -w for iptables-restore -w Fatal: can't open lock file /run/xtables.lock: Permission denied (00.192058) 1: Error (criu/util.c:842): exited, status=4 (00.192080) 1: Error (criu/net.c:1738): iptables-restore -w failed (00.192088) 1: Error (criu/net.c:2389): Can't create net_ns (00.192131) 1: Error (criu/util.c:1567): Can't wait or bad status: errno=0, status=65280 This patch workarounds this problem by mounting tmpfs into /run. Net namespaces are restored in a separate process, so we can create a new mount namespace and create new mounts. https://github.com/checkpoint-restore/criu/issues/469 Cc: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Cc: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
iptables 1.6.2 fails without /run, because it tries to create the /run/xtables.lock file Test output: ================================ Fatal: can't open lock file /run/xtables.lock: No such file or directory 23:29:06.098: 4: ERR: netns-nf.c:21: Can't set input rule (errno = 2 (No such file or directory)) 23:29:06.098: 3: ERR: test.c:315: Test exited unexpectedly with code 255 Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Joel Nider authored
This function is an analogue to vsprintf(), and is used in very much the same way. The caller expects the modified string pointer to be pointing to a null-terminated string. Signed-off-by:
Joel Nider <joeln@il.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
We have a few issues with fc28. For example: https://github.com/checkpoint-restore/criu/issues/469Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
In file included from s390x_gs_threads.c:10:0: ../lib/lock.h: In function 'mutex_lock': ../lib/lock.h:148:4: error: implicit declaration of function 'pr_perror' [-Werror=implicit-function-declaration] pr_perror("futex"); Reported-by: Mr Jenkins Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
We shouldn't set MAKEFLAGS by the following reasons: 1. User may want to specify some make parameter (e.g., `-d` for debug) 2. We lose parallel build. No `-j` is passed to submake and it looks like, gnu/make will not deal with parallel recursive make if $(MAKEFLAGS) is unset back. Easy to verify: Add `sleep 3` to build rule in Makefile.inc and you'll find only one sleep process at a time. After the patch if you specify say `-j5` to make - you'll have 5 sleep processes. Reverts: commit e9beed7b ("build: zdtm -- Add implicit rules into zdtm building"). Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Let's drop usage of COMPILE.c, OUTPUT_OPTION. It will allow run submake with -R. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
$(MAKEFLAGS) already contains -r -R and --no-print-directory: those flags are being added in include.mk.. which is included two lines above. There is no comment and I see no big sense in erasing $(MAKEFLAGS), rather than adding those flags. So I considered this as a typo. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-