[CRIU] Reg unix stream checkpointing and other issues.
Sanidhya Kashyap
sanidhya.gatech at gmail.com
Thu Sep 11 08:48:56 PDT 2014
Thanks Pavel for the response. I have some more questions.
On Thu, Sep 11, 2014 at 7:19 AM, Pavel Emelyanov <xemul at parallels.com> wrote:
>
>> Then, I went on to try checkpointing of two processes in one shot i.e.
>
> CRIU cannot do it. Only one pid at a time.
>
But, I can extend the criu to consider two or more processes?
>
> This is AIO mapping. We're working on supporting this, patches are
> expected to appear by v1.4 :)
>
That's great!! When can I expect the 1.4 version? Or are those patches
already upstreamed?
>> But still, I have some questions which I would like to know:
>> 1) How can I dump the another half of unix socket connection?
>
> Without the process, that owns it, it's impossible. At least, without
> patching the kernel.
>
>> 2) Even if I am able to dump the another half, will the application
>> work when I restore it or the another half needs to do something?
>
> With unix connection, if you dump both ends, you should restore
> both ends too.
>
Yup, I am going to do that! I will eventually restore both or multiple
resources sharing the same resource.
>> 3) In what conditions, do I see uncollected sockets, and non-regular mappings?
>
> "Uncollected sockets" is pretty much harmless message. If I'm not
> mistaken, it was left from the times when we didn't support IPV6
> and netlink sockets.
>
> Non regular mappings are mappings of files, that CRIU cannot dump.
> It can be a device mapping or AIO.
>
I guess for the device mapping, we have to write separate mechanism to
work with those.
>> 5) Is there a possibility of checkpointing multiple processes which
>> are sharing the resources on a single host, like unix stream and
>> types? If yes, then what is the way to achieve it?
>
> When you specify a PID of a process, CRIU dumps the whole subtree
> of tasks sitting under it. If you want to dump two subtrees, you
> need to patch CRIU. It can do it in theory, but there's no such
> API yet.
I am more *interested* in this prospect and would like to know how is
it possible to do?
By API do you mean kernel API or something else?
I shall be grateful if you can give me some pointers.
Thanks,
Sanidhya
On Thu, Sep 11, 2014 at 7:19 AM, Pavel Emelyanov <xemul at parallels.com> wrote:
> On 09/10/2014 10:16 PM, Sanidhya Kashyap wrote:
>> Hi,
>>
>> I am using criu to checkpoint/restore sysbench tool with mysql. When I
>> run sysbench on the localhost where the mysql server resides, then I
>> am unable to checkpoint the sysbench process. It always says: 'Can't
>> dump half of stream unix socket connection'. You can find the criu log
>> (with v4 level) here: http://ur1.ca/i5xtf
>
> This means, that sysbench process is connected to mysqld via unix socket
> and CRIU cannot just break this connection.
>
>> Then, I went on to try checkpointing of two processes in one shot i.e.
>
> CRIU cannot do it. Only one pid at a time.
>
>> specifying both of the processes ids in one i.e. for sysbench and for
>> mysql. I thought, why don't I checkpoint both of them and see how it
>> goes. There, I found that as it was already failing for sysbench, so
>> it didn't proceed ahead.
>>
>> I also tried to simply dump the msyql service that keeps on running.
>> There also, I was unsuccessful, as I got two errors:
>> 1) Uncollected sockets, will probably fail later.
>> 2) can't handle non-regular mappings...
>
> This is AIO mapping. We're working on supporting this, patches are
> expected to appear by v1.4 :)
>
>>
>> Then the checkpointing failed there as well. This link -
>> http://ur1.ca/i5xty provides the log of criu checkpoint with v4 level
>> for the mysql service.
>>
>> Finally, I was successfully able to dump the sysbench over the network. #sigh
>
> :)
>
>> But still, I have some questions which I would like to know:
>> 1) How can I dump the another half of unix socket connection?
>
> Without the process, that owns it, it's impossible. At least, without
> patching the kernel.
>
>> 2) Even if I am able to dump the another half, will the application
>> work when I restore it or the another half needs to do something?
>
> With unix connection, if you dump both ends, you should restore
> both ends too.
>
>> 3) In what conditions, do I see uncollected sockets, and non-regular mappings?
>
> "Uncollected sockets" is pretty much harmless message. If I'm not
> mistaken, it was left from the times when we didn't support IPV6
> and netlink sockets.
>
> Non regular mappings are mappings of files, that CRIU cannot dump.
> It can be a device mapping or AIO.
>
>> 4) What is the work around for the above i.e. uncollected sockets and
>> non-regular mappings?
>
> For non-regular mappings there's no workarounds. CRIU should know
> what it dumps and if meets some unknown memory region it fails and
> we try to add support for it.
>
>> 5) Is there a possibility of checkpointing multiple processes which
>> are sharing the resources on a single host, like unix stream and
>> types? If yes, then what is the way to achieve it?
>
> When you specify a PID of a process, CRIU dumps the whole subtree
> of tasks sitting under it. If you want to dump two subtrees, you
> need to patch CRIU. It can do it in theory, but there's no such
> API yet.
>
>> Since, I am new to criu, so that's why I have so many questions.
>> Please, bear with it.
>
> No problem. Feel free to ask any questions you have.
>
> Thanks,
> Pavel
>
More information about the CRIU
mailing list