[CRIU] [PATCH] dump: add timeout for dump
Pavel Emelyanov
xemul at parallels.com
Mon Dec 7 03:40:27 PST 2015
On 12/04/2015 03:26 PM, Andrey Ryabinin wrote:
> Currently criu dump may hang indefinitely. E.g. in wait for task
> that blocked in vfork(). This patch adds time limit on dump
> operation. It's 20 seconds by default, but it could be changed via
> parameter.
Why did you decide to limit the whole dump operation instead of only
the freezing stage?
> Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
> ---
> cr-dump.c | 2 ++
> crtools.c | 10 ++++++++--
> include/cr_options.h | 3 +++
> 3 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/cr-dump.c b/cr-dump.c
> index 5cc375d..04e1dd2 100644
> --- a/cr-dump.c
> +++ b/cr-dump.c
> @@ -1464,6 +1464,8 @@ int cr_dump_tasks(pid_t pid)
> pr_info("Dumping processes (pid: %d)\n", pid);
> pr_info("========================================\n");
>
> + alarm(opts.timeout);
Need a comment here saying how exactly the interruption would be handled.
And I guess it's too early to arm the timer here, somewhere where the
very first task gets frozen is OK.
-- Pavel
More information about the CRIU
mailing list