[CRIU] Fwd: Re: Self Restoring
Ruslan Kuprieiev
kupruser at gmail.com
Thu Apr 24 07:43:19 PDT 2014
-------- Original Message --------
Subject: Re: [CRIU] Self Restoring
Date: Thu, 24 Apr 2014 17:19:33 +0400
From: Ruslan Kuprieiev <kupruser at gmail.com>
To: criu at openvz.org
Hi Maximilian!
Thank you for your question!
Looks like your problem is a sub-problem of applying images on a working
<http://criu.org/Applying_images>
process <http://criu.org/Applying_images>, which I'm currently trying to
solve. I'm on some initial stages of solving,
without any submitted code yet. It's planned to add "apply" request to
RPC after.
On 24.04.2014 16:29, Maximilian Kleber wrote:
> 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
>
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140424/3c3a7489/attachment.html>
More information about the CRIU
mailing list