- 01 Aug, 2016 29 commits
-
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Error (arch/x86/crtools.c:83): Failed to get auxval, err: 0 ==2103== Conditional jump or move depends on uninitialised value(s) ==2103== at 0x46F073: seize_wait_task (ptrace.c:238) ==2103== by 0x437592: cr_exec (cr-exec.c:137) ==2103== by 0x41F6FC: main (crtools.c:789) Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
[root@fc22-vm criu]# ./criu/criu exec -t 27573 dup21 3 0 Error (cr-exec.c:164): Unknown syscall [dup21] [root@fc22-vm criu]# echo 0 0 Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
It is required for the other/exec test Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Tikhomirov authored
Before these patch one need to zero-init char buffer before giving it to sysctl_op, it can be convenient to remove these restriction. Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
In a previous patch, we skipped zombies, but our pre-dump doesn't support stopped tasks (Why does it not support them?), so let's handle tasks which have parasite_ctl. Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
The directory that the tests run in on jenkins is: /var/lib/jenkins/workspace/CRIU/CRIU-restore-sibling/criu-dev/test/zdtm/static which makes the whole path too long. This commit makes the whole path: /var/lib/jenkins/workspace/CRIU/CRIU-restore-sibling/criu-dev/test/zdtm/static/del_standalone_un.test/sock which is 105 chars, less than 108 of sun_path. Closes #191 Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
We already have 3 bool-s on this struct and are going to have the 4th %) Time to turn this into classical flags. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
When freezing, sometimes we can fail due to a timeout. If this is the case, sometimes it can be a kernel bug where tasks are deadlocked. It would be useful to know the kernel stacks to see where tasks are hung if they are. Note that this is racy: a task might still freeze while we are logging the various stacks, so we might miss things. But in the case of a deadlock, it should catch what's wrong. v2: log all stacks instead of just the unfrozen tasks Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000435744 in cr_pre_dump_finish (ret=0) at cr-dump.c:1452 1452 pr_info("\tPre-dumping %d\n", ctl->pid.virt); (gdb) bt #0 0x0000000000435744 in cr_pre_dump_finish (ret=0) at cr-dump.c:1452 #1 cr_pre_dump_tasks (pid=pid@entry=24) at cr-dump.c:1556 #2 0x000000000041f665 in main (argc=<optimized out>, argv=0x7ffda430e818, envp=<optimized out>) at crtools.c:753 https://github.com/xemul/criu/issues/189 Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Stanislav Kinsburskiy authored
WIth current code we have smth like 1) If file was opened with O_WRONLY, this mode is simply lost. 2) If file was opened with O_RDWR, but mapping is private, resulting mode will be O_RDONLY The correct place to get fd open flags for file mappings is /proc/<pid>/map_files. An attempt tp speculate on "shared" and "maywrite" bits doesn't garantee, that file will be opened with correct permissions on restore. Here is an example: Process mapping (read/write): # cat /proc/481943/maps | grep 7f7108077000-7f7108078000 7f7108077000-7f7108078000 rw-p 00001000 00:35 7 <snip> 1) Before suspend: # ls -l /proc/481427/map_files/7f7108077000-7f7108078000 lrw------- <snip> /proc/481427/map_files/7f7108077000-7f7108078000 -> <snip> 2) After restore: # ls -l /proc/481943/map_files/7f7108077000-7f7108078000 lr-------- <snip> /proc/481943/map_files/7f7108077000-7f7108078000 -> <snip> Write bit is lost. This patch set vma->e->fdflags as /proc/<pid>/map_files/<vma> open mode. Signed-off-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
In case of `criu exec`, we do not insert parasite daemon inside task. So, we don't have the daemon which could unmap itself and by that reason, we should unmap remote_map with hands (raw syscall). Cc: Andrew Vagin <avagin@virtuozzo.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
It's quite boring to add your test to .gitignore and one may forget to do that boilerplate -- put this labour on computer. For that I make real targets for tests instead of implicit and add test's binary name to .gitignore on make stage. Also added *.pidns to .gitignore -- do not wanna do this as separate trivial patch. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
static/transition tests are built with implicit rules. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Currently we mark a mount namespaces as populated when a target process (ns_pid) switches into it. But if a process inherited the right namespace from a parent, it doesn't call do_restore_task_mnt_ns() and a namespace can remain unmarked. af55c059 ("mount: fix a race between restoring namespaces and file mappings") After this patch we could simplify logic around ns_populated. Currently it's a futex, but nodoby waits on it. We can set ns_populated when we are going to close namespace descriptors. To avoid additional locks, we can do this when all task pass the forking stage and don't start the next stage. v2: add a comment why we wait a CR_STATE_FORKING stage Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
v2: open two sockets, one "on top" of the other v3: also drop unnecessary unlink(), we can just rely on rename() Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
For standalone unix sockets, listen() will fail if we haven't called bind() with an actual address. If we remove the name on dump, we won't call bind(), and thus sockets in this state will fail to restore. v2: temporarily rename a unix socket out of the way if necessary in order to bind() correctly and then delete it (e.g. when there are two unix sockets bound "on top" of each other) v3: remove extra unlink(), do the real unlink() in bind_unix_sk() so we only need to do it once Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
This is suitable for debugging problems. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
/proc/locks is racy with adding/removing locks, so we may lose lock on check. Use fdinfo's list of locks instead. v2: Feature 'fdinfo_lock' Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
apparently got lost in rebase :) Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
It's required because we specify a file instead of a block device. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
It's required for collection full report for tests which are executed in separate mount namespaces. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Cc: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
* keep pointer to parasite_ctl in dmp_info to simplify pre_dump_finish and make pre_dump and dump interfaces the same * pass boolean rather than pp_ret pointer to parasite_dump_pages_seized to distinguish delayed and immediate dump more explicitly Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
When collection of dumpee pages is followed by any parasite operation, we cannot share iovs between parasite args area and page-pipe. As a bonus we get some simplification of dump_one_shmem. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
[xemul: This is an extract from the patch "page-xfer: dump compatible iovec" to make rebase simpler ] Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 11 Jul, 2016 1 commit
-
-
Pavel Emelyanov authored
This time we have a bunch of new features, such as more cgroup stuff, AutoFS, coredump out of images, etc. Virtuozzo guys have released vz7-rtm, and fixed a lot of bugs in criu while doing it :) Plus some ancient stuff removed. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 09 Jul, 2016 6 commits
-
-
Pavel Emelyanov authored
Runaway from 66299a00Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Adrian Reber authored
It seems that the different libc (musl) which Alpine Linux uses produces different errors than the usual glibc. This patch fixes most include errors. Two errors are not yet resolved on Alpine Linux's libc (musl): * proc_parse.c: In function 'parse_posix_timers': proc_parse.c:2125:34: error: 'SIGEV_THREAD_ID' undeclared (first use in this function) timer->spt.it_sigev_notify = SIGEV_THREAD_ID; proc_parse.c:2125:34: note: each undeclared identifier is reported only once for each function it appears in Seems difficult to fix as including <linux/signal.h>, which provides this #define, generates more different error messages related to time.h and linux/time.h collisions. It is not yet clear if additional guards would help in the header files. * fsnotify.c: In function 'open_by_handle': fsnotify.c:107:9: error: implicit declaration of function 'open_by_handle_at' [-Werror=implicit-function-declaration] return open_by_handle_at(fd, arg, O_PATH); The function open_by_handle_at() is not provided by Alpine Linux's libc (musl). This patch resolves the following errors/warnings and has been tested on RHEL7(x86_64/powerpc64le) and Fedora 24: cr-service.c: In function 'cr_service': cr-service.c:1082:26: error: passing argument 2 of 'accept' from incompatible pointer type [-Werror=incompatible-pointer-types] sk = accept(server_fd, &client_addr, &client_addr_len); ^ In file included from /usr/include/fortify/sys/socket.h:20:0, from cr-service.c:11: /usr/include/sys/socket.h:301:5: note: expected 'struct sockaddr * restrict' but argument is of type 'struct sockaddr_un *' int accept (int, struct sockaddr *__restrict, socklen_t *__restrict); ^ cc1: all warnings being treated as errors files.c: In function 'open_transport_fd': files.c:845:19: error: passing argument 2 of 'bind' from incompatible pointer type [-Werror=incompatible-pointer-types] ret = bind(sock, &saddr, sun_len); ^ In file included from /usr/include/fortify/sys/socket.h:20:0, from files.c:12: /usr/include/sys/socket.h:298:5: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *' int bind (int, const struct sockaddr *, socklen_t); ^ cc1: all warnings being treated as errors In file included from fsnotify.c:18:0: /usr/include/sys/poll.h:1:2: error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror=cpp] #warning redirecting incorrect #include <sys/poll.h> to <poll.h> ^ cc1: all warnings being treated as errors In file included from /root/criu/criu/include/timerfd.h:7:0, from /root/criu/criu/include/restorer.h:18, from arch/x86/crtools.c:16: /root/criu/criu/include/files.h:43:14: error: field 'stat' has incomplete type struct stat stat; In file included from arch/x86/vdso-pie.c:6:0: /root/criu/criu/include/syscall.h:22:66: error: unknown type name 'loff_t' extern long sys_pread (unsigned int fd, char *buf, size_t count, loff_t pos) ; ^ /root/criu/criu/include/syscall.h:83:31: error: unknown type name 'clockid_t' extern long sys_timer_create (clockid_t which_clock, struct sigevent *timer_event_spec, kernel_timer_t *created_timer_id ^ /root/criu/criu/include/syscall.h:88:38: error: unknown type name 'clockid_t' extern long sys_clock_gettime (const clockid_t which_clock, const struct timespec *tp) ; ^ In file included from netfilter.c:5:0: /usr/include/wait.h:1:2: error: #warning redirecting incorrect #include <wait.h> to <sys/wait.h> [-Werror=cpp] #warning redirecting incorrect #include <wait.h> to <sys/wait.h> ^ cc1: all warnings being treated as errors pie/restorer.c: In function '__export_restore_task': pie/restorer.c:1276:23: error: 'LOCK_EX' undeclared (first use in this function) ret = sys_flock(fd, LOCK_EX); ^ pie/restorer.c:1276:23: note: each undeclared identifier is reported only once for each function it appears in pie/restorer.c:1310:23: error: 'LOCK_UN' undeclared (first use in this function) ret = sys_flock(fd, LOCK_UN); ^ sk-unix.c: In function 'open_unixsk_standalone': sk-unix.c:1169:19: error: passing argument 2 of 'connect' from incompatible pointer type [-Werror=incompatible-pointer-types] if (connect(sk, &addr, sizeof(addr.sun_family))) { ^ In file included from /usr/include/fortify/sys/socket.h:20:0, from sk-unix.c:1: /usr/include/sys/socket.h:299:5: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *' int connect (int, const struct sockaddr *, socklen_t); ^ cc1: all warnings being treated as errors c/criu.c: In function 'criu_local_set_parent_images': c/criu.c:169:26: error: implicit declaration of function 'strdup' [-Werror=implicit-function-declaration] opts->rpc->parent_img = strdup(path); Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Hopefully this would/will trigger more of these types of bugs; I took this list straight from Adrian's report. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> CC: Adrian Reber <adrian@lisas.de> Tested-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
We seem to have some reports of: Error (cgroup.c:1193): cg: Failed writing c *:* m b *:* m c 1:3 rwm c 1:5 rwm c 1:7 rwm c 5:0 rwm c 5:2 rwm c 1:8 rwm c 1:9 rwm c 136:* rwm c 10:229 rwm to devices//lxc/c7/devices.allow: Argument list too long so let's try and write these lines one by one, instead of simply advancing the pointer along in the string. It's probably cleaner this way anyway :) Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> CC: Adrian Reber <adrian@lisas.de> Tested-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrey Vagin authored
CC parasite-syscall.o parasite-syscall.c: In function ‘parasite_memfd_exchange’: parasite-syscall.c:1223:28: error: ‘__NR_memfd_create’ undeclared (first use in this function) ret = syscall_seized(ctl, __NR_memfd_create, &sret, Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 07 Jul, 2016 4 commits
-
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
The kernel only reads the first line of any write(), so let's write line by line. Right now as far as I know devices.deny is the only cgroup property which must be written line by line. I could move this code to restore_cgroup_prop if we expect more of these, though. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Batalov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Batalov authored
--link-remap opt is obligatory for unlink_regular00 test. Without it CRIU dump will fail because it won't be able to create link remaps. Signed-off-by:
Eugene Batalov <eabatalov89@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-