- 09 Aug, 2013 3 commits
-
-
Andrey Vagin authored
Here are two case: * check that a vma grows after restoring * check that a vma can be restored if its guard page was overlapped by another vma. Currently criu isn't able to dump/restore this test case. Who wants to fix this issue? Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currently criu sends data to the page server, but it doesn't get any feedback, so it can't be sure that all data have been accepted. This patch adds a flush command, which requires an answer from the page server. This command is sent before disconnecting. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
I've just occasionally tried to run criu on old openvz kernel and the error message was looking somehow strange to me | Error (kerndat.c:39): Can't stat piggie: No such file or directory Lets produce some more detailed error text. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 07 Aug, 2013 5 commits
-
-
Andrew Vagin authored
We have already tried to prevent generating core files for zombies: commit 6da52216 Author: Andrey Vagin <avagin@openvz.org> Date: Fri Jul 12 18:14:23 2013 +0400 restore: set the zero limit for RLIMIT_CORE But it doesn't work if a core file is sent into a pipe. This functionality is used by the abrt daemon for example. This patch uses more direct way, it unsets the dumpable flag with help of PR_SET_DUMPABLE. v2: remove the previous hack Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Yicheng Qin authored
The checking helps debug unexpected failures. The patch is useful to debug test failure. Chdir() may meet failure if the process does not have enough permissioin. Then, it cannot rename in-progress output file to output file. Finally, test script cannot catch 'PASS' flag from the output file and record it as failure. As the result, the test fails without any error message. Signed-off-by:
Yicheng Qin <yichengq@google.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Yicheng Qin authored
Label 'out' and chdir() below it are just redundant. Remove them to make test simple. Signed-off-by:
Yicheng Qin <yichengq@google.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Yicheng Qin authored
struct sockaddr_un Struct sockaddr_un is used in program for bind() to listen on a local file. Path is one of its attributes and only has 108-byte size. It may happen that the path is too small to contain the whole real path, which contains current working directory now. This may lead to two sockets listening on the same file. So, we change the path to be "/tmp". It ensures that filename cannot exceed the limit. Additionally, to run it well with namespace, make new directory named 'tmp' under constructed root. Signed-off-by:
Yicheng Qin <yichengq@google.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Yicheng Qin authored
Path generated in the test is copied into sun_path attribute in struct sockaddr_un. Additional check on whether sun_path can contain the whole path is added. It is useful because if sun_path can only contain the first part of the path, all sockadd_un will point to the same location, which leads to error. Signed-off-by:
Yicheng Qin <yichengq@google.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 06 Aug, 2013 4 commits
-
-
Andrey Vagin authored
This test uses systemtap to replace random parasite command on invalide command. The parasite code received this command and should rollback itself. CRIU didn't recived ack, should understand that something wrong and exits. The systemtap inverts exit code of criu. "zdtm.sh -d" is used for executing tests and testing that the state of processes don't corrupted. criu should be compiled without optimizations (make DEBUG=1) v2: randomize a command, which will be replaced Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
The packet can be retransmited after dumping the tcp connect. The first one is that the connection is blocked for only one direction. The second one is that TCP timers continue work during dumping and they can send packets. tcp_timestamp is saved for each tcp connections and then it’s restored. So if a packet is sent after dumping, its timestamps is saved by another side and this timestamp is sent back in the next packet as the tsecr parameter. If this packet is received after restoring, it looks like a packets from the future. https://bugzilla.openvz.org/show_bug.cgi?id=2676Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Yicheng Qin authored
/dev/null Clear the umask when creating /dev/null and restore the umask after the creation. Mountpoints test unlinks and makes new /dev/null inside by mknod. But in some linux, there is default umask, e.g., as 022. It means that /dev/null created directly cannot be wrote by group and other users. It is not reasonable because /dev/null should be accessable to all users. Signed-off-by:
Yicheng Qin <yichengq@google.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Jul, 2013 2 commits
-
-
Pavel Emelyanov authored
The difficulty is that this code is required in both -- pie and non-pie contexts. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Will put more things there. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 05 Aug, 2013 3 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
for that the mount point is bind-mounted in a temporary place. v2: * check, that the fs you get access to at the end is _really_ the one you wanted to * use switch_ns/restore_ns helpers v3: reuse code of __open_mountpoint and a few small cleanups Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
When CRIU wants to dump content, it checks that nothing is overmounted. The list of children for such mounts must be empty, but these lists are filled during constructing a tree of mounts. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 31 Jul, 2013 1 commit
-
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 25 Jul, 2013 2 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 24 Jul, 2013 2 commits
-
-
Andrey Vagin authored
All scripts are executed for all actions, so if one of them failed for any actions, crtools returns with non-zero code. E.g: ./zdtm.sh -d ns/static/env00 Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
page-server is forked and the child is running in background, so a bash variable $! contains PID of the last command, which is executed in background. Currently it's tcpdump and zdtm.sh is waiting it and never returns back. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 22 Jul, 2013 3 commits
-
-
Cyrill Gorcunov authored
v2: - Use special opcode 32 to distinguish error cases - Use --scripts for snapshot testings v3: - test for both 32 and 0 for error code v4: (by avagin@) - restore from the last snapshot v5: - update comment https://bugzilla.openvz.org/show_bug.cgi?id=2583Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This is usefull if one needs to do some final action before checkpoint is complete. For example in case of online migration one may provide a script which would check the restore procedure on remote note ended without errors, thus the script returns zero code and criu simply kills running instance of application. In turn, if migration failed, the script can return nonzero code and criu won't kill the application but continue its execution instead. https://bugzilla.openvz.org/show_bug.cgi?id=2583Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Sometimes these tests don't pass successfully and we need more information to investigate the problem. https://bugzilla.openvz.org/show_bug.cgi?id=2676Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 18 Jul, 2013 1 commit
-
-
Ruslan Kupreev Руслан authored
Add target lib to Makefile for criu library. Created directory lib and add there Makefile and criu.c - skelettons for criu library. Signed-off-by:
Ruslan Kupreev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 17 Jul, 2013 2 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The version, that might not wait for ack is always called with "async" flag set. Cleanup things according to this. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 16 Jul, 2013 12 commits
-
-
Pavel Emelyanov authored
... fixing erroneous goto on error path :) Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
There are parts dumping which is common to thread and task, and this stuff is represented by parasite_dump_thread structure. Merge this into parasite_dump_misc and facror out dumping code. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
There are 3 users of one -- remote syscall, thread dump and daemon run. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
PTRACE_SETSIGMASK takes pointer on mask of blocked signals, but sigmask is already pointer. Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
If a kernel supports PTRACE_SETSIGMASK, criu don't need to execute PARASITE_CMD_INIT and PARASITE_CMD_DAEMONIZE, because the frist command is used only for blocking signals. If criu crashes between these commands, a process state will be corrupted, because all signals remain blocked. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We use two commands to get task registers safely. The first command blocked signals, then crtools dumped registers and all per-thread data and the the second command unblocks signals. Currently signals can be blocked with help SETSIGMASK, so we need only one command to dump per-thread data. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Currenly we can restore blocking signals with help ptrace, so if registers are restored after command, a process state will not be corrupted if criu crashes. Same as with previous patch -- at the end there will be only two trap commands, so this is OK. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Pending signals should be saved, so signals should be blocked. Signals are blocked for EACH command, because a chance of destroying a process state should be a small as possible. At the end there will only two "trapped" commands -- to dump thread and to start daemon in parasite, so this doesn't add significant overheads. If crtools is killed between two commands, a dumped process will run continue. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-