[CRIU] error in VDSO remap

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


On 06/04/2015 02:16 AM, Tycho Andersen wrote:
> Hi Pavel,
> 
> On Tue, Jun 02, 2015 at 08:21:17AM +0300, Pavel Emelyanov wrote:
>> On 06/02/2015 06:39 AM, Tycho Andersen wrote:
>>> Hi all,
>>>
>>> When I try and c/r with current trunk, sometimes I get an error in the
>>> vdso remap code. The error message looks garbled (I am using current
>>> trunk), so I'm not sure what's really going on. Two examples are:
>>>
>>> http://paste.ubuntu.com/11510594/
>>> http://paste.ubuntu.com/11511094/
>>>
>>> This doesn't happen every time, but maybe 30% of the time.
>>>
>>> Any ideas?
>>
>> In the kernel code I can find only one reason for the EFAULT from
>> mremap -- the region we're trying to remap is not strictly included
>> into some single vma. IOW inside the (addr, addr + size) region
>> there should be either one whole vma or its part, but no two vmas
>> and no holes in the start or end of it.
>>
>> Can you stop (sleep 1000) the restoring task right after this message
>> and look inside its /proc/self/maps to compare what it remaps vs
>> what it really has?
> 
> Here's the maps:
> 
> http://paste.ubuntu.com/11552302/
> 
> and here's my log:
> 
> http://paste.ubuntu.com/11552304/

Hm... It looks like these logs are succeeding:

pie: vdso: Remap dumpee 0x26000 -> 0x7ffd61fdd000
pie: vdso: Remap dumpee 0x28000 -> 0x7ffd61fdf000
pie: Restoring scheduler params 0.0.0

> It looks like it's trying to map something onto the end of the last
> region? 

Well, yes. I have one idea of what can happen here. It looks like the 
VDSO CRIU sees in the image has managed to merge with some adjacent VMA
(because of the flags match) so we can't remap it into proper place because
of the sys_mremap limitations.

Can you try to catch the failing case to see what CRIU remaps and what
mappings it has at that time?

> I'm still having trouble parsing the error message, as it
> doesn't really match the format string.

You mean this part:

pie: vdso: image [vdso] 0x7ffd61fdf000-0x7ffd61fe1000 [vvar] 0x7ffd61f>
pie: dd000-0x7ffd61fdf000

?

That's pie's logging engine :) Since the buffer is quite limited there we
split lines and mark the split point with ">" sign :)

-- Pavel



More information about the CRIU mailing list