2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 13:28:27 +00:00
Kinsbursky Stanislav acf604c60c restorer: close log file before detaching from crtools
v2: it's toom risky to jump to address equal to line numbet (there could be
valid executable code). So now jump is done to 0 address and %sp encodes line
number (32 most significant bits) and error code (32 least significant bits).

There is a race between log close by process being restoring and opened file
desctriptors check in zdtm test suite - crtools can exit and compare file
descriptors before detached restored process will perform all the rest tasks
(including close of the log) and execute final system call:

 |--- dump/sleeping00/8578/dump.fd        2012-02-20 14:31:31.246096000 +0300
 |+++ dump/sleeping00/8578/restore.fd     2012-02-20 14:31:31.418095999 +0300
 |@@ -1,4 +1,5 @@
 |
 | 0 -> /dev/null
 | 1 -> /dev/null
 |+1023 -> /root/crtools/test/dump/sleeping00/8578/restore.log
 | 2 -> /dev/null

The solution is to close log in restorer before final command received. But
this leads to another problem: we have to inform somehow about possible errors
afterwards This is done by forced segmentation fault and looks like this
(dmesg):

pipe00[4678]: segfault at 0 ip 00007f4c8ab77d02 sp 000002ed00000001 error 4

Where %sp encodes line number (32 most significant bits) and error code (32
least significant bits).

Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-02-21 20:32:18 +04:00
2012-02-20 14:23:28 +04:00
2012-02-20 14:23:28 +04:00
2012-02-07 18:37:03 +04:00
2012-01-19 22:00:11 +04:00
2011-12-05 14:11:05 +04:00
2012-02-20 17:10:16 +04:00
2012-02-11 11:58:06 +04:00
2012-02-17 15:24:43 +04:00
2012-01-23 01:43:10 +04:00
2012-02-20 14:23:28 +04:00
2012-02-15 13:33:46 +04:00
2011-09-23 12:00:45 +04:00
2012-02-16 22:05:28 +04:00
2012-01-29 16:26:36 +04:00
2012-02-20 14:23:28 +04:00
2012-02-02 21:22:20 +04:00
2012-02-20 14:23:28 +04:00

crtools
=======

An utility to checkpoint/restore tasks.

Some code snippets are borrowed from

 - Linux kernel (http://kernel.org/)
 - git (http://git-scm.com/)
 - kvm-tools (https://github.com/penberg/linux-kvm)
 - ptrace-parasite (https://code.google.com/p/ptrace-parasite/)

Many thanks to these projects.

Licensed under GPLv2 (http://www.gnu.org/licenses/gpl-2.0.txt)
Description
No description provided
Readme 81 MiB
Languages
C 86%
Python 6.1%
Java 2.6%
Shell 2.6%
Makefile 2%
Other 0.7%