[CRIU] restoring sockets with data pending

Pavel Emelyanov xemul at parallels.com
Fri Oct 10 03:12:39 PDT 2014


On 10/10/2014 12:23 AM, Tycho Andersen wrote:
> Hi Pavel, Andrew,
> 
> On Mon, Sep 15, 2014 at 02:21:18PM +0400, Pavel Emelyanov wrote:
>> On 09/13/2014 04:55 AM, Tycho Andersen wrote:
>>> Hi all,
>>>
>>> One of the errors that I sometimes get when dumping things is:
>>>
>>> Error (sk-netlink.c:73): The socket has data to read
>>
>> Yup :) These are netlink sockets with some data from the krenel.
>>
>>> What is necessary to fix this problem? I guess there is some work to
>>> be done on the kernel side to provide an API for getting these
>>> buffers? Is there some other trick we can use?
>>
>> Strictly speaking, we should patch the kernel to be able to peek
>> this data from socket and to put it back. But maybe in some cases
>> we could invent some workaround (I'm not quite sure netdev@ people
>> would be happy with such hacks :) ).
>>
>> Can we investigate what kind of socket is it and what data is in
>> there?
> 
> Finally getting around to looking at this; lsof says:
> 
> systemd-u 179 root    4u  netlink                         0t0  13252 KOBJECT_UEVENT
> 
> There are 88 bytes of data pending on the socket, and when I read them
> off, NLMSG_OK seems to think they're not a valid netlink message:
> 
> Error (sk-netlink.c:114): nlmsg_len: 1080321121, nlmsg_type: 27951,
> nlmsg_seq 795176053, nlmsg_pid 2020175477

And what does the 1st pr_err from your patch show?

> Here's the code I used, I guess I'm misunderstanding something?
> 
> https://github.com/tych0/criu/commit/ae9a5405232976ca2f5234477b3c3bce0f87a22f
> 
> Thanks,
> 
> Tycho
> 



More information about the CRIU mailing list