[CRIU] procfs reports unexpected mnt_id and path for overlayfs files
Andrew Vagin
avagin at odin.com
Wed Apr 15 01:50:14 PDT 2015
Hello Miklos and Everyone else,
We have a report that a container with overlayfs can't be checkpointed.
To dump file descriptors we get information from /proc/pid/fd/ and /proc/pid/fdinfo.
But in case of overlayfs we see unexpected values there.
/proc/PID/fdinfo/FD contains mnt_id which isn't presented in /proc/pid/mountinfo.
/proc/PID/fd/FD does not contain an absolute path to the opened file.
Can someone help to fix these issues?
Here is a sequance of commands to reproduce the problem:
[root@ ]# mount -t overlay overlay -olowerdir=a,upperdir=b,workdir=c z
[root@ ]# cat /proc/self/mountinfo | grep over
163 77 0:42 / /home/avagin/tmp/z rw,relatime shared:109 - overlay overlay rw,lowerdir=a,upperdir=b,workdir=c
[root@ ]# ls -l /home/avagin/tmp/z/a
-rw-r--r-- 1 root root 0 Apr 14 09:43 /home/avagin/tmp/z/a
[root@ ]# ipython
In [1]: fd = open("/home/avagin/tmp/z/a")
In [2]:
[1]+ Stopped ipython
[root@ ]# ps -C ipython
PID TTY TIME CMD
8868 pts/6 00:00:00 ipython
[root@ ]# cat /proc/8868/fdinfo/5
pos: 0
flags: 0100000
mnt_id: 164
# we expect to see mnt_id: 163
[root@ ]# ls -l /proc/8868/fd/5
lr-x------ 1 root root 64 Apr 15 11:21 /proc/8868/fd/5 -> /a
# we expect to see /proc/8868/fd/5 -> /home/avagin/tmp/z/a
Thanks,
Andrew
More information about the CRIU
mailing list