OpenVZ Forum


Home » Mailing lists » Devel » c/r:read pipe error when restart
c/r:read pipe error when restart [message #41811] Tue, 22 February 2011 05:53 Go to next message
kadyz is currently offline  kadyz
Messages: 2
Registered: February 2011
Junior Member
hi all:
I have a very simple script test for c/r,but I'm unable to get a
restart to complete. I get both linux-cr and user-cr code from the git
a few weeks ago, and i think they are the newest. I'm using RHEL5.4,
x86-64. Here are my steps:

# mkdir -p /cgroup
# mount -t cgroup -o freezer cgroup /cgroup
# mkdir /cgroup/1

# cat > foo.sh << EOF
#!/bin/sh
echo $$ > /cgroup/1/tasks
while true; do
echo "this is a test."
sleep 1s
done
EOF

# nsexec -tgcmpiUP pid foo.sh
about to clone with 38020000
this is a test.
this is a test.
...

/* the following steps go on in another terminal */
# cat pid
29750
# echo FROZEN > /cgroup/1/freezer.state
# cat /cgroup/1/tasks
29750
29772
# checkpoint 29750 -l clog -o image.out
# kill -9 29750
# echo THAWED > /cgroup/1/freezer.state

(It seems ok for now, but when I try restart, the problem comes.)

# restart -l rlog -i image.out
read pipe: Bad file descriptor
Killed

(I have tried lots of times, and the rlog is usually empty, but I
also see msg once in it)
# cat rlog
[err -512][pos 0][E @ ckpt_read_obj_type:426]Expecting to read type 1

(when I add -d -v, it comes like this)
# restart -d -v -i image.out
<31720>number of tasks: 2
<31720>number of vpids: 0
<31720>total tasks (including ghosts): 3
<31720>pid 99: inherit sid 0
<31720>pid 99: creator set to 1
<31720>pid 301: orphan session 1
<31720>pid 301: creator set to 302
<31720>====== TASKS
<31720> [0] pid 1 ppid 0 sid 0 creator 0 placeholder 302
<31720> [1] pid 99 ppid 1 sid 0 creator 1 prev 302
<31720> [2] pid 301 ppid 1 sid 1 creator 302 G
<31720> [3] pid 302 ppid 1 sid 1 creator 1 next 99 D
<31720>............
<31720>task[0].vidx = 1 (depth 0, rpid 1)
<31720>task[1].vidx = 2 (depth 0, rpid 99)
<31720>subtree (existing pidns)
<31720>fork child vpid 1 flags 0x1
<31721>====== PIDS ARRAY
<31721>[0] pid 1 ppid 301 sid 301 pgid 301
<31721>[1] pid 99 ppid 301 sid 301 pgid 301
<31720>task 1 forking with flags 11 numpids 1
<31721>............
<31720>task 1 pid[0]=0
read pipe: Bad file descriptor
Killed


(I found a similar discussion from
http://openvz.org/pipermail/devel/2010-July/025274.html , but it
didn't work for me. Because the code I use has fixed them all.)


Look forward and very appreciate for your helps!

Thank you!

Kadyz
Re: c/r:read pipe error when restart [message #42114 is a reply to message #41811] Tue, 01 March 2011 14:42 Go to previous message
kadyz is currently offline  kadyz
Messages: 2
Registered: February 2011
Junior Member
I have found the reason, it's the same like
http://openvz.org/pipermail/devel/2011-January/026408.html

<http://openvz.org/pipermail/devel/2011-January/026408.html>hope Oren or the
other developers can fix it as soon as possible.

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.

2011/2/22 kadyz <allen303allen@gmail.com>

> hi all:
> I have a very simple script test for c/r,but I'm unable to get a
> restart to complete. I get both linux-cr and user-cr code from the git
> a few weeks ago, and i think they are the newest. I'm using RHEL5.4,
> x86-64. Here are my steps:
>
> # mkdir -p /cgroup
> # mount -t cgroup -o freezer cgroup /cgroup
> # mkdir /cgroup/1
>
> # cat > foo.sh << EOF
> #!/bin/sh
> echo $$ > /cgroup/1/tasks
> while true; do
> echo "this is a test."
> sleep 1s
> done
> EOF
>
> # nsexec -tgcmpiUP pid foo.sh
> about to clone with 38020000
> this is a test.
> this is a test.
> ...
>
> /* the following steps go on in another terminal */
> # cat pid
> 29750
> # echo FROZEN > /cgroup/1/freezer.state
> # cat /cgroup/1/tasks
> 29750
> 29772
> # checkpoint 29750 -l clog -o image.out
> # kill -9 29750
> # echo THAWED > /cgroup/1/freezer.state
>
> (It seems ok for now, but when I try restart, the problem comes.)
>
> # restart -l rlog -i image.out
> read pipe: Bad file descriptor
> Killed
>
> (I have tried lots of times, and the rlog is usually empty, but I
> also see msg once in it)
> # cat rlog
> [err -512][pos 0][E @ ckpt_read_obj_type:426]Expecting to read type 1
>
> (when I add -d -v, it comes like this)
> # restart -d -v -i image.out
> <31720>number of tasks: 2
> <31720>number of vpids: 0
> <31720>total tasks (including ghosts): 3
> <31720>pid 99: inherit sid 0
> <31720>pid 99: creator set to 1
> <31720>pid 301: orphan session 1
> <31720>pid 301: creator set to 302
> <31720>====== TASKS
> <31720> [0] pid 1 ppid 0 sid 0 creator 0 placeholder 302
> <31720> [1] pid 99 ppid 1 sid 0 creator 1 prev 302
> <31720> [2] pid 301 ppid 1 sid 1 creator 302 G
> <31720> [3] pid 302 ppid 1 sid 1 creator 1 next 99 D
> <31720>............
> <31720>task[0].vidx = 1 (depth 0, rpid 1)
> <31720>task[1].vidx = 2 (depth 0, rpid 99)
> <31720>subtree (existing pidns)
> <31720>fork child vpid 1 flags 0x1
> <31721>====== PIDS ARRAY
> <31721>[0] pid 1 ppid 301 sid 301 pgid 301
> <31721>[1] pid 99 ppid 301 sid 301 pgid 301
> <31720>task 1 forking with flags 11 numpids 1
> <31721>............
> <31720>task 1 pid[0]=0
> read pipe: Bad file descriptor
> Killed
>
>
> (I found a similar discussion from
> http://openvz.org/pipermail/devel/2010-July/025274.html , but it
> didn't work for me. Because the code I use has fixed them all.)
>
>
> Look forward and very appreciate for your helps!
>
> Thank you!
>
> Kadyz
>
Previous Topic: [PATCH 1/4] userns: let clone_uts_ns() handle setting uts-&gt;user_ns
Next Topic: CfP 6th Workshop on Virtualization in High-Performance Cloud Computing (VHPC'11)
Goto Forum:
  


Current Time: Tue Jun 17 08:14:19 GMT 2025

Total time taken to generate the page: 0.01418 seconds