[Bug 1507463] Re: OverlayFS: Wrong mnt_id and path reported in /proc in linux-3.13
oleg
1507463 at bugs.launchpad.net
Thu Oct 22 02:50:58 UTC 2015
Chris, it would be of interest to see whether you can reproduce the
underlying kernel bug using this script,
#!/bin/bash
fatal() { echo "error: $@"; exit 1; }
echo -e "testing for overlayfs kernel bug in kernels <= 3.17.";
echo -e "(This script does not work for the newer version of overlayfs in kernels 3.18+)";
mkdir test_dir || fatal "mkdir test_dir";
sudo mount -t tmpfs none test_dir || fatal "mount tmpfs";
cd test_dir;
mkdir lowerdir upperdir overlayfs;
sudo mount -t overlayfs -o lowerdir=lowerdir,upperdir=upperdir none overlayfs || fatal "mount overlayfs";
exec 6> file_tmpfs.txt;
exec 7> lowerdir/file_lowerdir.txt;
exec 8> upperdir/file_upperdir.txt;
exec 9> overlayfs/file_overlayfs.txt;
echo -e "\ncontents of /proc/$BASHPID/fd/ . A broken symbolic link to file_overlayfs.txt indicates a kernel bug";
echo "--------------------------------------------------------------------------------------------------------";
file /proc/$BASHPID/fd/[6-9];
# cleanup
exec 9>&-;
exec 8>&-;
exec 7>&-;
exec 6>&-;
sudo umount overlayfs;
cd ..;
sudo umount test_dir && rmdir test_dir;
#----------end of script
Running the script as root, sudo ./script, I get the following output,
testing for overlayfs kernel bug in kernels <= 3.17.
(This script does not work for the newer version of overlayfs in kernels 3.18+)
contents of /proc/1916/fd/ . A broken symbolic link to file_overlayfs.txt indicates a kernel bug
--------------------------------------------------------------------------------------------------------
/proc/1916/fd/6: symbolic link to `/home/ubuntu/test_dir/file_tmpfs.txt'
/proc/1916/fd/7: symbolic link to `/home/ubuntu/test_dir/lowerdir/file_lowerdir.txt'
/proc/1916/fd/8: symbolic link to `/home/ubuntu/test_dir/upperdir/file_upperdir.txt'
/proc/1916/fd/9: broken symbolic link to `/file_overlayfs.txt'
It seems that the kernel bug is causing fd 9 to point to
/file_overlayfs.txt, when it should point to
/home/ubuntu/test_dir/overlayfs/file_overlayfs.txt .
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1507463
Title:
OverlayFS: Wrong mnt_id and path reported in /proc in linux-3.13
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1507463/+subscriptions
More information about the Ubuntu-server-bugs
mailing list