[CRIU] Android port

Pavel Emelyanov xemul at parallels.com
Thu Jun 4 14:11:54 PDT 2015


On 06/04/2015 11:46 PM, CRIU criu wrote:
> On Thu, Jun 4, 2015 at 1:23 PM, Pavel Emelyanov <xemul at parallels.com <mailto:xemul at parallels.com>> wrote:
> 
>     On 06/04/2015 05:35 PM, CRIU criu wrote:
>     > Can CRIU be used to checkpoint/restore a single process and not a process tree?
> 
>     Without a patch -- no, it always scans for the process subtree starting from the
>     pid given.
> 
> 
> Is there a patch already to do this?

Well, nope :) We used to have the ability to dump and restore a single process with
CRIU, but removed one way before v1.0 was released.

>     > I keep hitting this error message:
>     >
>     >     if (item->sid == 0) {
>     >
>     >         pr_err("A session leader of %d(%d) is outside of its pid namespace\n",
>     >
>     >             item->pid.real, item->pid.virt);
>     >
>     >         goto err_cure;
>     >
>     >     }
> 
>     But it's not about dumping a single task or a subtree, it's about the resources
>     leaking outside of what you dump :)
> 
> 
> I agree. However, an Android process behaves very differently from a regular linux process
> - some of the resources are released when a process goes in the background so we don't have 
> to dump everything because released resources will be reacquired upon resume (restore) when
> brought into foreground again. That means the way we resume will change for Android. I will
> fix this as I go along.

I see. Well, if there's a case to relax some restrictions CRIU impose on the linkage of
resources tasks have, then the patch would be welcome :)

> I also see "Uncollected sockets! Will probably fail later." error message. What does it mean?

Ah, never mind. It's just a warning, that not all the sockets were collected and that
dump _may_ fail if uncollected socket is in use by the task(s) you dump. BTW, there's
BUG in this message, I'll fix one soon.

> Thanks for your help!

You're always welcome!

-- Pavel



More information about the CRIU mailing list