[CRIU] [PATCH 2/2] restore: remount /proc after clone(CLONE_NEWPID)
Andrew Vagin
avagin at parallels.com
Wed Aug 6 12:54:06 PDT 2014
On Wed, Aug 06, 2014 at 01:52:17PM -0500, Tycho Andersen wrote:
> Hi Andrew,
>
> On Wed, Aug 06, 2014 at 10:44:12PM +0400, Andrew Vagin wrote:
> > On Wed, Aug 06, 2014 at 01:34:07PM -0500, Tycho Andersen wrote:
> > > Hi Andrew,
> > >
> > > On Wed, Aug 06, 2014 at 10:25:10PM +0400, Andrew Vagin wrote:
> > > > On Wed, Aug 06, 2014 at 01:06:29PM -0500, Tycho Andersen wrote:
> > > > > We need to remount /proc after the clone because things like getpid() return
> > > > > the pid in the new namespace, but /proc still has the old namespace's info in
> > > > > it. This causes problems when e.g. there are some things in criu's private
> > > > > mount namespace but not in (the original) init's namespace.
> > > >
> > > > Could you show an example of problems?
> > >
> > > Yes, if you:
> > >
> > > 1. unshare(CLONE_NEWNS)
> > > 2. mount() some directory to pass as --root
> > > 3. exec(criu)
> >
> > Could you show how criu fails in this case?
>
> Yes,
>
> > >
> > > criu fails with "(mount.c:1958): New root and old root are the same".
And this patch fixes this error? I don't understand how it can be.
Tycho, could you look at https://github.com/avagin/criu/commit/6d1cc9acb7e3f442cafbb4b6ff2596ad32b7ac34
This patch reworks code, which reports the error "(mount.c:1958): New
root and old root are the same".
>
> what other information would be useful?
How do you mount the directory to pass as --root?
Thanks,
Andrew
>
> Tycho
More information about the CRIU
mailing list