<div dir="ltr">This is the flow before error,could you get what's wrong : <br><div><br>(02.352922) Dumping path for 4 fd via self 43 [/usr/local/lib/lxc/rootfs/root/dev/__properties__]<br>(02.353079) [nyc_fd] The required root is already opened. get_service_fd() returns : 1017<br>(02.353216) [nyc_fd] Going into fstatat()-> [mntns_root : 1017],[rpath : ./usr/local/lib/lxc/rootfs/root/dev/__properties__]<br>(02.353398) [nyc_fd] Out of fstatat()-> [ret : -1],[rpath : ./usr/local/lib/lxc/rootfs/root/dev/__properties__]<br>(02.353574) [nyc_fd] Going into dump_linked_remap()<br>(02.354191) [nyc_fd] The required root is already opened. get_service_fd() returns : 1017<br>(02.354431) [nyc_fd] Doing linkat() [mntns_root : 1017],[link_name : ./usr/local/lib/lxc/rootfs/root/dev/link_remap.4] <br>(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<br>(02.355915) [nyc_fd] Error in dump_one_reg_file->check_path_remap() <br>(02.356066) [nyc_fd] Going into dump_task_files_seized() : dump_one_file()<br><br><br></div><div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 27, 2015 at 3:38 AM, Pavel Emelyanov <span dir="ltr"><<a href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 02/27/2015 12:58 AM, beproject criu wrote:<br>
> __properties_ is present at this path<br>
> /sdcard # lxc-attach -n L -- ls /usr/local/lib/lxc/rootfs/root/dev/__properties__ -l<br>
> -r--r--r-- 1 0 0 131072 Feb 26 18:07 /usr/local/lib/lxc/rootfs/root/dev/__properties__<br>
> /sdcard #<br>
<br>
</span>If the file exists then link remap shouldn't be created. This is the code that<br>
is involved in this decision:<br>
<br>
In check_path_remap():<br>
<br>
ret = fstatat(mntns_root, rpath, &pst, 0);<br>
<br>
This is where your path is being fstat-ed and:<br>
<br>
if (ret < 0) {<br>
/*<br>
* Linked file, but path is not accessible (unless any<br>
* other error occurred). We can create a temporary link to it<br>
* uning linkat with AT_EMPTY_PATH flag and remap it to this<br>
* name.<br>
*/<br>
<br>
if (errno == ENOENT)<br>
return dump_linked_remap(rpath + 1, plen - 1,<br>
ost, lfd, id, nsid);<br>
<br>
link remap decision is taken. If you file exists then fstatat() should have<br>
failed. Can you put more debug in this place checking what path is stat-ed<br>
and finding out where the mntns_root() fd points?<br>
<br>
Thanks,<br>
Pavel<br>
<span class="im HOEnZb"><br>
<br>
<br>
><br>
><br>
> On Fri, Feb 27, 2015 at 3:14 AM, Pavel Emelyanov <<a href="mailto:xemul@parallels.com">xemul@parallels.com</a> <mailto:<a href="mailto:xemul@parallels.com">xemul@parallels.com</a>>> wrote:<br>
><br>
> On 02/27/2015 12:33 AM, beproject criu wrote:<br>
> > This is the error when is used --link-remap option:<br>
> > Error (files-reg.c:508): Can't link remap to /usr/local/lib/lxc/rootfs/root/dev/__properties__: No such file or directory<br>
><br>
> Hm... The error ENOENT appears either because either a) criu is run not from user or<br>
> inside user namespace or b) the dirname of the path in question doesn't exits.<br>
><br>
> Can you find out which of the above is your case?<br>
><br>
> > Also i have another error<br>
> > Error (mount.c:624): 53:./dev/console doesn't have a proper root mount<br>
><br>
> This is because /dev/console is bind-mounted from outside. Should be fixed by the<br>
> --ext-mount-map option.<br>
><br>
> > Thanks.<br>
> ><br>
</span><div class="HOEnZb"><div class="h5">> > On Fri, Feb 27, 2015 at 1:10 AM, Pavel Emelyanov <<a href="mailto:xemul@parallels.com">xemul@parallels.com</a> <mailto:<a href="mailto:xemul@parallels.com">xemul@parallels.com</a>> <mailto:<a href="mailto:xemul@parallels.com">xemul@parallels.com</a> <mailto:<a href="mailto:xemul@parallels.com">xemul@parallels.com</a>>>> wrote:<br>
> ><br>
> > On 02/26/2015 10:31 PM, beproject criu wrote:<br>
> > > Hi,<br>
> > > What is the significance of "link_remap_ok" in cr_options<br>
> ><br>
> > This allows CRIU to modify your filesystem with temporary links<br>
> > needed to restore files.<br>
> ><br>
> > <a href="http://criu.org/Invisible_files" target="_blank">http://criu.org/Invisible_files</a><br>
> ><br>
> > > I am getting following error wihile dumping fd.What could be the reason<br>
> > ><br>
> > > (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.<br>
> ><br>
> > Use the link-remap option ;)<br>
> ><br>
> > # ./criu --help | fgrep link-remap<br>
> > --link-remap allow to link unlinked files back when possible<br>
> ><br>
> > Thanks,<br>
> > Pavel<br>
> ><br>
> ><br>
> ><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>