[CRIU] Questions in CRIU restore mechanism.

Pavel Emelyanov xemul at parallels.com
Sun Mar 31 14:49:00 EDT 2013


On 03/31/2013 10:05 AM, Chanho Park wrote:
>> I tried to dump our simple 'clock' application.
>> I've got below error during the dump process.
>> How do we deal with the process which has shmem?
>>
>> (00.042692) Found anon-shmem piggie at 4
>> (00.044305) Error (proc_parse.c:310): Can't handle non-regular mapping on
>> 3850's map 2920849408
>> (00.044417) Error (cr-dump.c:1367): Collect mappings (pid: 3850) failed
>> with -1
>>
> 
> This error was caused due to /dev/ump and /dev/mali device node which are related with mali gpu device.

Dumping arbitrary device is impossible, since we don't know which state is inside
the device. So every device should be taken separately and handled carefully.

> So, I passed it temporarily.
> 
> The next error was produced by /dev/console.
> 
> Parasite cmd 11/0xb process
> (00.310244) 3610 fdinfo 0: pos: 0x               0 flags:           400000/0
> (00.310466) Dumping path for 0 fd via self 759 [/dev/null]
> (00.310609) fdinfo: type: 0x 1 flags: 0400000/0 pos: 0x       0 fd: 0
> (00.310684) 3610 fdinfo 1: pos: 0x        ffffffff flags:                2/0
> (00.310743) tty: Dumping tty 760 with id 0x2
> (00.310811) Error (tty.c:203): tty: Can't obtain ptmx index
> : Inappropriate ioctl for device
> (00.310933) ----------------------------------------
> (00.310962) Error (cr-dump.c:1419): Dump files (pid: 3610) failed with -1
> 
> The serial node can't supports GIOCGPTN ioctl.
> I think only unix-ptmx node will support it.
> How about you think this problem?

Consoles are also tricky. So far we've supported only ptys (and there are still
issues with it). Dumping /dev/console can be done, but yet again -- carefully
with proper status-fetch of the console. What are the major:minor pair for the
/dev/console you're having in your case?

> There are also some problem to dump character devices.
> dump_chrdev supports only MEM_MAJOR and TTY types.
> To dump any other character device types, we need to implement for that device. Right?

Exactly. We need to explore each device carefully and decide whether we can just
dump one as a regular file, or if there's some state sitting inside device, so we
should dump it as well.


Chanho, as I told, we're open for accepting new functionality to CRIU. If you're
willing to make crtools support the devices you've mentioned -- we will be glad to
look at the patches, help with it and merge the code into the project!

> Best regards,
> Chanho Park

Thanks,
Pavel


More information about the CRIU mailing list