[CRIU] [PATCH] pages: Share page_ids between ns dump-helpers

Dmitry Safonov dsafonov at virtuozzo.com
Fri Jun 30 19:57:53 MSK 2017


On 06/29/2017 11:09 PM, Dmitry Safonov wrote:
> After the commit 9d2e1dfebedf ("ipc: Keep shmem segments contents into
> pagemap/page images"), SysV shmem pages are stored in the pages-<n>.img
> files.  Where <n> is page_ids number.
> 
> The problem here is that we dump namespaces with a helper after fork().
> This results in non-shared between child(s) and parent-criu counter
> with the result of overwriting pages-*.img files later by helpers/criu.
> This resulted in restore with corrupted shmem segments or
> in the following failures on restore:
>> (04.501019)      1: Error (criu/pagemap.c:265): Can't read mapping page 0: No such file or directory
>> (04.637516)      1: Error (criu/pagemap.c:265): Can't read mapping page 0: No such file or directory
> 
> Allocate page_ids with shmalloc() and make it atomic.
> As we need it in pre-dump, dump, page-server and rpc,
> init it early in the main().
> 
> Cc: Pavel Emelyanov <xemul at virtuozzo.com>
> Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>

Andrew, drop this patch please.
I'll send v2, found an issue with several pre-dumps.

-- 
              Dmitry


More information about the CRIU mailing list