<div dir="ltr">Thanks for the explanation. From your explanation, I assume that back porting Al Viro's patch to 3.18 is not an option. Correct?<div><br></div><div>--Saied</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 4, 2015 at 2:06 PM, 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 06/04/2015 11:22 PM, Saied Kazemi wrote:<br>
> I am running into the exact same CRIU failure with a mysqld server running in a container:<br>
><br>
> (00.007793) Error (proc_parse.c:404): Can't handle non-regular mapping on 26317's map 7ff7022cc000<br>
><br>
> for the following segment:<br>
><br>
> 7ff7022cc000-7ff7022ce000 rw-s 00000000 00:0a 72033 /[aio] (deleted)<br>
><br>
> I am using CRIU 1.6 on a 3.18.0 kernel. Below is the output of strace. Kernel successfully opens the file:<br>
<br>
</span>Ah! This explains everything, please, see more details below :)<br>
<span class=""><br>
> # criu --version<br>
> Version: 1.6<br>
> GitID: v1.6-5-g5e1a8a2<br>
> # criu check<br>
> Error (cr-check.c:665): AIO remap doesn't work properly<br>
<br>
</span>Yup :)<br>
<span class=""><br>
> Error (cr-check.c:681): fdinfo doesn't contain the lock field<br>
> # zcat /proc/config.gz | grep AIO<br>
> CONFIG_AIO=y<br>
> # CONFIG_DELL_WMI_AIO is not set<br>
> # strace ./aio_test /proc/26317/map_files/7ff7022cc000-7ff7022ce000<br>
> execve("./aio_test", ["./aio_test", "/proc/26317/map_files/7ff7022cc0"...], [/* 17 vars */]) = 0<br>
> uname({sys="Linux", node="saied-cr-vm", ...}) = 0<br>
> brk(0) = 0x203d000<br>
> brk(0x203e1c0) = 0x203e1c0<br>
> arch_prctl(ARCH_SET_FS, 0x203d880) = 0<br>
> readlink("/proc/self/exe", "/home/saied/aio_test", 4096) = 20<br>
> brk(0x205f1c0) = 0x205f1c0<br>
> brk(0x2060000) = 0x2060000<br>
> access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)<br>
> open("/proc/26317/map_files/7ff7022cc000-7ff7022ce000", O_RDONLY) = 3<br>
> exit_group(3) = ?<br>
> +++ exited with 3 +++<br>
><br>
> Any ideas?<br>
<br>
</span>So, there's a commit in the kernel bd9b51e7 from Al Viro which actually made files<br>
like AIO and some more report ENXIO when trying to open() those via /proc/pid/blah<br>
links. And this patch appeared in 3.19. Other than this, ability to remap the AIO<br>
ring -- the crucial thing to restore AIO -- appeared with the e4a0d3e72 commit from<br>
me also in 3.19.<br>
<br>
When doing the AIO support I took the 3.19 kernel and implemented dump and restore<br>
according to how the kernel worked with AIO-s that time -- reporting ENXIO on<br>
open and letting to remap it. On 3.18 AIO C/R wouldn't work, even if we teach CRIU<br>
to detect the ring, on restore we'll hit the problem with inability to put the<br>
ring into proper place.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Pavel<br>
<br>
</font></span></blockquote></div><br></div>