[CRIU] [PATCH RFC v3 0/4] Process Migration using sockets

Katerina Koukiou k.koukiou at googlemail.com
Wed Aug 10 06:19:34 PDT 2016


Changes v2 -> v3
Fixed some issues that Mike Rapoport pointed out.
=>Use init_pagemaps with opts.remote by choosing a "magic number"
to estimate amount of memory required to hold the entire pagemap in memory.
=>Fix get_pagemap so that it properly treats zero holes when in restore more.
A few more minor fixes.

=>Added testing for --remote option in zdtm.py. (Should I drop the tests Rodrigo had
created?)
For the latter I faced some problems, so any help there would be appreciated.
In particular:
When running the test the first test passes and then the second fails, like this:
The exact same happens with other test, not only with fork test.

./zdtm.py run --test zdtm/transition/fork --remote
=== Run 1/1 ================

======================== Run zdtm/transition/fork in h =========================
Start test
./fork --pidfile=fork.pid --outfile=fork.out
criu: no process found
Adding image cache
Adding image proxy
Run criu dump
Run criu restore
Wait for zdtm/transition/fork to die for 0.100000
Removing dump/zdtm/transition/fork/24
======================== Test zdtm/transition/fork PASS ========================

======================== Run zdtm/transition/fork in ns ========================
Start test
./fork --pidfile=fork.pid --outfile=fork.out
Adding image cache
Adding image proxy
Run criu dump
Run criu restore
=[log]=> dump/zdtm/transition/fork/7376/1/restore.log
------------------------ grep Error ------------------------
(00.093454)      1: Error (criu/img-remote-proto.c:292): Unable to connect to local socket: /home/karen/criu/test/dump/zdtm/transition/fork/7376/1/image-cache.sock: No such file or directory
(00.093463)      1: Error (criu/img-remote.c:75): Error opening local connection for seccomp.img:dump/zdtm/transition/fork/7376/1: No such file or directory
...

The strange thing is that by looking the restore.log for the second test, the image-cache.sock
file seems to exist and read_remote_image_connection succeeds for some of the images.
Moreover, image-cache.log does not indicate any error.
Any idea what is wrong here?
Please ask to send the full logs if needed.

Last, inside zdtm.py I need to force kill image-cache and image-proxy before continuing
to the next test.
I have used "killall -9 criu" as at that point only these criu processes can be
childs of the python script. However it's bad practice, so feel free to propose
another way to get rid of the two processes.

Regards,
Katerina


Katerina Koukiou (4):
  mem: implement image proxy/image cache
  mem: Introduce image-proxy/image-cache & remote option
  test: Add testcases for image-proxy/image-cache
  zdtm: Add testing for --remote option

 criu/Makefile.crtools           |   4 +
 criu/cr-dump.c                  |  17 +
 criu/crtools.c                  |  30 +-
 criu/image-desc.c               |   4 +-
 criu/image.c                    |  28 +-
 criu/img-cache.c                | 170 ++++++++++
 criu/img-proxy.c                | 119 +++++++
 criu/img-remote-proto.c         | 697 ++++++++++++++++++++++++++++++++++++++++
 criu/img-remote.c               | 278 ++++++++++++++++
 criu/include/cr_options.h       |   3 +
 criu/include/image.h            |   1 +
 criu/include/img-remote-proto.h |  84 +++++
 criu/include/img-remote.h       |  79 +++++
 criu/include/protobuf-desc.h    |   4 +
 criu/page-xfer.c                |  26 +-
 criu/pagemap.c                  |  53 ++-
 criu/protobuf-desc.c            |   1 +
 images/Makefile                 |   1 +
 images/remote-image.proto       |  20 ++
 test/proxy-cache/Makefile       |  29 ++
 test/proxy-cache/loop.sh        |   8 +
 test/proxy-cache/run.sh         | 106 ++++++
 test/zdtm.py                    |  36 ++-
 23 files changed, 1773 insertions(+), 25 deletions(-)
 create mode 100644 criu/img-cache.c
 create mode 100644 criu/img-proxy.c
 create mode 100644 criu/img-remote-proto.c
 create mode 100644 criu/img-remote.c
 create mode 100644 criu/include/img-remote-proto.h
 create mode 100644 criu/include/img-remote.h
 create mode 100644 images/remote-image.proto
 create mode 100644 test/proxy-cache/Makefile
 create mode 100755 test/proxy-cache/loop.sh
 create mode 100755 test/proxy-cache/run.sh

-- 
2.7.3



More information about the CRIU mailing list