I have found the reason, it's the same like <a href="http://openvz.org/pipermail/devel/2011-January/026408.html">http://openvz.org/pipermail/devel/2011-January/026408.html</a><div><br></div><div><a href="http://openvz.org/pipermail/devel/2011-January/026408.html"></a>hope Oren or the other developers can fix it as soon as possible.</div>
<div><br></div><div>bad news is, the restart is still failed, is it possible that the version I download can not work indeed, or can anyone tell me where I'm wrong.<br><br><div class="gmail_quote">2011/2/22 kadyz <span dir="ltr"><<a href="mailto:allen303allen@gmail.com">allen303allen@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">hi all:<br>
I have a very simple script test for c/r,but I'm unable to get a<br>
restart to complete. I get both linux-cr and user-cr code from the git<br>
a few weeks ago, and i think they are the newest. I'm using RHEL5.4,<br>
x86-64. Here are my steps:<br>
<br>
# mkdir -p /cgroup<br>
# mount -t cgroup -o freezer cgroup /cgroup<br>
# mkdir /cgroup/1<br>
<br>
# cat > foo.sh << EOF<br>
#!/bin/sh<br>
echo $$ > /cgroup/1/tasks<br>
while true; do<br>
echo "this is a test."<br>
sleep 1s<br>
done<br>
EOF<br>
<br>
# nsexec -tgcmpiUP pid foo.sh<br>
about to clone with 38020000<br>
this is a test.<br>
this is a test.<br>
...<br>
<br>
/* the following steps go on in another terminal */<br>
# cat pid<br>
29750<br>
# echo FROZEN > /cgroup/1/freezer.state<br>
# cat /cgroup/1/tasks<br>
29750<br>
29772<br>
# checkpoint 29750 -l clog -o image.out<br>
# kill -9 29750<br>
# echo THAWED > /cgroup/1/freezer.state<br>
<br>
(It seems ok for now, but when I try restart, the problem comes.)<br>
<br>
# restart -l rlog -i image.out<br>
read pipe: Bad file descriptor<br>
Killed<br>
<br>
(I have tried lots of times, and the rlog is usually empty, but I<br>
also see msg once in it)<br>
# cat rlog<br>
[err -512][pos 0][E @ ckpt_read_obj_type:426]Expecting to read type 1<br>
<br>
(when I add -d -v, it comes like this)<br>
# restart -d -v -i image.out<br>
<31720>number of tasks: 2<br>
<31720>number of vpids: 0<br>
<31720>total tasks (including ghosts): 3<br>
<31720>pid 99: inherit sid 0<br>
<31720>pid 99: creator set to 1<br>
<31720>pid 301: orphan session 1<br>
<31720>pid 301: creator set to 302<br>
<31720>====== TASKS<br>
<31720> [0] pid 1 ppid 0 sid 0 creator 0 placeholder 302<br>
<31720> [1] pid 99 ppid 1 sid 0 creator 1 prev 302<br>
<31720> [2] pid 301 ppid 1 sid 1 creator 302 G<br>
<31720> [3] pid 302 ppid 1 sid 1 creator 1 next 99 D<br>
<31720>............<br>
<31720>task[0].vidx = 1 (depth 0, rpid 1)<br>
<31720>task[1].vidx = 2 (depth 0, rpid 99)<br>
<31720>subtree (existing pidns)<br>
<31720>fork child vpid 1 flags 0x1<br>
<31721>====== PIDS ARRAY<br>
<31721>[0] pid 1 ppid 301 sid 301 pgid 301<br>
<31721>[1] pid 99 ppid 301 sid 301 pgid 301<br>
<31720>task 1 forking with flags 11 numpids 1<br>
<31721>............<br>
<31720>task 1 pid[0]=0<br>
read pipe: Bad file descriptor<br>
Killed<br>
<br>
<br>
(I found a similar discussion from<br>
<a href="http://openvz.org/pipermail/devel/2010-July/025274.html" target="_blank">http://openvz.org/pipermail/devel/2010-July/025274.html</a> , but it<br>
didn't work for me. Because the code I use has fixed them all.)<br>
<br>
<br>
Look forward and very appreciate for your helps!<br>
<br>
Thank you!<br>
<font color="#888888"><br>
Kadyz<br>
</font></blockquote></div><br></div>