- 14 May, 2018 8 commits
-
-
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 32 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>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Service descriptros can be moved in a child process. v2: handle errors of install_service_fd() properly Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Include deps files to recompile tests when dependency has changed. 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>
-
Andrey Vagin authored
man 2 futex: In the event of an error (and assuming that futex() was invoked via syscall(2)), all operations return -1 and set errno to indicate the cause of the error. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
Though LOG_FD_OFF < IMG_FD_OFF, get_service_fd(LOG_FD_OFF) is > than get_service_fd(IMG_FD_OFF), see __get_service_fd, so the check here should be twisted. Also add bug_on to track possible __get_service_fd change which can break these check again. We have a problem when USERNSD_SK replaces LOG_FD_OFF, latter when writing to log, instead we actually send crazy commands to usernsd, which fails to handle them and BUGs or crashes. https://jira.sw.ru/browse/PSBM-83472 Also we had similar problem when __userns_call receives bad repsonse, likely it has the same background: https://api.travis-ci.org/v3/job/352164661/log.txt fixes commit 129bb14611c3 ("files: Prepare clone_service_fd() for overlaping ranges.") v2: move BUG_ON to main() to check it only once, use min+1 and max-1 Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Acked-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
These fixes compilation on VZ7: https://ci.openvz.org/job/CRIU/job/CRIU-virtuozzo/job/criu-dev/3605/console https://jira.sw.ru/browse/PSBM-83713Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Unnamed temporary files are restored as ghost files. If O_TMPFILE is set for the open() syscall, the pathname argument specifies a directory, but criu gives a path to a ghost file. (00.107450) 36: Error (criu/files-reg.c:1757): Can't open file tmp/#42274874 on restore: Not a directory Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
man 2 open: ... O_TMPFILE (since Linux 3.11) Create an unnamed temporary file. The pathname argument speci‐ fies a directory; an unnamed inode will be created in that directory's filesystem. Anything written to the resulting file will be lost when the last file descriptor is closed, unless the file is given a name. ... Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radoslaw Burny authored
__builtin_clz(0) leads to undefined behaviour: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html Set nr = 1 directly to avoid this. Link: https://github.com/checkpoint-restore/criu/issues/470Signed-off-by:
Radoslaw Burny <rburny@google.com> Acked-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
It fails too often due to installing gcc-7. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Sometimes we see errors like this: criu/cr-restore.gcda:Merge mismatch for function 106 It proabably means that this gcda file was corrupted. According to the gcc man page, the -fprofile-update=atomic should fix this problem. v2: this options appered in gcc7, so we need to install it. Reported-by: Mr Travis CI Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Make sure we handle various corner cases: * we received less pages than requested * the request was capped because of unmap/remap etc * the process has exited underneath us Currently we are freeing the request once we've found the address to use with uffd_copy(). Instead, let's keep the request object around, use it to properly calculate number of pages we pass to uffd_copy() and then re-add tailing range (if any) to the IOVs list. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Instead of merging unfinished requests with child's IOVs we queued them into parent's IOV list. Fix it. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Commit 9cb20327aa4 ("return to epoll_wait after completing forks") was only half way there. Adding the other half. 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 when pages request from the remove source arrive, part of the memory range covered by the request would be already gone because of madvise(MADV_DONTNEED), mremap() etc. Ensure we are not trying to uffd_copy more than we are allowed. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
If we get fork() event just before transferring last IOV of the parent process, continuing to background fetch after completing fork event handling will cause lazy-pages daemon to exit and nothing will monitor the child process memory. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Since the memory mapping is now split between ->iovs and ->reqs lists, any update to memory layout should take into account both lists. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-