[CRIU] collecting unix sockets

Pavel Emelyanov xemul at parallels.com
Thu Jun 11 11:33:33 PDT 2015


On 06/11/2015 09:23 PM, CRIU criu wrote:
> So I looked at the code of the application I'm running. These are socketpair(SOCK_SEQPACKET) . 
> I modified the code to dump them similar to SOCK_DGRAM. However, looks like this cannot be done. As mentioned on CRIU wiki, because of these being nameless the check in the kernel fails.
> Let me know if you need more info. Also, any pointers on how to fix this? 

Yes, there are two options, they are described in http://criu.org/External_UNIX_socket page,
sections "What to do with stream/seqpacket?" and "What to do with socketpair()-s?". If you
have any questions regarding this just let me know.

> Thanks for your help Pavel!
> 
> On Thu, Jun 11, 2015 at 9:30 AM, Pavel Emelyanov <xemul at parallels.com <mailto:xemul at parallels.com>> wrote:
> 
>     On 06/09/2015 11:50 PM, CRIU criu wrote:
>     > Hi,
>     >
>     > In collect_one_unixsk(), CRIU checks for ui->ue->name.len >= UNIX_PATH_MAX
>     >
>     > However, the kernel checks for len <= sizeof(short) || len > sizeof(*sunaddr)  in
>     . unix_mkname() for unix_stream_connect() type sockets.
>     >
>     > Because of the mismatch, I see "Can't connect %#x socket" error in post_open_unix_sk()
> 
>     Can you shed more light on this? What's the sockets you dump and why the check
>     for name length makes this to fail?
> 
>     -- Pavel
> 
> 



More information about the CRIU mailing list