[CRIU] Self Restoring
Maximilian Kleber
s9makleb at stud.uni-saarland.de
Thu Apr 24 05:29:07 PDT 2014
Hello everybody,
I’m currently working with CRIU as a part of my bachelor thesis.
One of the ideas is to provide CRIU access via a library approach for Java applications.
For this I’m using the provided C Library and JNI.
One of the goals is that an application can checkpoint and restore itself.
To be able to restore itself later, I’ll set the leave_running option when issuing the checkpoint request (I know this should be avoided, but elsewise this feature does not make much sense).
Checkpointing, restoring via command line or restoring an older session within the application works. But I can’t checkpoint and then restore this checkpoint directly afterwards. I guess CRIU tries to restore the original PID but since the original application is still running, this results in a conflict and a restoring failure.
So I guess process duplication is not possible but is there a way an application can replace itself with an older checkpoint of the same execution session?
I already tried to fork a child before restoring the application and within this child I kill the parent process and restore then the older checkpoint, which seems to work fine but I can only work if the child has no other siblings, since then the PID conflicts occur again.
Another issue is, that killing an application does not always terminate the application instantly, I have to somehow wait for the process to terminate. Another idea was to send the kill signal to the whole process group to reach all child processes but this would also affect the forked child which I need to restore the application once all processes have been terminated. Maybe I find a way to somehow detach the forked child from the parent and the whole process group.
I would be glad if anyone has an idea how to solve the problem of self-restoring. Any comments are welcome!
Thank you in advance!
Best regards,
Maximilian Kleber
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140424/2fed85e9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4169 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140424/2fed85e9/attachment-0001.p7s>
More information about the CRIU
mailing list