- 16 Sep, 2017 1 commit
-
-
Adrian Reber authored
For the upcoming userfaultfd integration the lazy-pages mode needs to setup the criu infrastructure to read the pages files. Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 30 Aug, 2017 2 commits
-
-
Mike Rapoport authored
The ppc64le docker image has broken /etc/apt/sources.list. A small fixup to it allows running ppc64le tests. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
A static test has to do nothing after test_daemon(). Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 21 Aug, 2017 1 commit
-
-
Pavel Emelyanov authored
The biggest new thing this time is s390x arch support! Also we have several improvements and a set of bugfixes as usual. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 17 Aug, 2017 1 commit
-
-
Pavel Emelyanov authored
Travis statues for master and criu-dev and codacy grade.
-
- 16 Aug, 2017 6 commits
-
-
Dmitry Safonov authored
Since commit ced9c529 ("restore: fix race with helpers' kids dying too early"), we block SIGCHLD in helper tasks before CR_STATE_RESTORE. This way we avoided default criu sighandler as it doesn't expect that childs may die. This is very racy as we wait on futex for another stage to be started, but the next stage may start only when all the tasks complete previous stage. If some children of helper dies, the helper may already have blocked SIGCHLD and have started sleeping on the futex. Then the next stage never comes and no one reads a pending SIGCHLD for helper. A customer met this situation on the node, where the following (non-related) problem has occured: Unable to send a fin packet: libnet_write_raw_ipv6(): -1 bytes written (Network is unreachable) Then child criu of the helper has exited with error-code and the lockup has happened. While we could fix it by aborting futex in the end of restore_task_with_children() for each (non-root also) tasks, that would be not completely correct: 1. All futex-waiting tasks will wake up after that and they may not expect that some tasks are on the previous stage, so they will spam into logs with unrelated errors and may also die painfully. 2. Child may die and miss aborting of the futex due to: o segfault o OOM killer o User-sended SIGKILL o Other error-path we forgot to cover with abort futex To fix this deadlock in TASK_HELPER, as suggested-by Kirill, let's check if there are children deaths expected - if there isn't any, don't block SIGCHLD, otherwise wait() and check if death was on expected stage of restore (not CR_STATE_RESTORE). Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Conflicts: criu/cr-restore.c
-
Pavel Emelyanov authored
This is an extract from Kirill Tkhai's patch 87464739 (restore: Block SIGCHLD during root_item initialization) Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
E.g, if child was killed by SIGSEGV, this message previously was "exited, status=11", as si_code == CLD_DUMPED == 3 in this case will result in (si_code & CLD_KILLED) == (si_code & 1). Which is misleading as you may try to look for exit() calls with 11 arg. Correct if to compare si_code with CLD_*. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
venet is not virtuozzo specific but rather came from openvz, make it so. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
A return value of 0 means end of input, so we need to stop reading from this descriptor. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
In a error case, task_entries->nr_in_progress is set to -1 and we have to handle this case. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 15 Aug, 2017 18 commits
-
-
Pavel Emelyanov authored
Item's thread struct pid is not a pointer in master. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
It is good to know what command were executed. https://github.com/xemul/criu/issues/371Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
It turned out (surprise surprise) that page server exchanges CR_FD_PAGEMAP and CR_FD_SHMEM_PAGEMAP values in ps_iov_msg. The problem is that these constants sit in enum and change their values from version to version %) So here's the fixed version of the protocol including the backward compat checks on all the values that could be met from older CRIUs (we're lucky and they didn't intersect). Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.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
Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Vitaly Ostrosablin authored
There's two issues with this code: 1. Child task is killed by parent faster, than it could print the line. 2. Even if it had time to print it - there would always be 0, because it's called from child process. Obviously, this print was meant to be in parent process. So, let's move it there. Signed-off-by:
Vitaly Ostrosablin <vostrosablin@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Francesco Giancane authored
As of manual page INSTALL.md, it is stated that those variables can be overridden by means of environmental variables. export BINDIR="somedir" export SBINDIR="somedir" export LIBDIR="somedir" export MANDIR="somedir" export INCLUDEDIR="somedir" export LIBEXECDIR="somedir" make install But those settings will not be honored, sticking to default Makefile values. This patch fixes the issue. Signed-off-by:
Francesco Giancane <francescogiancane8@gmail.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Francesco Giancane authored
I tried to build and install the criu package from source. All went well, unless for the install part. In particular, PREFIX=/ DESTDIR=~/build_criu PREFIX=${PREFIX} DESTDIR=${DESTDIR} make install resulted in installing criu packages in ~/build_criu/usr/local/, ignoring PREFIX, even if this variable should be configurable as of manual and GCS. Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Francesco Giancane <francescogiancane8@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
When files are added to the report shutil.copytree is unhappy with lazy-pages.socket. Tell shutil.copytree that it should ignore *.socket. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kirill Tkhai authored
Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Acked-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Otherwise someone can include kerndat.h before config.h and get another kerndat structure. For example, proc_parse doesn't include config.h and Cyrill met this problem. Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Emelyanov authored
There's potential NULL-derefernece in dump_netns_con() -- two xmalloc results are not checked. However, since there's a huge set of these xmallocs, I propose to relax the whole thing with one big xmalloc and xptr_pull() helper. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kirill Tkhai authored
It's unused and it's rewritten in shmem_wait_and_open(), and it just confuses a reader. So, kill it. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com>
-
Alice Frosi authored
For dumping threads we execute parasite code before we collect the floating point registers with get_task_regs(). The following describes the code path were this is done: dump_task_threads() for (i = 0; i < item->nr_threads; i++) dump_task_thread() parasite_dump_thread_seized() compel_prepare_thread() prepare_thread() ### Get general purpose registers ### ptrace_get_regs(ctx->regs) ### parasite code is executed in thread ### compel_run_in_thread(tctl, PARASITE_CMD_DUMP_THREAD) compel_get_thread_regs() ### Get FP and VX registers ### get_task_regs() Since on s390 gcc uses floating point registers to cache general purpose without the -msoft-float option the floating point registers would have been clobbered after compel_run_in_thread(). With this patch we first save all thread registers with task_get_regs() and then call the parasite code. We introduce a new function arch_set_thread_regs() that restores the saved registers for all threads. This is necessary for criu dump --leave-running, --check-only, and error handling. Pre-dump does not require to save the registers for the threads because because only the main thread (task) is used for parsite code execution. The above changes allow us to use all register sets in the parasite code - therefore we can remove -msoft-float on s390. Reviewed-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by:
Alice Frosi <alice@linux.vnet.ibm.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Michael Holzheu authored
This test can be used to verify FP and VX registers on s390: - Verify that "criu restore" sets the correct register sets from "criu dump": $ zdtmp.py run -t zdtm/static/s390x_regs_check - Verify that dumpee continues running with correct registers after parasite injection: $ zdtm.py run --norst -t zdtm/static/s390x_regs_check $ zdtm.py run --norst --pre 2 -t zdtm/static/s390x_regs_check $ zdtm.py run --check-only -t zdtm/static/s390x_regs_check Reviewed-by:
Alice Frosi <alice@linux.vnet.ibm.com> Signed-off-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Michael Holzheu authored
We have to include Makefile.inc earlier in order to use SRCARCH. Signed-off-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 09 Aug, 2017 11 commits
-
-
Adrian Reber authored
The upcoming glibc release renamed 'struct ucontext' to 'struct ucontext_t': https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9;hp=c86ed71d633c22d6f638576f7660c52a5f783d66 Instead of using 'struct ucontext' this patch changes it to the typedef ucontext_t which already exists in older and new versions of glibc. Signed-off-by:
Adrian Reber <areber@redhat.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Adrian Reber authored
The upcoming glibc release renamed 'struct ucontext' to 'struct ucontext_t': https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9;hp=c86ed71d633c22d6f638576f7660c52a5f783d66 Instead of using 'struct ucontext' this patch changes it to the typedef ucontext_t which already exists in older and new versions of glibc. Signed-off-by:
Adrian Reber <areber@redhat.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Adrian Reber authored
The upcoming glibc release renamed 'struct ucontext' to 'struct ucontext_t': https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9;hp=c86ed71d633c22d6f638576f7660c52a5f783d66 Instead of using 'struct ucontext' this patch changes it to the typedef ucontext_t which already exists in older and new versions of glibc. Signed-off-by:
Adrian Reber <areber@redhat.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Adrian Reber authored
Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Gianfranco Costamagna authored
This fixes the ppc64el build failure CC criu/arch/ppc64/sigframe.o In file included from criu/arch/ppc64/sigframe.c:5:0: criu/arch/ppc64/include/asm/types.h:32:0: error: "AT_VECTOR_SIZE_ARCH" redefined [-Werror] #define AT_VECTOR_SIZE_ARCH 6 Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Michael Holzheu authored
The entries in /proc/<pid>/maps look like the following: 3fffffdf000-40000000000 rw-p 00000000 00:00 0 The upper address is the first address that is *not* included in the address range. Our function max_mapped_addr() should return the last valid address for a process, but currently returns the first invalid address. This can lead to the following error message on kernel that have kernel commit ee71d16d22bb: Error (criu/proc_parse.c:694): Can't dump high memory region 1ffffffffff000-20000000000000 of task 24 because kernel commit ee71d16d22bb is missing Fix this and make max_mapped_addr() the last valid address (first invalid address - 1). Reported-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Michael Holzheu authored
We currently define "CFLAGS += -msoft-float -fno-optimize-sibling-calls" in Makefile.compel. Makefile.compel is included into the toplevel Makefile and so changes CFLAGS which are exported to all criu and zdtm Makefiles. We must not use -msoft-float outside the compel files. E.g. otherwise for zdtm we get the following build error: uptime_grow.o: In function `main': /tmp/2/criu/test/zdtm/static/uptime_grow.c:36: undefined reference to `__floatdidf' /tmp/2/criu/test/zdtm/static/uptime_grow.c:36: undefined reference to `__muldf3' /tmp/2/criu/test/zdtm/static/uptime_grow.c:36: undefined reference to `__floatdidf' /tmp/2/criu/test/zdtm/static/uptime_grow.c:36: undefined reference to `__adddf3 Fix this and move the CFLAGS definition to the compel Makefiles. We do this by defining a new flag CFLAGS_PIE that is only used for pie code. Reported-by:
Adrian Reber <areber@redhat.com> Suggested-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Tested-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Michael Holzheu authored
We have to use "debian.jessie" instead of "ubuntu.xenial" because qemu-s390x-static can only run z900 instructions and Ubuntu is built with a more recent architecture level set. We first enable only gcc because there are still some issues with clang. Signed-off-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Michael Holzheu authored
Debian is compiled for z900 - therefore we can't use the "laa" instruction. Fix this and replace "laa" by the older "cs" (compare and swap) loop. Signed-off-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Michael Holzheu authored
The flogr instruction not supported by debian jessie (z900). So replace it by the gcc built-in. Signed-off-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Michael Holzheu authored
Use the "-fno-optimize-sibling-calls" gcc option to prevent GOT relocations caused by gcc versions without the commit "S/390: Fix 64 bit sibcall": * https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233169 Otherwise we get compile errors like: GEN criu/pie/parasite-blob.h Error (compel/src/lib/handle-elf-host.c:572): Unsupported relocation of type 26 Those can be caused by the following relocation types: * R_390_GOTENT (e.g. RHEL7 based systems) * R_390_GOTPCDBL (e.g. Debian Jessie) * R_390_GOT12 (e.g. Debian Jessie) Signed-off-by:
Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-