[CRIU] Shell Dump Failure Question

Saied Kazemi saied at google.com
Tue Feb 17 11:45:49 PST 2015


Hi Pavel and Cyrill,

When I follow the instructions at http://www.criu.org/Simple_loop, I can
successfully dump the shell process.  But when I run just a shell (either
with -i or without -i), criu dump fails although the ptys seem the same as
those of test.sh.  I made sure that CONFIG_LEGACY_PTYS is not set for my
kernel (I'm running Ubuntu 14.04.1 LTS) and CONFIG_UNIX98_PTYS is set.
Please see below.

[Terminal A]

$ cat > test.sh <<-EOF
> #!/bin/sh
> while :; do
>     sleep 1
>     date
> done
> EOF
$ chmod +x test.sh
$ ./test.sh
...

[Terminal B]

$ ps -C test.sh
  PID TTY          TIME CMD
 1653 pts/1    00:00:00 test.sh
$ sudo ls -l /proc/1653/fd
total 0
lrwx------ 1 saied saied 64 Feb 17 11:22 0 -> /dev/pts/1
lrwx------ 1 saied saied 64 Feb 17 11:22 1 -> /dev/pts/1
lr-x------ 1 saied saied 64 Feb 17 11:22 10 -> /home/saied/test.sh
lrwx------ 1 saied saied 64 Feb 17 11:22 2 -> /dev/pts/1
$ sudo criu dump -v4 -D /tmp/criu_img -o dump.log -t 1653 --shell-job &&
echo OK
OK
$

[Terminal A]

$ sh
$

[Terminal B]

$ ps -C sh
  PID TTY          TIME CMD
 1869 pts/1    00:00:00 sh
$ sudo ls -l /proc/1869/fd
total 0
lrwx------ 1 saied saied 64 Feb 17 11:24 0 -> /dev/pts/1
lrwx------ 1 saied saied 64 Feb 17 11:24 1 -> /dev/pts/1
lrwx------ 1 saied saied 64 Feb 17 11:24 10 -> /dev/tty
lrwx------ 1 saied saied 64 Feb 17 11:24 2 -> /dev/pts/1
$ sudo criu dump -v4 -D /tmp/criu_img -o dump.log -t 1869 --shell-job &&
echo OK
$ sudo grep Error /tmp/criu_img/dump.log
(00.005486) Error (tty.c:226): tty: Can't obtain ptmx index: Inappropriate
ioctl for device
(00.005562) Error (cr-dump.c:1616): Dump files (pid: 1869) failed with -1
(00.007974) Error (cr-dump.c:1979): Dumping FAILED.
$ uname -r
3.13.11.8
$  grep LEGACY_PTYS /boot/config-$(uname -r)
# CONFIG_LEGACY_PTYS is not set
$ grep UNIX98_PTYS /boot/config-$(uname -r)
CONFIG_UNIX98_PTYS=y
$

Any idea why dump fails?

Thanks,

--Saied
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150217/77d017e3/attachment.html>


More information about the CRIU mailing list