[CRIU] crash in pb_read_one?

Pavel Emelyanov xemul at parallels.com
Tue Sep 16 11:07:52 PDT 2014


On 09/16/2014 09:44 PM, Tycho Andersen wrote:
> Hi Pavel,
> 
> On Tue, Sep 16, 2014 at 12:02:19PM -0500, Tycho Andersen wrote:
>>>
>>> Hm... This somewhere should be strictly after all files from this
>>> helper has been opened. This can be pretty well determined by the
>>> remap->users count. Next, when creating such helpers we can feed
>>> 0 into clone flag's exit_signal field, thus causing this particular
>>> child to auto-reap, so once the remap->users count hits zero we
>>> can just shoot it with SIGKILL.
>>
>> Ah, that sounds like a better approach. Actually I don't think we need
>> to shoot it, we can just synchronize it to the end of the RESTORE
>> stage and it should Just Work. I will give that a try, seems much
>> cleaner than messing around with rst memory.

Hm... Then we don't need the users counter as well. Just auto-reap.

> Actually it looks like the clone flags for the helpers are 0, but they
> still aren't auto-reaped when they exit (i.e. they are zombies, which
> need a wait() call). What am I missing?

ret = clone(restore_task_with_children, ca.stack_ptr,
                        ca.clone_flags | SIGCHLD, &ca);

This "| SIGCHLD" reaps auto-reap.

Thanks,
Pavel



More information about the CRIU mailing list