[CRIU] restore of deleted standalone unix sockets

Tycho Andersen tycho.andersen at canonical.com
Wed Jun 22 10:35:00 PDT 2016


Hi guys,

I noticed that restoring of standalone unix sockets in the LISTEN state fails,
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



More information about the CRIU mailing list