[CRIU] Questions about CRIU.

Pavel Emelyanov xemul at parallels.com
Mon Jul 7 11:44:07 PDT 2014


On 07/07/2014 07:29 PM, Fabio Giangrande wrote:
> Hello. I have some questions about the project CRIU for you. I searched in the archive of mails of CRIU and on the site http://www.criu.org, but I haven't found answer for these requests, so I wonder if you could kindly clarify me about.
> 
> 1. When we restore processes, we have to give to every process the same pid that has previously.
>    If we restore the process hierarchy from init(1), a namespace is created automatically for 
>    avoid duplicate pids. Instead, when we don't restore the process hierarchy from init, how can
>    we avoid problems with duplicate pids?

Well, pid namespace is only created if on dump tasks lived in it. Otherwise tasks
are created in the namespace criu lives in. And yes, pids conflict may occur and
should be expected/handled by caller. In particular, if you restore the whole system
early on boot pids won't conflict.

> 2. To solve the problem of pending signals, we can use the system call rt_sigqueueinfo() 
>    to send a signal to process restored. But we can only use siginfo_t records with a 
>    negative SI_CODE. So, this isn't a problem for the restored process, that now have a
>    signal with a negative SI_CODE?

We patched the kernel some (quite long already) time ago to accept any codes when
sent to self: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=66dd34ad

Thus -- no problems should happen at that point :)


Thanks,
Pavel



More information about the CRIU mailing list