[CRIU] Restored Processes No Longer Sharing Text / Code File-Backed Mappings

Andrew Vagin avagin at parallels.com
Thu Dec 11 00:28:31 PST 2014


On Wed, Dec 10, 2014 at 02:19:22PM -0500, Christopher Covington wrote:
> Hi,
> 
> We've noticed that two processes, such as two invocations of a simple infinite
> loop C program, that initially share physical memory for their file-backed
> text/code mappings (observed in /proc/pid/pagemap) no longer do so after
> checkpoint and restore. I'm still on a July version of CRIU, so if this has
> already been fixed, sorry for the noise. If it hasn't, does anyone have
> pointers as to where to look to try to get the restored processes sharing memory?

Hi Christopher,

I think you misunderstand the situation.
Let's look how flags are changed for one page for a private file mapping:
before dump:	0xa0800000000a8726
after restore:	0x0080000000000000

0xa000000000000000 (PME_PRESENT  | PME_FILE)

So after restore we see that the page isn't present, because nobody read
it yet. If you try to read this page, you will see the same flags, which
you saw before dumping.

Thanks,
Andrew

> 
> Thanks,
> Chris
> 
> -- 
> Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list