[CRIU] restore of deleted standalone unix sockets
Pavel Emelyanov
xemul at virtuozzo.com
Tue Jun 28 05:32:28 PDT 2016
On 06/22/2016 08:35 PM, Tycho Andersen wrote:
> Hi guys,
>
> I noticed that restoring of standalone unix sockets in the LISTEN state fails,
But the static/sk-unix-rel does exactly this -- socket() bind() listen() then
C/R then connect and accept. And it passes :)
> because we don't keep the address during the dump phase, and the kernel expects
> us to bind() to an address before we can listen() on these sockets (see test
> for an example).
>
> One problem with this patch is that if there are two sockets bound to the same
> path, but one was deleted, we could fail if we restore the non-deleted one
> first. I think there are a few options for this:
>
> 1. Try to order the sockets so they're always restored in the right order
> (similar to how the process did it the first time). I'm not aware of any
> ordering hooks we have in the code to do this.
> 2. Try to bind the socket to some other path; since it is deleted, nobody can
> connect to it anyway, so it doesn't matter where it's bound.
> 3. Don't care about this case ;)
>
> Anyway, here's a first draft of a set, let me know what you think.
>
> Tycho
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
> .
>
More information about the CRIU
mailing list