Userspace checkpoint/restart hack: cryo

Cedric Le Goater clg at fr.ibm.com
Mon Apr 28 02:47:09 PDT 2008


Dave Hansen wrote:
> A guy named Marc Vertes wrote this as a little demonstration of
> checkpoint/restart.  I've been using it to experiment with
> checkpoint/restart.  I thought it might be of some use as we move
> subsystems to being helped by the kernel to checkpoint and restart.
> 
> It's ptrace-based, and stuck on i386 for now.  It can probably be ported
> elsewhere without too much trouble.    It doesn't support *anything
> fancy like multuiple tasks :).  It has the advantage of being very
> feature-bare, and I think it is pretty easy to hack on.  Whatever c/r
> support we add to the kernel could easily be added on and tested.
> 
> http://userweb.kernel.org/~daveh/cryo/cryo-001.tar.gz
> 
> Usage:
> 	cr -p `pidof task` > checkpoint.cryo 
> 	cr -r < checkpoint.cryo
> 
> If anyone else has something simpler or easier to hack on, I'm all ears.

Indeed. It looks simple enough.

do you have some kernel requirement ? I run Fedora 8

Here's my first try on a program calculating decimal of PI : 

	$ ./cr -p `pidof pi1` > pi1.cryo
	attaching to pid: 11082
	[11087 cr.c:243 getfdinfo()] n : 0
	WARNING (sci.c:242) unexpected signal for 11082: 11
	[11087 sci.c:228 ptrace_waitsyscall()] WTERMSIG(status) : 11
	ERROR (sci.c:383) ptrace_getregs(11082, 0xbfe4a3d0) errno=3: No such process
	./cr[0x8051f10]
	./cr[0x8049ce9]
	./cr[0x804b7d2]
	./cr[0x804f75b]
	***STOP***

other terminal :

	$ pi1 20000
	pi1 - 20000 digits, 78.1 kbytes
	Segmentation fault (core dumped)

Thanks,

C.

Signed-off-by: Cedric Le Goater <clg at fr.ibm.com>
--- Makefile~   2008-04-25 19:05:57.000000000 +0200
+++ Makefile    2008-04-28 09:02:50.000000000 +0200
@@ -7,6 +7,3 @@ all : $(BIN) $(MAN1)
 
 #cr: cr.o utils.o list_hash.o ptrace_linux_x86.o
 cr: cr.o utils.o list_hash.o sci.o injlib.o
-
-include ../version.mk
-include ../c.mk


More information about the Containers mailing list