Bug 1099 - [Anck 4.19][ck26_rc1][xfs文件系统]xfstests xfs xfs/516 Root directory got nuked
Summary: [Anck 4.19][ck26_rc1][xfs文件系统]xfstests xfs xfs/516 Root directory got nuked
Status: RESOLVED WONTFIX
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: gaoxiang
QA Contact: shuming
URL:
Whiteboard:
Keywords:
: 3678 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-05 18:34 UTC by kangjiangbo
Modified: 2023-01-11 17:12 UTC (History)
5 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-05 18:34:45 UTC
Description of problem:
xfs文件系统,xfstests下xfs/516 Root directory got nuked
x86和arm均存在该问题

失败几率:100%
测试日志:
# ./check tests/xfs/516
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/x86_64 iZ2ze6n8cezigzjqlcfjadZ 4.19.91-26_rc1.an7.x86_64 #1 SMP Mon Apr 25 17:24:24 CST 2022
MKFS_OPTIONS  -- -f -bsize=4096 /dev/vdb2
MOUNT_OPTIONS -- /dev/vdb2 /fs/scratch

xfs/516 - output mismatch (see /tmp/tone/run/xfstests/results//xfs/516.out.bad)
    --- tests/xfs/516.out       2022-04-27 21:06:26.637733724 +0800
    +++ /tmp/tone/run/xfstests/results//xfs/516.out.bad 2022-05-05 18:33:19.416686679 +0800
    @@ -5,5 +5,7 @@
     Test: 512k stripe unit; 4x stripe width
     Test: 512k stripe unit; 3x stripe width
     Test: 128k stripe unit; 8x stripe width
    +Repair found problems.
    +Root directory got nuked.
     Test: Repair of 128k stripe unit; 8x stripe width
     Test: Formatting with sunit=1fsb,swidth=1fsb and mounting with larger swidth
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/xfs/516.out /tmp/tone/run/xfstests/results//xfs/516.out.bad'  to see the entire diff)
Ran: xfs/516
Failures: xfs/516
Failed 1 of 1 tests


Version-Release number of selected component (if applicable):
# uname -a
Linux iZ2ze6n8cezigzjqlcfjadZ 4.19.91-26_rc1.an7.x86_64 #1 SMP Mon Apr 25 17:24:24 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
# uname -a
Linux iZ2zebfu2pfe96wy4xb5lsZ 4.19.91-26_rc1.an7.aarch64 #1 SMP Mon Apr 25 17:30:58 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
# 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 xfs -L OStest -q -f /dev/$disk1
mkfs -t xfs -L OStest -q -f /dev/$disk2

export TEST_DIR=/fs/$disk1
export TEST_DEV=/dev/$disk1
export FSTYP=xfs
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

4.执行测试用例
./check tests/xfs/516


Expected results:


Additional info:
xfsprogs-4.5.0-22.an7.x86_64
Comment 1 kangjiangbo 2022-05-05 18:35:17 UTC
an8 pass
Comment 2 gaoxiang alibaba_cloud_group 2022-05-06 20:16:32 UTC
intermediate file on error:

struct ftrace_chk {
        unsigned long long      num;
        char                    *str;
} syms[] = {
{ ((xfs_lookup_t)XFS_LOOKUP_EQi), "eq" },
{ ((xfs_lookup_t)XFS_LOOKUP_GEi), "ge" },
{ ((xfs_lookup_t)XFS_LOOKUP_LEi), "le" },
{ (1 << 0), "IN_AIL" },
{ (1 << 0), "LC" },
{ (1 << 0), "READ" },
{ (1 << 1), "ABORTED" },
{ (1 << 1), "RC" },
{ (1 << 1), "WRITE" },
{ (1 << 10), "SYNCIO" },
{ (1 << 11), "FUA" },


related patchset:
https://lore.kernel.org/r/154516555511.31776.9868161112615886200.stgit@magnolia/
Comment 3 gaoxiang alibaba_cloud_group 2022-05-06 20:22:29 UTC
after this patchset applied, the test passes.
FSTYP         -- xfs (debug)
PLATFORM      -- Linux/x86_64 e18g06460 4.19.91+ #5 SMP Fri May 6 20:20:40 CST 2022
MKFS_OPTIONS  -- -f /dev/loop1
MOUNT_OPTIONS -- /dev/loop1 /mnt/scratch_mnt

xfs/499  1s
Ran: xfs/499
Passed all 1 tests

But I'm not sure if we should backport this patchset since it's just a tracepoint cleanup.
Comment 4 gaoxiang alibaba_cloud_group 2022-05-06 20:24:41 UTC
since ``tracepoint cleanups`` doesn't affect the kernel stabilization, mark it as WONTFIX.
Comment 5 Joseph Qi alibaba_cloud_group 2022-05-06 20:25:56 UTC
Agree, since 4.19 kernel is in maintenance, we'd better only fix those importance bugs.
Comment 6 gaoxiang alibaba_cloud_group 2022-05-06 21:50:19 UTC
sorry I commented the wrong BZ, will recomment on the correct BZ instead.
Comment 7 gaoxiang alibaba_cloud_group 2022-05-06 21:52:14 UTC
reopen this issue
Comment 8 kangjiangbo 2022-05-07 16:48:51 UTC
使用最新xfstests代码https://github.com/kdave/xfstests.git + xfsprogs-4.19.0-5.0.1.an7 依然失败
Comment 9 Joseph Qi alibaba_cloud_group 2022-05-10 14:49:50 UTC
该问题为新用例,对应的修复 patchset:
https://lore.kernel.org/linux-xfs/157669784202.117895.9984764081860081830.stgit@magnolia/

在 linux 5.5 合入主线,其至少还依赖 inode geometry 的重构:
https://lore.kernel.org/linux-xfs/155968493259.1657505.18397791996876650910.stgit@magnolia/

从测试用例的描述:
Update sunit and width and make sure that the filesystem still passes xfs_repair afterwards.

并非一个正常使用的场景,考虑到回合的代码修改量比较大,建议在 4.19 内核遗留。
Comment 10 gaoxiang alibaba_cloud_group 2022-05-10 14:55:40 UTC
同意,xfs很多新增用例都是回归新增行为变动或者是接口变动。
建议4.19此用例保持现状。
Comment 11 Joseph Qi alibaba_cloud_group 2022-05-10 14:57:27 UTC
内部达成一致,该问题在 4.19 内核不作修复
Comment 12 meil_wei alibaba_cloud_group 2023-01-10 14:39:59 UTC
*** Bug 3678 has been marked as a duplicate of this bug. ***
Comment 13 anolislw alibaba_cloud_group 2023-01-11 17:12:43 UTC
anolis8.6 ck-4.19 aarch64该case存在相同问题

xfs/516       - output mismatch (see /tmp/tone/run/xfstests/results//xfs/516.out.bad)
    --- tests/xfs/516.out	2023-01-10 23:47:29.331524253 +0800
    +++ /tmp/tone/run/xfstests/results//xfs/516.out.bad	2023-01-11 02:04:16.098794503 +0800
    @@ -5,5 +5,7 @@
     Test: 512k stripe unit; 4x stripe width
     Test: 512k stripe unit; 3x stripe width
     Test: 128k stripe unit; 8x stripe width
    +Repair found problems.
    +Root directory got nuked.
     Test: Repair of 128k stripe unit; 8x stripe width
     Test: Formatting with sunit=1fsb,swidth=1fsb and mounting with larger swidth
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/xfs/516.out /tmp/tone/run/xfstests/results//xfs/516.out.bad'  to see the entire diff)