[CRIU] BUG in parasite_infect_seized()

Dmitry Safonov dsafonov at virtuozzo.com
Fri May 20 08:03:52 PDT 2016


On 05/20/2016 05:45 PM, Kirill Tkhai wrote:

> On 20.05.2016 17:40, Dmitry Safonov wrote:
>> On 05/20/2016 03:39 PM, Kirill Tkhai wrote:
>>> Hi,
>>>
>>> in case of parasite_start_daemon() fail, there is called:
>>>
>>> parasite_cure_seized()->parasite_cure_remote()->parasite_unmap()->parasite_run() and parasite_stop_on_syscall(),
>>>
>>> but the tracee is not infected at the moment, and it can't execute remote commands.
>>>
>>> So, criu fails to unmap memfd.
>>
>> That may be fixed by adding else to parasite_stop_daemon:
>>>    if (ctl->daemonized) {
>> ...
>>>    } else {
>>>        return -1;
>>>    }
>>
>> Which is also logical: parasite_stop_daemon returns error
>> if control was not daemonized.
>
> But this case mapped memory still present in a tracee, doesn't it?


Well, you're right, I missed that.
It looks like we need then move unmap from daemon commands
to raw unmap syscall with setting ctl registers.
I may do this on evening if there wouldn't be any patches yet :)


More information about the CRIU mailing list