[CRIU] Restore fails for test/rpc/test-c
Gabriel Southern
southerngs at gmail.com
Fri Nov 13 10:12:36 PST 2015
Thanks for the explanation. So it sounds like if I want to be able to
checkpoint and restore child processes from within an application using the
libcriu C API that I need to run my application as root. I can do that for
now while I'm developing and I'll be interested to try alternate techniques
once they are available.
-Gabriel
On Fri, Nov 13, 2015 at 4:42 AM, Pavel Emelyanov <xemul at parallels.com>
wrote:
> On 11/13/2015 08:58 AM, Gabriel Southern wrote:
> > I'm interested in using criu for creating/restoring checkpoints from
> within an
> > application that would be run as a regular user (not root).
>
> :)
>
> > I've been looking at the code in test/rpc/test-c.c to see an example of
> how this
> > could work.
>
> There's a long story behind this. In the early stages we suggested using
> criu
> service started from root and an application willing to C/R talking to it
> via a
> unix socket. http://criu.org/RPC
>
> Later on, the service was recognized as a security hole and we no longer
> recommend
> people to make it publicly available when launched from root user.
> Instead, we
> started working on the user-mode dump and restore. The latest patches are
> [1] but
> it's still not 100% complete. In particular, the error you mention below
> is still
> not fixed.
>
> [1] https://lists.openvz.org/pipermail/criu/2015-October/022455.html
>
>
> We planned to have this set finished and merged by 1.8, but we're short of
> resources,
> so patches are now scheduled for 1.9.
>
> > But when I run this test using the run.sh script I'm getting an error
> > during the restore step. Looking at the restore-c.log file the error
> that I see is:
> >
> > pie: Error (pie/restorer.c:1085): prctl failed @1085 with -22
>
> Yup, this is due to kernel restrictions on restoring the exe link. Right
> now
> there's nothing that can be done about it, but not to restore one. Tasks
> will
> continue running, but in /proc/pid/exe you would see criu, not the original
> binary.
>
> In the long term someone should start talking to the kernel people about
> relaxing those checks.
>
> > (full output available here:
> https://gist.github.com/southerngs/238a6f14ab61296587cc)
> >
> > If I could get the criu tests to pass I'd be able to use the libcriu C
> api for what I
> > need. But I'm not sure what I need to do to get these tests to pass.
> Any suggestions
> > are appreciated.
> >
> > Also in case it matters I'm running Arch Linux. My kernel is 4.2.5-1
> and compiled
> > with the Arch Linux defaults and with the options listed on the wiki page
> > (https://criu.org/Installation#Configuring_the_kernel).
>
> -- Pavel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20151113/7a2ded2b/attachment.html>
More information about the CRIU
mailing list