[CRIU] Restore failed. Exit code: 43

Paschalis Mpeis paschalis.mpeis at ed.ac.uk
Tue Jan 27 04:38:18 PST 2015


>
> My initial thought was to fork the initial process, so as to exploit the
> copy-on-write fork implementation on Linux.
>
> Then the forked process will call the function, and the parent will make
> the dump, by providing the PID of its child.
>
> How does this sound to you? I don't know if its feasible, I 'll just try
> to give it a shot!
>
>

So, I have tried to do what I 've described.

It is based on the code I have previously posted on a Gist.

So, instead of simply dumping before a functions execution, and then
resuming I do the following:
.I open a pipe to synchronise the 2 processes
.I fork
..The child executes
...setsid()
...registers a signal handler
...runs the function
​ daxpy​
...writes something to the pipe (so parent will know when function has
finished exec'ing)
...finally then waits, until a signal is received. When this happens, it
terminates
​
..The parent waits for something in the pipe
So the function was called and therefore the copy-on-write has indeed
copied all the relevant pages/files/etc in the child's process space. This
means that any other irrelevant parts will NOT be included in the images by
CRIU, right?
..then parent dumps and provides the childs PID(using criu_set_pid). I also
set "shell_job"
..finally parent sents a signal to the child, so it can terminate, and
waits/catches the exit code.

​Is my assumption correct, that it will copy the relevant parts only on the
image files? Is what I am doing feasible?

Capture seems okay, and also resuming from capture. However, on restore I
get the following error:

> (00.018260)  10618: Trying to read socket queues image§
> (00.018276)  10618: Error (tty.c:193): tty: Found slave peer index 4
> without correspond master peer


​I 've opened the line tty.c:193, but I 've already have set setsid on
child process, and shell_job​

​on parent, which execs the actual dump​.

​Cheers,
Paschalis​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150127/739c3ef5/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150127/739c3ef5/attachment.ksh>


More information about the CRIU mailing list