[CRIU] Re: [PATCH 1/2] ctrools: Rewrite task/threads stopping engine

Cyrill Gorcunov gorcunov at openvz.org
Wed Feb 1 10:15:55 EST 2012


On Wed, Feb 01, 2012 at 05:03:51PM +0400, Pavel Emelyanov wrote:
> Stopping tasks with STOP and proceeding with SEIZE is actually excessive --
> the SEIZE if enough. Moreover, just killing a task with STOP is also racy,
> since task should be given some time to come to sleep before its proc
> can be parsed.
> 
> Rewrite all this code to SEIZE task and all its threads from the very beginning.
> 
> With this we can distinguish stopped task state and migrate it properly (not
> supported now, need to implement).
> 
> This thing however has one BIG problem -- after we SEIZE-d a task we should seize
> it's threads, but we should do it in a loop -- reading /proc/pid/task and seizing
> them again and again, until the contents of this dir stops changing (not done now).
> 
> Besides, after we seized a task and all its threads we cannot scan it's children
> list once -- task can get reparented to init and any task's child can call clone
> with CLONE_PARENT flag thus repopulating the children list of the already seized
> task (not done also)
> 
> This patch is ugly, yes, but splitting it doesn't help to review it much, sorry :(
> 
> Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
> ---

Pavel, for some reason it breaks transition/file_read test-case so I reverted it
for a while (I'm on -vagin branch at moment, so the revert is not yet pushed
upstream). Another unexpected issue we've found is that -O2 screws parasite code
so I reverted it as well, not yet pushed though.

	Cyrill


More information about the CRIU mailing list