[CRIU] link_remap_ok

beproject criu beprojectcriu at gmail.com
Fri Feb 27 06:25:13 PST 2015


This is the flow before error,could you get what's wrong :

(02.352922) Dumping path for 4 fd via self 43
[/usr/local/lib/lxc/rootfs/root/dev/__properties__]
(02.353079) [nyc_fd] The required root is already opened. get_service_fd()
returns : 1017
(02.353216) [nyc_fd] Going into fstatat()-> [mntns_root : 1017],[rpath :
./usr/local/lib/lxc/rootfs/root/dev/__properties__]
(02.353398) [nyc_fd] Out of fstatat()-> [ret : -1],[rpath :
./usr/local/lib/lxc/rootfs/root/dev/__properties__]
(02.353574) [nyc_fd] Going into dump_linked_remap()
(02.354191) [nyc_fd] The required root is already opened. get_service_fd()
returns : 1017
(02.354431) [nyc_fd] Doing linkat() [mntns_root : 1017],[link_name :
./usr/local/lib/lxc/rootfs/root/dev/link_remap.4]
(02.354747) Error (files-reg.c:510): Can't link remap to
/usr/local/lib/lxc/rootfs/root/dev/__properties__: No such file or directory
(02.355915) [nyc_fd] Error in dump_one_reg_file->check_path_remap()
(02.356066) [nyc_fd] Going into dump_task_files_seized() : dump_one_file()


Thanks.

On Fri, Feb 27, 2015 at 3:38 AM, Pavel Emelyanov <xemul at parallels.com>
wrote:

> On 02/27/2015 12:58 AM, beproject criu wrote:
> > __properties_ is present at this path
> > /sdcard # lxc-attach -n L -- ls
> /usr/local/lib/lxc/rootfs/root/dev/__properties__ -l
> > -r--r--r--    1 0        0           131072 Feb 26 18:07
> /usr/local/lib/lxc/rootfs/root/dev/__properties__
> > /sdcard #
>
> If the file exists then link remap shouldn't be created. This is the code
> that
> is involved in this decision:
>
> In check_path_remap():
>
>       ret = fstatat(mntns_root, rpath, &pst, 0);
>
> This is where your path is being fstat-ed and:
>
>       if (ret < 0) {
>                 /*
>                  * Linked file, but path is not accessible (unless any
>                  * other error occurred). We can create a temporary link
> to it
>                  * uning linkat with AT_EMPTY_PATH flag and remap it to
> this
>                  * name.
>                  */
>
>                 if (errno == ENOENT)
>                         return dump_linked_remap(rpath + 1, plen - 1,
>                                                         ost, lfd, id,
> nsid);
>
> link remap decision is taken. If you file exists then fstatat() should have
> failed. Can you put more debug in this place checking what path is stat-ed
> and finding out where the mntns_root() fd points?
>
> Thanks,
> Pavel
>
>
>
> >
> >
> > On Fri, Feb 27, 2015 at 3:14 AM, Pavel Emelyanov <xemul at parallels.com
> <mailto:xemul at parallels.com>> wrote:
> >
> >     On 02/27/2015 12:33 AM, beproject criu wrote:
> >     > This is the error when is used --link-remap option:
> >     > Error (files-reg.c:508): Can't link remap to
> /usr/local/lib/lxc/rootfs/root/dev/__properties__: No such file or directory
> >
> >     Hm... The error ENOENT appears either because either a) criu is run
> not from user or
> >     inside user namespace or b) the dirname of the path in question
> doesn't exits.
> >
> >     Can you find out which of the above is your case?
> >
> >     > Also i have another error
> >     > Error (mount.c:624): 53:./dev/console doesn't have a proper root
> mount
> >
> >     This is because /dev/console is bind-mounted from outside. Should be
> fixed by the
> >     --ext-mount-map option.
> >
> >     > Thanks.
> >     >
> >     > On Fri, Feb 27, 2015 at 1:10 AM, Pavel Emelyanov <
> xemul at parallels.com <mailto:xemul at parallels.com> <mailto:
> xemul at parallels.com <mailto:xemul at parallels.com>>> wrote:
> >     >
> >     >     On 02/26/2015 10:31 PM, beproject criu wrote:
> >     >     > Hi,
> >     >     > What is the significance of "link_remap_ok" in cr_options
> >     >
> >     >     This allows CRIU to modify your filesystem with temporary links
> >     >     needed to restore files.
> >     >
> >     >     http://criu.org/Invisible_files
> >     >
> >     >     > I am getting following error wihile dumping fd.What could be
> the reason
> >     >     >
> >     >     > (02.230588) Error (files-reg.c:472): Can't create link remap
> for /usr/local/lib/lxc/rootfs/root/dev/__properties__. Use link-remap
> option.
> >     >
> >     >     Use the link-remap option ;)
> >     >
> >     >     # ./criu --help | fgrep link-remap
> >     >       --link-remap          allow to link unlinked files back when
> possible
> >     >
> >     >     Thanks,
> >     >     Pavel
> >     >
> >     >
> >     >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150227/30dcb7c8/attachment.html>


More information about the CRIU mailing list