[CRIU] Restore failed. Exit code: 43

Pavel Emelyanov xemul at parallels.com
Tue Jan 27 04:45:26 PST 2015


On 01/27/2015 03:38 PM, Paschalis Mpeis wrote:
>     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?

No, CRIU dumps all the process state including the pages that are cow-ed with parent.

> ..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

Hm... This means that set_shell_job() was not set. It should be done on both -- dump and restore.

> ​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​
> 
> 
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
> 



More information about the CRIU mailing list