- 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 22 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>
-
Dmitry Safonov authored
I wounder, was it ever working on ARM32? Maybe I don't get this code right? Cc: Christopher Covington <cov@codeaurora.org> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
k_rtsigset_t has two words on ARM32. That for-cycle should be optimized to no-op on other archs by compiler where _KNSIG_WORDS is 1. So, if a child blocks the signal which number is > 32 in this mask, and other signals properties are the same - it will not have it blocked after C/R. Impact: fix for signals restoring on ARM32. Cc: Christopher Covington <cov@codeaurora.org> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Impact: cleaning-up Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
instead if doing lseek Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Acked-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
Fix CID 163578 (#1 of 1): Structurally dead code (UNREACHABLE). The pagemap image would never be closed because of stupid code order in the original patch (674583f2: criu: page-read: read pagemaps at open time and keep them in memory). Fix that. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Mike Rapoport authored
Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
If we print "0x" with width specifier, it may go away which is not nice: (00.005258) 21858 fdinfo 0: pos: 0x 0 flags: 100002/0 (00.004589) Collected: ino 0x 51fd family 2 type 1 port 64000 state 10 src_addr 0.0.0.0 This patch is generated with the following sed one-liner: find ./* -type f -print0 | xargs -0 sed -i '/pr.*/s/0x%\([0-9]\+\)/%#\1/g' Don't know if we should change all 0x%*anything* printing to %#*anything*, but where we use field width I think we should. Impact: Just bothered by eyes, cleanup. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Stanislav Kinsburskiy authored
FS type is required to distinguish between local files and remove ones, which will be restored via SPFS and thus has to be created first. Signed-off-by:
Stanislav Kinsburskiy <skinsbursky@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
It isn't required, __NR_memfd_create is defined in syscall-codes.h. With this patch, we can run all tests in travis-ci, because there a kernel has support of memfd, but __NR_memfd_create isn't defined in installed headers Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Batalov authored
Signed-off-by:
Eugene Batalov <eabatalov89@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Batalov authored
sys/syscall.h only defines syscall number constants but not syscall function. Signed-off-by:
Eugene Batalov <eabatalov89@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Adrian Reber authored
The package libcap-dev(el) was listed as required to run the tests. It is, however, also required to build CRIU. Move the package to the right place to fix the printed information. Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Sebastian Pipping authored
.. to address protobuf 3.x proto-c warnings Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Tikhomirov authored
s/batch/bunch/ Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Instead of doing this crazy thing where we pass the number of zombies back from the restorer blob to the main restore thread, let's just calculate the number in the main restore thread when we need it. Also, note that this patch shifts the location of this calculation: we used to do a decrement of nr_in_progress when we waited() on a zombie, to sort of lie about the fact that they did go through CR_STATE_RESTORE_SIGCHLD, but since we're waiting on them anyway explicitly, there's no reason to do all this hackery. Let's just calculate the number once in the right place and be done with it. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
this avoids: ===================== Run zdtm/static/socket-tcpbuf6 in h ====================== Makefile:295: target 'mnt_enablefs.pid' given more than once in the same rule Start test Makefile:295: target 'mnt_enablefs.pid' given more than once in the same rule ./socket-tcpbuf6 --pidfile=socket-tcpbuf6.pid --outfile=socket-tcpbuf6.out Run criu dump Run criu restore Wait for zdtm/static/socket-tcpbuf6 to die for 0.100000 Wait for zdtm/static/socket-tcpbuf6 to die for 0.200000 Removing dump/zdtm/static/socket-tcpbuf6/27 ===================== Test zdtm/static/socket-tcpbuf6 PASS ===================== in every test. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.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>
-
- 05 Jul, 2016 11 commits
-
-
Stanislav Kinsburskiy authored
Signed-off-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Kolomeetz authored
restore_mountpoint() should never be called without saved mountpoint. If this happens, this is bug in script logic, which needs fixing. https://jira.sw.ru/browse/PSBM-44207Signed-off-by:
Eugene Kolomeetz <klm@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Kolomeetz authored
In such case, we must not proceed: without saved mountpoint, we risk losing data when restarting automount service (think about tmpfs). Currently, zero will be returned as exit status of preceeding echo. https://jira.sw.ru/browse/PSBM-44207Signed-off-by:
Eugene Kolomeetz <klm@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Kolomeetz authored
When we want to just execute command (without capturing output), we must not do it via $(cmd). With such form, shell first gets output of 'cmd', and then evaluates it. If this is empty string, it is successfully executed. If not empty, all breaks down. https://jira.sw.ru/browse/PSBM-44207Signed-off-by:
Eugene Kolomeetz <klm@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Kolomeetz authored
When read bultin detects EOF, it sets empty string as value of specified variable, and returns non-zero exit code. So we can rely just on exit code, and not check variable value. This is standard approach. https://jira.sw.ru/browse/PSBM-44207Signed-off-by:
Eugene Kolomeetz <klm@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
This function may catch overflow near INT_MAX, so it becomes return strange fd, like fd = -2147483648. Fix that. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Tikhomirov authored
v2: fix compilation warning for snprintf v3: check iptables has xtables locks support once on init v4: switch opts to kdat Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Tikhomirov authored
when run several tests simultaneousely it seem that some iptables commands can intersect and if we do not wait xtables lock criu fails: (00.009263) Running iptables [iptables -t filter -A INPUT --protocol tcp --source 127.0.0.1 --sport 55074 --destination 127.0.0.1 --dport 8880 -j DROP] Another app is currently holding the xtables lock. Perhaps you want to use the -w option? (00.014367) Error (util.c:660): exited, status=4 (00.014416) Error (netfilter.c:88): Iptables configuration failed: Success (00.014432) ---------------------------------------- (00.014461) Error (cr-dump.c:1297): Dump files (pid: 24) failed with -1 https://ci.openvz.org/job/CRIU/job/CRIU-virtuozzo/branch/criu-dev/3/Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Kolomeetz authored
Now readlink is called in host context, this is obviously wrong. Signed-off-by:
Eugene Kolomeetz <klm@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Eugene Kolomeetz authored
Let's use $(...) form, it is more readable, and used in other places. Signed-off-by:
Eugene Kolomeetz <klm@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-