[CRIU] Preserve the "dumpable" flag on criu dump/restore.

Filipe Brandenburger filbranden at google.com
Mon May 12 16:42:31 PDT 2014


Hi Pavel,

On Mon, May 12, 2014 at 4:35 PM, Pavel Emelyanov <xemul at parallels.com> wrote:
>> And I sent this patch which fixes the issue:
>> http://2968.bugzilla.openvz.org/attachment.cgi?id=2147
>
> Can you please send this patch to the mailing list, please? I
> glanced through it via bugzilla interface and have one comment,
> and it's more convenient to do this conversation over the
> mailing thread.

Done.
http://lists.openvz.org/pipermail/criu/2014-May/014144.html

>> While testing the patch with zdtm, I also found that it caused
>> static/cow01 to break. After some investigation, I got to the
>> conclusion that cow01 was inherently broken and without the "dumpable"
>> flag being preserved it would always succeed even though it was not
>> really checking whether pages are COWed...
>
> Ouch... Can you shed more light on this?

Still digging into it...

So far I found that list_for_each_entry_continue() in
map_private_vma() seems to be skipping matching VMAs since "p" seems
to get ahead of "vma" and they get out of sync... I replaced it with a
list_for_each_entry() which makes performance worse (quadratic on the
number of VMAs) and this seems to find matching COW regions but then
there are still further problems...

My last finding was that paddr = decode_pointer(vma->premmaped_addr),
which is the last command in that same loop, and is what is supposed
to trigger the COW code (doing a memcmp and only memcpy if they
differ) is always getting a NULL pointer. It looks to me that
vma->premapped_addr is the wrong thing to put there but I'm still
trying to figure out what the right one would be...

Cheers,
Filipe


More information about the CRIU mailing list