[CRIU] Name resolved on unconnected socket

Cyrill Gorcunov gorcunov at gmail.com
Mon Feb 24 05:16:31 PST 2014


On Mon, Feb 24, 2014 at 02:06:06PM +0100, Inti Gonzalez-Herrera wrote:
>    I am wondering:
>    Is it possible to write a plugin to handle such sockets? I mean, I know
>    the application won't use the sockets again, so I just want to discard
>    them. My question is: Will CRIU call the plugin list if it realizes that a
>    socket "has a name but is unconnected"??? Or in a different way: Will CRIU
>    call every single plugin before failing?
> 
>    My idea of plugin is simple:
>    DUMP
>    1 - Verify that the object is the file descriptor for a TCP socket
>    2 - Verify that the socket is in CLOSE_WAIT state
>    3 - Report success without recording the object as saved
> 
>    RESTORE (Maybe I don't need this one since I don't recorded nothing in
>    DUMP)
>    1 - Ignore the object
> 
>    What do you thing? Just note that it only make sense if I know that such
>    connections aren't waiting for nothing.

I suppose we need simply save such sockets as "closed" and proceed dumping.
This should eliminate the error you see but I'm not sure if application
itself will close such socket file descriptor later. Let me prepare a patch
for testing.

And at the moment, as far as I know the plugin engine won't be calling the
hook for such socket state. Maybe we should bring one in.


More information about the CRIU mailing list