[CRIU] [PATCH] dump: don't call rollback actions from a signal handler

Pavel Emelyanov xemul at virtuozzo.com
Fri Feb 19 02:17:12 PST 2016


On 02/19/2016 12:30 AM, Andrey Vagin wrote:
> From: Andrew Vagin <avagin at virtuozzo.com>
> 
> We can do this, but we need to be sure that all structures
> are consistant in any moment and we need to block alarm when
> they are inconsistant.
> 
> I don't think that we really want to do this now. I suggest to
> interupt a current syscall if an alarm signal is triggered.

What if alarm fires between system calls? Can we use siglongjump to
handle it?


> +static void alarm_handler(int signo)
> +{
> +	static int cnt = 5;
> +
> +	pr_err("Timeout reached. Try to interrupt: %d\n", signo);
> +	if (cnt--) {
> +		alarm(1);
> +		/* A curren syscall will be exited with EINTR */
> +		return;
> +	}

Add a message here, that we're exiting w/o any .

> +	exit(1);
> +}



More information about the CRIU mailing list