Bug 3645 - [Anck 5.10][aarch64][社区nightly][xfs文件系统]xfstests测试套下xfs/533用例执行失败
Summary: [Anck 5.10][aarch64][社区nightly][xfs文件系统]xfstests测试套下xfs/533用例执行失败
Status: RESOLVED WONTFIX
Alias: None
Product: Anolis OS 8
Classification: Anolis OS
Component: kernel - anck-5.10 (show other bugs) kernel - anck-5.10
Version: 8.6
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Ferry Meng
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-06 14:43 UTC by yunhe123
Modified: 2023-04-28 10:22 UTC (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yunhe123 alibaba_cloud_group 2023-01-06 14:43:29 UTC
Description of problem:
xfstests测试套下xfs/533用例执行失败

用例执行日志:
# ./check tests/xfs/533
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/aarch64 qibo-anolis8-nightly-func-arm-4 5.10.134-259.git.a5a0ae7bf175.an8.aarch64 #1 SMP Thu Jan 5 22:17:22 CST 2023
MKFS_OPTIONS  -- -f /dev/vdb2
MOUNT_OPTIONS -- /dev/vdb2 /fs/vdb2

xfs/533       - output mismatch (see /tmp/tone/run/xfstests/results//xfs/533.out.bad)
    --- tests/xfs/533.out       2023-01-06 00:45:36.061971443 +0800
    +++ /tmp/tone/run/xfstests/results//xfs/533.out.bad 2023-01-06 14:40:52.971983780 +0800
    @@ -2,4 +2,6 @@
     Allowing write of corrupted data with good CRC
     magicnum = 0
     bad magic number
    -0
    +cache_purge: shake on cache 0xaaaaf3c38920 left 1 nodes!?
    +cache_purge: shake on cache 0xaaaaf3c38920 left 1 nodes!?
    +cache_zero_check: refcount is 1, not zero (node=0xaaaaf3c4e0e0)
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/xfs/533.out /tmp/tone/run/xfstests/results//xfs/533.out.bad'  to see the entire diff)

HINT: You _MAY_ be missing xfsprogs fix:
      f4afdcb0ad11 xfs_db: clean up the salvage read callsites in set_cur()

Ran: xfs/533
Failures: xfs/533
Failed 1 of 1 tests

[root@qibo-anolis8-nightly-func-arm-4 xfstests]# diff -u /tmp/tone/run/xfstests/tests/xfs/533.out /tmp/tone/run/xfstests/results//xfs/533.out.bad
--- /tmp/tone/run/xfstests/tests/xfs/533.out    2023-01-06 00:45:36.061971443 +0800
+++ /tmp/tone/run/xfstests/results//xfs/533.out.bad     2023-01-06 14:40:52.971983780 +0800
@@ -2,4 +2,6 @@
 Allowing write of corrupted data with good CRC
 magicnum = 0
 bad magic number
-0
+cache_purge: shake on cache 0xaaaaf3c38920 left 1 nodes!?
+cache_purge: shake on cache 0xaaaaf3c38920 left 1 nodes!?
+cache_zero_check: refcount is 1, not zero (node=0xaaaaf3c4e0e0)




Steps to Reproduce:
wipefs -a --force /dev/vdb1  
wipefs -a --force /dev/vdb2
wipefs -a --force /dev/vdb3 
wipefs -a --force /dev/vdb4

mkfs -t xfs -L OStest -q -f /dev/vdb1
mkfs -t xfs -L OStest -q -f /dev/vdb2
mkfs -t xfs -L OStest -q -f /dev/vdb3
mkfs -t xfs -L OStest -q -f /dev/vdb4

export FSTYP=xfs
export TEST_DIR=/fs/vdb1
export TEST_DEV=/dev/vdb1
export SCRATCH_MNT=/fs/vdb2
export SCRATCH_DEV=/dev/vdb2
mkdir -p /fs/vdb1 /fs/vdb2

git clone --branch anck-4.19 https://gitee.com/anolis/xfstests.git
export CFLAGS="-fcommon"
make configure
./configure
make && make install
./check tests/xfs/533

Actual results:
用例执行通过

Expected results:
用例执行失败

Additional info:
版本信息:
cat /etc/os-release
NAME="Anolis OS"
VERSION="8.6"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.6"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.6"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

内核信息:
# uname -r
5.10.134-259.git.a5a0ae7bf175.an8.aarch64

内存信息:
# free -h
              total        used        free      shared  buff/cache   available
Mem:           15Gi       262Mi        14Gi        11Mi       754Mi        14Gi
Swap:            0B          0B          0B

cpu信息:
# lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per cluster: 4
Socket(s):           1
Cluster(s):          1
NUMA node(s):        1
Vendor ID:           ARM
BIOS Vendor ID:      Alibaba Cloud
Model:               1
Model name:          Neoverse-N1
BIOS Model name:     virt-rhel7.6.0
Stepping:            r3p1
BogoMIPS:            50.00
NUMA node0 CPU(s):   0-3
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
Comment 1 shanxifanshi alibaba_cloud_group 2023-01-06 14:50:25 UTC
anck 5.10 x86内核也有同样的问题,不过看github的最后一次commit好像把这条用例给删掉了,请开发同学参考

github xfs/533最后一次commit:
https://github.com/kdave/xfstests/commit/9ae10c882550c48868e7c0baff889bb1a7c7c8e9


内核:
# uname -r
5.10.134-264.git.a5a0ae7bf175.an8.x86_64

测试日志:
# ./check tests/xfs/533
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/x86_64 qibo-anolis8-nightly-func-x86-3 5.10.134-264.git.a5a0ae7bf175.an8.x86_64 #1 SMP Thu Jan 5 21:47:27 CST 2023
MKFS_OPTIONS  -- -f /dev/vdb2
MOUNT_OPTIONS -- /dev/vdb2 /fs/vdb2

xfs/533       - output mismatch (see /root/xfstests/results//xfs/533.out.bad)
    --- tests/xfs/533.out       2023-01-05 17:52:49.306472420 +0800
    +++ /root/xfstests/results//xfs/533.out.bad 2023-01-06 14:12:48.598593830 +0800
    @@ -2,4 +2,6 @@
     Allowing write of corrupted data with good CRC
     magicnum = 0
     bad magic number
    -0
    +cache_purge: shake on cache 0x55b9b9e53920 left 1 nodes!?
    +cache_purge: shake on cache 0x55b9b9e53920 left 1 nodes!?
    +cache_zero_check: refcount is 1, not zero (node=0x55b9b9e68110)
    ...
    (Run 'diff -u /root/xfstests/tests/xfs/533.out /root/xfstests/results//xfs/533.out.bad'  to see the entire diff)

HINT: You _MAY_ be missing xfsprogs fix:
      f4afdcb0ad11 xfs_db: clean up the salvage read callsites in set_cur()

Ran: xfs/533
Failures: xfs/533
Failed 1 of 1 tests
Comment 2 meil_wei alibaba_cloud_group 2023-01-06 16:29:34 UTC
Anolis7 4.19 aarch64最新的nightly内核有同样的问题
# cat /etc/os-release
NAME="Anolis OS"
VERSION="7.9"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="7.9"
PRETTY_NAME="Anolis OS 7.9"
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"

# uname -r
4.19.91-256.git.dc94d81.an7.aarch64
Comment 3 zhixin01 alibaba_cloud_group 2023-01-09 10:36:00 UTC
anolis8 4.19 x86_64最新nightly也有相同问题
# ssh root@101.200.158.78
root@101.200.158.78's password:

Welcome to Alibaba Cloud Elastic Compute Service !

Last login: Fri Jan  6 15:13:12 2023 from 182.92.205.199
[root@qibo-anolis8-nightly-func-x86-2 ~]# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.6"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.6"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.6"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

# uname -r
4.19.91-260.git.dc94d8113a48.an8.x86_64

# yum list xfsprogs
Last metadata expiration check: 0:50:25 ago on Mon 09 Jan 2023 09:32:19 AM CST.
Installed Packages
xfsprogs.x86_64                                           5.0.0-10.0.3.an8                                            @System
Comment 4 wangpingping alibaba_cloud_group 2023-01-11 14:51:49 UTC
anolis7-4.19-x86-64最新nightly内核有同样失败
# uname -r
4.19.91-255.git.98e6929.an7.x86_64
# cat /etc/os-release
NAME="Anolis OS"
VERSION="7.9"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="7.9"
PRETTY_NAME="Anolis OS 7.9"
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"
Comment 5 anolislw alibaba_cloud_group 2023-01-11 17:19:53 UTC
anolis8.6 ck-4.19 aarch64该case存在相同问题

xfs/533       - output mismatch (see /tmp/tone/run/xfstests/results//xfs/533.out.bad)
    --- tests/xfs/533.out	2023-01-10 23:47:29.363524471 +0800
    +++ /tmp/tone/run/xfstests/results//xfs/533.out.bad	2023-01-11 02:04:25.746859462 +0800
    @@ -2,4 +2,6 @@
     Allowing write of corrupted data with good CRC
     magicnum = 0
     bad magic number
    -0
    +cache_purge: shake on cache 0xaaaafb79c920 left 1 nodes!?
    +cache_purge: shake on cache 0xaaaafb79c920 left 1 nodes!?
    +cache_zero_check: refcount is 1, not zero (node=0xaaaafb7b20e0)
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/xfs/533.out /tmp/tone/run/xfstests/results//xfs/533.out.bad'  to see the entire diff)

HINT: You _MAY_ be missing xfsprogs fix:
      f4afdcb0ad11 xfs_db: clean up the salvage read callsites in set_cur()
Comment 6 Ferry Meng alibaba_cloud_group 2023-04-24 09:38:35 UTC
test/xfs/533 : 该项测试检查“ xfs_db 应当可以读取被破坏的 magicnum 字段值”。

ANCK5.10/4.19 Anolis8.6 x86 环境下,使用官方原生xfsprogs 5.10版本(包含补丁 f4afdcb0ad11 xfs_db: clean up the salvage read callsites in set_cur() ),可以解决问题。

该补丁需要更多依赖,主要是libxfs_buf_read_map等函数接口修改,集中在 xfsprogs 5.6 版本,依赖较多,直接backport回5.0版本的难度很大。

该测试样例主要测试边界条件(破坏magicnum),对xfs正常使用无影响,建议等xfsprogs大版本更新/不合入。
Comment 7 Ferry Meng alibaba_cloud_group 2023-04-28 10:22:18 UTC
won't fix temporarily.

(In reply to Ferry Meng from comment #6)
> test/xfs/533 : 该项测试检查“ xfs_db 应当可以读取被破坏的 magicnum 字段值”。
> 
> ANCK5.10/4.19 Anolis8.6 x86 环境下,使用官方原生xfsprogs 5.10版本(包含补丁 f4afdcb0ad11
> xfs_db: clean up the salvage read callsites in set_cur() ),可以解决问题。
> 
> 该补丁需要更多依赖,主要是libxfs_buf_read_map等函数接口修改,集中在 xfsprogs 5.6
> 版本,依赖较多,直接backport回5.0版本的难度很大。
> 
> 该测试样例主要测试边界条件(破坏magicnum),对xfs正常使用无影响,建议等xfsprogs大版本更新/不合入。