From: Erik P. <epa...@cs...> - 2000-12-04 20:16:46
|
Hi, I've been working on getting checkpointing working under user-mode-linux, and last night I found an interesting utility that can checkpoint any currently-running process all in userspace. /proc gives you most of what you need, and the little bit it doesn't (current registers, position info for the currently open fd's) it swipes out of the process with ptrace. Now, I could easily believe that the checkpointing wouldn't work under UML, so I'm planning on adding the bits to /proc it needs so it doesn't have to mess with ptrace(). However, I don't see any reason the restart code included here wouldn't work - basically it creates a new stack to work out of, mmap()'s in the old process, opens up the old files and seeks in them, and restores the registers. The problem is that it segfaults restoring the last page of memory. Maybe it's something wonky with the way UML handles it's stack, or maybe there's a bug in the mmap() part of UML. The code I was trying was here: ftp://ftp.gin.cz/pub/local/feela/src/freezer.tgz It builds two apps, freeze and warm. I would 'freeze' a process that was just doing a for(i=0;i<1000;i++){printf(i);sleep(1);} under the host kernel and then 'warm' it under UML. Thanks! -Erik |