[CRIU] Restore failed. Exit code: 43

Pavel Emelyanov xemul at parallels.com
Tue Jan 27 04:57:36 PST 2015


On 01/27/2015 03:48 PM, Paschalis Mpeis wrote:
> 
> 
> On Tue, Jan 27, 2015 at 12:05 PM, Pavel Emelyanov <xemul at parallels.com <mailto:xemul at parallels.com>> wrote:
> 
>     On 01/26/2015 08:05 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.
> 
>     This would work, but will anyway dump the whole process. In order to dump only what it relevant
>     to a single function... hmm... you should either explore the binary with disassembler or...
>     maybe the memory tracked would help. You reset the tracker, then start working. Then you
>     call criu to dump the process and dump only what memory has changed. This will include only
>     what was touched by the function.
> 
> 
> ​So, I should reset the bits of the used memory pages, so CRIU will dump only the "dirty" ones?

Yes and no. Currently CRIU knows how to work with memory tracked, but the
implementation of it is pretty strict -- you should provide criu with the
"parent" image. In your case you do the single dump, so there's no parent
image and criu will always dump all the memory.

> Or I should modify parts also parts of the dump functionality?​

Yes. Look at the mem.c generate_iovs() function. It generates the bitmap
of pages that should be taken into the image.

>  
> 
>     And on restore time you should create the process and ask CRIU to repopulate only part of
>     it. But this functionality is not yet there, criu should be patched to allow for this.
> 
> 
> ​Since
>  the images include only what is relevant to the function, and also the code after the dump
> just executes the function and terminates, why it would require extra patches for restore?

Because criu on restore recreates the whole process from scratch. We currently
don't have the functionality to restore only a part of the process.

Thanks,
Pavel




More information about the CRIU mailing list