[CRIU] Re: [PATCH 08/14] files: Restore epolls lately

Cyrill Gorcunov gorcunov at openvz.org
Thu May 3 09:45:19 EDT 2012


On Thu, May 03, 2012 at 05:11:06PM +0400, Pavel Emelyanov wrote:
...
> > Been there, tried that :) Doesn't work. We have
> > 
> > 	list_for_each_entry(l, &fdesc->fd_info_head, desc_list)
> > 		if (l->pid > le->pid)
> > 			break;
> > 
> > 	list_add_tail(&le->desc_list, &l->desc_list);
> 
> This list sorting is kept.
> 
> > 	list_add_tail(&le->ps_list, fds);
> 
> This is not. We just restore _local_ fd-s in reverse order.

The order of fds does matter. Look, what I have when I change ordering of fds

2334: Opening fdinfo-s
	2334: Restoring fd 6 (state -> 0)
	2334: Create transport fd for 6
Wake up fdinfo pid=2334 fd=6
	2334: Restoring fd 5 (state -> 0)
	2334: Restoring fd 4 (state -> 0)
	2334: Restoring fd 2 (state -> 0)
	2334: Restoring fd 1 (state -> 0)
	2334: Restoring fd 0 (state -> 0)
	2334: Restoring fd 3 (state -> 0)
	2334: Restoring fd 6 (state -> 1)
	Creating pipe pipe_id=0xffffbf91 id=0x5
	Waiting fd for 6

and restore stuck. Which comes from pipes.c:recv_pipe_fd so I believe
ordering of pipe ends creation does matter (or there is a bug in pipes.c,
Andrew?).

	Cyrill


More information about the CRIU mailing list