[CRIU] Cannot restore from regular user when RPC service running as root

Pavel Emelyanov xemul at parallels.com
Tue Jan 20 04:03:12 PST 2015


On 01/19/2015 08:54 PM, Jason L. Turner wrote:
> Hi Pavel and Ruslan,
> 
> Thank you for all the help.
> 
> Making the owner of the criu binary root and setting the +suid bit on it has allowed me to dump
> and restore as a regular user except a problem still occurs. 
> 
> If I fork() a process and have it run a simple count function in a loop, it is able to dump and
> restore that fine and the program will continue on as it should.

Cool :)

> The problem occurs when I run my program and fork() a process which then execl()'s another command
> line process with multiple threads.  That process is then restored as <defunct>.   
> This happens as a regular user and as root.
> 
> The program is able to be restored as root using CRIU v1.3.1 still.
> 
> Any help is greatly appreciated,
> 
> Here is my output from "ps aux | grep prog" after the restore has occurred.
> 
> 	jturner  20522 25.0  0.0      0     0 ?        Zs   06:26   0:00 [prog] <defunct>
> 	jturner  20532  0.0  0.0  11036  2680 pts/0    S+   06:26   0:00 sh -c ps aux | grep 20522
> 	jturner  20534  0.0  0.0   5584  1232 pts/0    S+   06:26   0:00 grep 20522
> 
> 
> Please see below my "criu_service.log", "restore.log", and "dump.log"
> 
> My restore.log contains the following:
> 

Before the below lines everything is fine.

> (00.038516) Error (cr-restore.c:1586): Can't interrupt task: No such process
> (00.038540) Restore finished successfully. Resuming tasks.
> (00.038559) Error (arch/x86/crtools.c:549): Unable to disable the breakpoint
> (00.038564) Error (arch/x86/crtools.c:549): Unable to disable the breakpoint
> (00.038569) Error (arch/x86/crtools.c:549): Unable to disable the breakpoint
> (00.038573) Error (arch/x86/crtools.c:549): Unable to disable the breakpoint
> (00.038576) Error (arch/x86/crtools.c:549): Unable to disable the breakpoint
> (00.038580) Error (arch/x86/crtools.c:549): Unable to disable the breakpoint
> (00.038584) Error (cr-restore.c:1804): Unable to flush breakpoints
> (00.038588) Error (cr-restore.c:1655): Unable to execute 20209: No such process
> (00.038593) Error (cr-restore.c:1655): Unable to execute 20214: No such process
> (00.038598) Error (cr-restore.c:1655): Unable to execute 20215: No such process
> (00.038603) Error (cr-restore.c:1655): Unable to execute 20216: No such process
> (00.038607) Error (cr-restore.c:1655): Unable to execute 20217: No such process
> (00.038612) Error (cr-restore.c:1655): Unable to execute 20218: No such process

These lines mean that you have several process, of the task you're restoring
is multi-threaded. And (!) they all are dead by the time we get here.

Can you check the dmesg output for segfault messages? It looks like the tasks
died right after the restore.

> (00.038617) Writing stats
> (00.038669) bfd: BUF 0x7fcd53edd000 <
> (00.038721) bfd: BUF 0x7fcd53edd000 >

Thanks,
Pavel



More information about the CRIU mailing list