[CRIU] CRIU saving/restoring fd for the device file

Zmudzinski, Krystof C krystof.c.zmudzinski at intel.com
Thu Oct 2 08:46:51 PDT 2014


One more detail that may help.  I have sleep(20) in my app so I can criu suspend at predetermined places.  So the app is always interrupted at sleep(20).  When the app is restored, the sleep doesn't finish.  In other words, if I suspend the app after 5 seconds, there is no remaining 15-second sleep on after restore.

Krystof

-----Original Message-----
From: Pavel Emelyanov [mailto:xemul at parallels.com] 
Sent: Thursday, October 2, 2014 8:42 AM
To: Zmudzinski, Krystof C; CRIU
Subject: Re: [CRIU] CRIU saving/restoring fd for the device file

On 10/02/2014 07:37 PM, Zmudzinski, Krystof C wrote:
> If the app runs uninterrupted by criu suspend/restore, each sys call 
> to the driver works just fine: open returns valid fd and icotls return 
> 0.  Also, errno is always 0.  After criu restore, open and ioctls still work and return valid fd and 0 respectively but errno is set to EINTR.

Hm... Interesting. OK, I'll try to investigate what's going on.
Thanks for the report :)

> Krystof
> 
> -----Original Message-----
> From: Pavel Emelyanov [mailto:xemul at parallels.com]
> Sent: Thursday, October 2, 2014 8:17 AM
> To: Zmudzinski, Krystof C; CRIU
> Subject: Re: [CRIU] CRIU saving/restoring fd for the device file
> 
> On 10/02/2014 07:08 PM, Zmudzinski, Krystof C wrote:
>> I have finally figured out that I can indeed talk to the driver just 
>> fine.  The problem is that my code checks for errno even when ioctls 
>> don't return -1.  For some reason, after resume, errno is set to 
>> EINTR.  Is it possible that criu causes this by sending a signal to the my app during suspend?
> 
> I doubt this. errno is just a variable in memory, criu doesn't touch the app's memory.
> 
>> Shouldn't errno be cleared by criu on resume?
> 
> AFAIK no, app's memory should be left intact on restore.
> 
> Can you describe problem in more details, please?
> 
> Thanks,
> Pavel
> 
> 
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
> 




More information about the CRIU mailing list