OpenVZ Forum


Home » Mailing lists » Devel » Userspace checkpoint/restart hack: cryo
Re: Userspace checkpoint/restart hack: cryo [message #29875 is a reply to message #29834] Mon, 28 April 2008 09:47 Go to previous messageGo to previous message
Cedric Le Goater is currently offline  Cedric Le Goater
Messages: 443
Registered: February 2006
Senior Member
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@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
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [patch 11/12][CFQ-cgroup] Control service tree: Main functions
Next Topic: [PATCH] cryo: Improve socket support: add UDP and IPv6 - V2
Goto Forum:
  


Current Time: Mon Jul 21 02:01:12 GMT 2025

Total time taken to generate the page: 0.08976 seconds