[CRIU] [PATCH 1/2] finalize cgroups correctly

Pavel Emelyanov xemul at parallels.com
Thu Mar 19 13:52:17 PDT 2015


On 03/19/2015 11:42 PM, Tycho Andersen wrote:
> On Thu, Mar 19, 2015 at 09:55:23PM +0300, Pavel Emelyanov wrote:
>> On 03/19/2015 09:46 PM, Tycho Andersen wrote:
>>> On Thu, Mar 19, 2015 at 10:41:58AM -0700, Saied Kazemi wrote:
>>>> Hi Tycho,
>>>>
>>>> I tried the patch but it didn't work for me as cgyard is visible after
>>>> restore (please see below).  Here are criu dump and restore commands.  I've
>>>> also attached the log files.
>>>>
>>>> criu dump -v4 -D /home/saied/work/nsinit/busybox/nsinit/checkpoint -o
>>>> dump.log --root /home/saied/work/nsinit/busybox --manage-cgroups
>>>> --evasive-devices -t 31361
>>>>
>>>> criu restore -v4 -D /home/saied/work/nsinit/busybox/nsinit/checkpoint -o
>>>> restore.log --root /home/saied/work/nsinit/busybox --pidfile
>>>> /home/saied/work/nsinit/busybox/nsinit/restoredpid --manage-cgroups
>>>> --evasive-devices --inherit-fd fd[0]:pipe:[69253] --inherit-fd
>>>> fd[1]:pipe:[69254] --inherit-fd fd[2]:pipe:[69255]
>>>>
>>>> Any ideas why?!
>>>
>>> I think it's because fini_cgroup is broken. It doesn't unmount the
>>> individual controllers before trying to unmount the cg yard.
>>
>> That was done deliberately :) It does MNT_DETACH umount. Which, in
>> turn, detaches all the sub-mounts of the detached mount immediately :)
> 
> Oh, right, I somehow missed the MNT_DETACH flag. I'm not sure what the
> deal is then, I'll take a look.

Thanks :)

>>> Another problem I realized is that the properties restore code doesn't
>>> seem to respect the manage_cgroups flag (although I can't tell why it
>>> doesn't cause problems for more people, since it seems like it should
>>> blow up without that flag right now).
>>
>> I guess it's because the list of controllers being empty without the
>> --manage-cgroups flag, is it?
> 
> Yeah, that's probably true. Then it would only break if someone
> supplied --manage-cgroups on dump but not restore. Is this something
> we care about? I can fix it too with this series if so.

Hm... I would feel more comfortable if criu w/o --manage-cgroups option
didn't touch anything about cgroups. So -- yes, please :)

Thanks,
Pavel




More information about the CRIU mailing list