Bug 1220 - [Anck 4.19][ck26_rc3][xfs文件系统]xfstests ext4-overlay overlay/070 lock for dir not found by ino 9223372036855693316
Summary: [Anck 4.19][ck26_rc3][xfs文件系统]xfstests ext4-overlay overlay/070 lock for dir ...
Status: RESOLVED FIXED
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: fs (show other bugs) fs
Version: 4.19-026.x
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: hongnan_Li
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-13 16:51 UTC by kangjiangbo
Modified: 2022-05-18 16:52 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kangjiangbo 2022-05-13 16:51:26 UTC
Description of problem:
xfs文件系统,xfstests ext4-overlay overlay/070 lock for dir not found by ino 9223372036855693316
x86和arm均存在该问题,非regression,RC1版本亦存在此问题
an8成功

失败几率:必现

Version-Release number of selected component (if applicable):
# uname -r
4.19.91-26_rc3.an7.aarch64
# uname -r
4.19.91-26_rc3.an7.x86_64

# cat /etc/os-release
NAME="Anolis OS"
VERSION="7.7"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="7.7"
PRETTY_NAME="Anolis OS 7.7"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugs.openanolis.cn/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"



How reproducible:
1. 准备环境
#准备disk1 disk2测试盘,视本地环境修改
disk1=vdb1
disk2=vdb2

dmsetup remove_all
wipefs -a --force /dev/$disk1
wipefs -a --force /dev/$disk2

mkfs -t ext4 -q -F /dev/$disk1
mkfs -t ext4 -q -F /dev/$disk2

export TEST_DIR=/fs/$disk1
export TEST_DEV=/dev/$disk1
export FSTYP=ext4
export SCRATCH_MNT=/fs/scratch
mkdir /fs/$disk1 -p
mkdir /fs/scratch -p
export SCRATCH_DEV=/dev/$disk2

2. 下载xfstests测试代码

3. 编译测试源码
cd xfstests-dev
export CFLAGS="-fcommon"
make
make install


Actual results:
 ./check -overlay tests/overlay/070
FSTYP         -- overlay
PLATFORM      -- Linux/aarch64 iZ2zebfu2pfe96wy4xb5lsZ 4.19.91-26_rc3.an7.aarch64 #1 SMP Tue May 10 20:56:42 CST 2022
MKFS_OPTIONS  -- /fs/vdb2
MOUNT_OPTIONS -- /fs/vdb2 /fs/vdb2/ovl-mnt

overlay/070     - output mismatch (see /tmp/tone/run/xfstests/results//overlay/070.out.bad)
    --- tests/overlay/070.out   2022-05-11 18:45:58.393458505 +0800
    +++ /tmp/tone/run/xfstests/results//overlay/070.out.bad     2022-05-13 16:46:08.737917098 +0800
    @@ -1,2 +1,94 @@
     QA output created by 070
    +lock for dir not found by ino 9223372036855693316 (/tmp/9511.before.lo) - see /tmp/tone/run/xfstests/results//overlay/070.full
    +lock for file not found by ino 9223372036855693317 (/tmp/9511.before.lo) - see /tmp/tone/run/xfstests/results//overlay/070.full
    +lock for link not found by ino 9223372036855693319 (/tmp/9511.before.lo) - see /tmp/tone/run/xfstests/results//overlay/070.full
    +lock for chrdev not found by ino 9223372036855693320 (/tmp/9511.before.lo) - see /tmp/tone/run/xfstests/results//overlay/070.full
    +lock for blkdev not found by ino 9223372036855693321 (/tmp/9511.before.lo) - see /tmp/tone/run/xfstests/results//overlay/070.full
    +lock for dir not found by ino 9223372036855562243 (/tmp/9511.before.up) - see /tmp/tone/run/xfstests/results//overlay/070.full
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/070.out /tmp/tone/run/xfstests/results//overlay/070.out.bad'  to see the entire diff)
Ran: overlay/070
Failures: overlay/070
Failed 1 of 1 tests

Expected results:

Additional info:
xfsprogs-4.5.0-22.an7
xfsprogs-4.19.0-5.0.1.an7
均失败
x86和arm均存在该问题,非regression,RC1版本亦存在此问题
an8成功
Comment 1 kangjiangbo 2022-05-13 16:55:06 UTC
overlay/071也是一样的问题
# ./check -overlay tests/overlay/071
FSTYP         -- overlay
PLATFORM      -- Linux/aarch64 iZ2zebfu2pfe96wy4xb5lsZ 4.19.91-26_rc3.an7.aarch64 #1 SMP Tue May 10 20:56:42 CST 2022
MKFS_OPTIONS  -- /fs/vdb2
MOUNT_OPTIONS -- /fs/vdb2 /fs/vdb2/ovl-mnt

overlay/071     - output mismatch (see /tmp/tone/run/xfstests/results//overlay/071.out.bad)
    --- tests/overlay/071.out   2022-05-11 18:45:58.353458472 +0800
    +++ /tmp/tone/run/xfstests/results//overlay/071.out.bad     2022-05-13 16:54:55.870291791 +0800
    @@ -1,2 +1,82 @@
     QA output created by 071
    +lock for file not found by ino 9223372041151574532 (/tmp/16751.before.lo) - see /tmp/tone/run/xfstests/results//overlay/071.full
    +lock for link not found by ino 9223372041151574534 (/tmp/16751.before.lo) - see /tmp/tone/run/xfstests/results//overlay/071.full
    +lock for chrdev not found by ino 9223372041151574535 (/tmp/16751.before.lo) - see /tmp/tone/run/xfstests/results//overlay/071.full
    +lock for blkdev not found by ino 9223372041151574536 (/tmp/16751.before.lo) - see /tmp/tone/run/xfstests/results//overlay/071.full
    +lock for file not found by ino 9223372036855562243 (/tmp/16751.before.up) - see /tmp/tone/run/xfstests/results//overlay/071.full
    +lock for link not found by ino 9223372036855562245 (/tmp/16751.before.up) - see /tmp/tone/run/xfstests/results//overlay/071.full
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/071.out /tmp/tone/run/xfstests/results//overlay/071.out.bad'  to see the entire diff)
Ran: overlay/071
Failures: overlay/071
Failed 1 of 1 tests
Comment 2 hongnan_Li alibaba_cloud_group 2022-05-17 20:46:41 UTC
该测试用例测试readdir entries d_ino和/proc/locks中的i_ino是否与st_ino一致。
主要的未合入的bugfix补丁为:
commit b7bf9908: 
      ovl: fix corner case of non-constant st_dev;st_ino
commit 98ca480a
      locks: print unsigned ino in /proc/locks
Comment 3 hongnan_Li alibaba_cloud_group 2022-05-18 14:34:20 UTC
(In reply to hongnan_Li from comment #2)
> 该测试用例测试readdir entries d_ino和/proc/locks中的i_ino是否与st_ino一致。
> 主要的未合入的bugfix补丁为:
> commit b7bf9908: 
>       ovl: fix corner case of non-constant st_dev;st_ino
> commit 98ca480a
>       locks: print unsigned ino in /proc/locks

经验证,合入以下两个补丁可以pass该用例:
9df085f3c9a2 ovl: relax requirement for non null uuid of lower fs
98ca480a8f22 locks: print unsigned ino in /proc/locks
Comment 4 hongnan_Li alibaba_cloud_group 2022-05-18 16:52:06 UTC
merged at:
https://gitee.com/anolis/cloud-kernel/pulls/380