Bug 19206 - [ANCK6.6.71-3 rc1][aarch64][倚天710机器]xfstests ext4 文件系统,generic/645用例执行失败,idmapped-mounts.c: 6671: nested_userns - Success - failure: sys_mount_setattr
Summary: [ANCK6.6.71-3 rc1][aarch64][倚天710机器]xfstests ext4 文件系统,generic/645用例执行失败,idma...
Status: RESOLVED WONTFIX
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: aarch64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: chenzhuo
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-04 14:56 UTC by zhixin01
Modified: 2025-07-04 11:51 UTC (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhixin01 alibaba_cloud_group 2025-03-04 14:56:51 UTC
[缺陷描述]:
xfstests ext4 文件系统,generic/645用例执行失败,idmapped-mounts.c: 6671: nested_userns - Success - failure: sys_mount_setattr

测试日志如下:
#./check generic/645
FSTYP         -- ext4
PLATFORM      -- Linux/aarch64 v43c07451 6.6.71-3_rc1.al8.aarch64 #1 SMP PREEMPT_DYNAMIC Fri Feb 21 11:47:20 CST 2025
MKFS_OPTIONS  -- -F /dev/nvme0n1p2
MOUNT_OPTIONS -- -o acl,user_xattr /dev/nvme0n1p2 /fs/nvme0n1p2

generic/645       [failed, exit status 1]- output mismatch (see /var/tmp/tone/run/xfstests/results//generic/645.out.bad)
    --- tests/generic/645.out   2025-03-04 13:43:34.973763492 +0800
    +++ /var/tmp/tone/run/xfstests/results//generic/645.out.bad 2025-03-04 14:15:15.878151097 +0800
    @@ -1,2 +1,4 @@
     QA output created by 645
     Silence is golden
    +idmapped-mounts.c: 6671: nested_userns - Success - failure: sys_mount_setattr
    +vfstest.c: 2418: run_test - Success - failure: test that nested user namespaces behave correctly when attached to idmapped mounts
    ...
    (Run 'diff -u /var/tmp/tone/run/xfstests/tests/generic/645.out /var/tmp/tone/run/xfstests/results//generic/645.out.bad'  to see the entire diff)
Ran: generic/645
Failures: generic/645
Failed 1 of 1 tests

[重现概率]:
必现

[重现环境]:
环境信息:倚天710机器
100.82.243.208

#uname -r
6.6.71-3_rc1.al8.aarch64

#cat /etc/os-release
NAME="Alibaba Cloud Linux"
VERSION="3 (Soaring Falcon)"
ID="alinux"
ID_LIKE="rhel fedora centos anolis"
VERSION_ID="3"
UPDATE_ID="10"
PLATFORM_ID="platform:al8"
PRETTY_NAME="Alibaba Cloud Linux 3 (Soaring Falcon)"
ANSI_COLOR="0;31"
HOME_URL="https://www.aliyun.com/"

#lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              124
On-line CPU(s) list: 0-123
Thread(s) per core:  1
Core(s) per socket:  124
Socket(s):           1
NUMA node(s):        2
Vendor ID:           ARM
BIOS Vendor ID:      T-HEAD
Model:               0
Model name:          Neoverse-N2
BIOS Model name:     Yitian710-124
Stepping:            r0p0
CPU MHz:             2750.002
BogoMIPS:            100.00
Hypervisor vendor:   Alibaba
Virtualization type: full
L1d cache:           64K
L1i cache:           64K
L2 cache:            1024K
L3 cache:            65536K
NUMA node0 CPU(s):   0-61
NUMA node1 CPU(s):   62-123
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh

#free -h
              total        used        free      shared  buff/cache   available
Mem:          251Gi       5.7Gi       243Gi       9.0Mi       4.0Gi       245Gi
Swap:         2.0Gi       116Mi       1.9Gi

#cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/boot/vmlinuz-6.6.71-3_rc1.al8.aarch64 root=UUID=5d4c9cac-5324-464b-8971-09deff261ae7 ro biosdevname=0 rd.driver.pre=ahci iommu.passthrough=1 iommu.strict=0 nospectre_bhb ssbd=force-off systemd.unified_cgroup_hierarchy=0 cgroup.memory=nokmem console=ttyS0,115200 fsck.repair=yes crashkernel=0M-2G:0M,2G-256G:256M,256G-1024G:320M,1024G-:384M

[重现步骤]:
# 下载并编译测试套
git clone http://gitlab-sp.alibaba-inc.com/AKTF/xfstests-dev.git -b kernel_6.6
cd xfstests-dev
make

# 测试准备
mkfs.ext4 /dev/nvme0n1p1
mkfs.ext4 /dev/nvme0n1p2
export FSTYP=ext4
export TEST_DEV=/dev/nvme0n1p1
export SCRATCH_DEV=/dev/nvme0n1p2
export TEST_DIR=/fs/nvme0n1p1
export SCRATCH_MNT=/fs/nvme0n1p2

# 执行测试
./check generic/645

[期望结果]:
用例执行PASS

[实际结果]:
用例执行Fail

[分析]
1. 取上游最新代码测试,用例也是fail的(https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git)
#./check generic/645
FSTYP         -- ext4
PLATFORM      -- Linux/aarch64 v43c07451 6.6.71-3_rc1.al8.aarch64 #1 SMP PREEMPT_DYNAMIC Fri Feb 21 11:47:20 CST 2025
MKFS_OPTIONS  -- -F /dev/nvme0n1p2
MOUNT_OPTIONS -- -o acl,user_xattr /dev/nvme0n1p2 /fs/nvme0n1p2

generic/645       [failed, exit status 1]- output mismatch (see /root/xfstests-dev/results//generic/645.out.bad)
    --- tests/generic/645.out   2025-03-04 14:05:30.611593806 +0800
    +++ /root/xfstests-dev/results//generic/645.out.bad 2025-03-04 14:55:15.615015585 +0800
    @@ -1,2 +1,4 @@
     QA output created by 645
     Silence is golden
    +idmapped-mounts.c: 6671: nested_userns - Success - failure: sys_mount_setattr
    +vfstest.c: 2418: run_test - Success - failure: test that nested user namespaces behave correctly when attached to idmapped mounts
    ...
    (Run 'diff -u /root/xfstests-dev/tests/generic/645.out /root/xfstests-dev/results//generic/645.out.bad'  to see the entire diff)

This test wants kernel fix:
      dacfd001eaf2 fs/mnt_idmapping.c: Return -EINVAL when no map is written

Ran: generic/645
Failures: generic/645
Failed 1 of 1 tests

以上请参考
Comment 1 zhixin01 alibaba_cloud_group 2025-03-04 17:37:46 UTC
alinux3 6.6.71-3_rc1.al8.aarch64环境下,xfstests ext4和xfs文件系统,generic/645用例有同样的失败

generic/645       [failed, exit status 1]- output mismatch (see /var/tmp/tone/run/xfstests/results//generic/645.out.bad)
    --- tests/generic/645.out   2025-03-04 13:43:34.973763492 +0800
    +++ /var/tmp/tone/run/xfstests/results//generic/645.out.bad 2025-03-04 17:36:34.124943222 +0800
    @@ -1,2 +1,4 @@
     QA output created by 645
     Silence is golden
    +idmapped-mounts.c: 6671: nested_userns - Success - failure: sys_mount_setattr
    +vfstest.c: 2418: run_test - Success - failure: test that nested user namespaces behave correctly when attached to idmapped mounts
    ...
    (Run 'diff -u /var/tmp/tone/run/xfstests/tests/generic/645.out /var/tmp/tone/run/xfstests/results//generic/645.out.bad'  to see the entire diff)
Ran: generic/645
Failures: generic/645
Failed 1 of 1 tests
Comment 2 chenzhuo alibaba_cloud_group 2025-03-05 11:26:57 UTC
上游社区已知问题,在6.9以下内核忽略该问题即可
https://lore.kernel.org/fstests/20241110180533.GA200429@mit.edu/
Comment 3 yunhe123 alibaba_cloud_group 2025-06-30 15:52:11 UTC
ecs环境,6.6.88-cbp.git.8932083f9.an23.aarch64内核,xfstests测试ext4文件系统该用例存在同样的问题,日志如下:


ext4/053       [failed, exit status 27]- output mismatch (see /var/tmp/tone/run/xfstests/results//ext4/053.out.bad)
    --- tests/ext4/053.out      2025-06-30 14:49:09.745130115 +0800
    +++ /var/tmp/tone/run/xfstests/results//ext4/053.out.bad    2025-06-30 14:52:04.173698387 +0800
    @@ -1,2 +1,29 @@
     QA output created by 053
     Silence is golden.
    +mounting ext2 "usrjquota=" (failed mount) FAILED
    +mounting ext2 "grpjquota=" (failed mount) FAILED
    +mounting ext2 "lazytime" checking "lazytime" (not found) FAILED
    +mounting ext2 "grpjquota=q.g,jqfmt=vfsv0" checking "grpjquota=q.g,jqfmt=vfsv0" remounting "grpjquota=" (failed mount) FAILED
    +mounting ext2 "usrjquota=q.u,jqfmt=vfsv0" checking "usrjquota=q.u,jqfmt=vfsv0" remounting "usrjquota=" (failed mount) FAILED
    ...
    (Run 'diff -u /var/tmp/tone/run/xfstests/tests/ext4/053.out /var/tmp/tone/run/xfstests/results//ext4/053.out.bad'  to see the entire diff)
Comment 4 yunhe123 alibaba_cloud_group 2025-07-01 09:48:51 UTC
ecs环境,6.6.88-cbp.git.8932083f9.an23.aarch64内核,xfstests测试xfs文件系统该用例存在同样的问题
Comment 5 gaohongmei 2025-07-03 15:18:25 UTC
anolis23 x86 6.6.88环境,xfstests xfs,generic/645用例也报这个错

# uname -r
6.6.88-cbp.git.8c112c479.an23.x86_64

# cat /etc/anolis-release 
Anolis OS release 23

# ./check generic/645
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/x86_64 iZbp1buoq4hel9h1qekepsZ 6.6.88-cbp.git.8c112c479.an23.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul  2 22:32:14 CST 2025
MKFS_OPTIONS  -- -f /dev/vdb2
MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/vdb2 /fs/vdb2

generic/645       [failed, exit status 1]- output mismatch (see /tmp/tone/run/xfstests/results//generic/645.out.bad)
    --- tests/generic/645.out   2025-07-03 07:12:05.893176987 +0800
    +++ /tmp/tone/run/xfstests/results//generic/645.out.bad     2025-07-03 15:17:17.221973331 +0800
    @@ -1,2 +1,4 @@
     QA output created by 645
     Silence is golden
    +idmapped-mounts.c: 6671: nested_userns - Success - failure: sys_mount_setattr
    +vfstest.c: 2418: run_test - Success - failure: test that nested user namespaces behave correctly when attached to idmapped mounts
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/645.out /tmp/tone/run/xfstests/results//generic/645.out.bad'  to see the entire diff)
Ran: generic/645
Failures: generic/645
Failed 1 of 1 tests
Comment 6 gaohongmei 2025-07-04 11:51:33 UTC
6.6.88  x86环境,xfstests测试generic/645用例存在同样的问题

# uname -r
6.6.88-cbp.git.3ccff695e.an23.x86_64

# cat /etc/anolis-release 
Anolis OS release 23

# ./check generic/645
FSTYP         -- ext4
PLATFORM      -- Linux/x86_64 iZbp14mzaknw3bqe6ujc9zZ 6.6.88-cbp.git.3ccff695e.an23.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul  3 22:30:35 CST 2025
MKFS_OPTIONS  -- -F /dev/vdb2
MOUNT_OPTIONS -- -o acl,user_xattr -o context=system_u:object_r:root_t:s0 /dev/vdb2 /fs/vdb2

generic/645       [failed, exit status 1]- output mismatch (see /tmp/tone/run/xfstests/results//generic/645.out.bad)
    --- tests/generic/645.out   2025-07-04 08:30:11.445368085 +0800
    +++ /tmp/tone/run/xfstests/results//generic/645.out.bad     2025-07-04 11:50:22.302319391 +0800
    @@ -1,2 +1,4 @@
     QA output created by 645
     Silence is golden
    +idmapped-mounts.c: 6671: nested_userns - Success - failure: sys_mount_setattr
    +vfstest.c: 2418: run_test - Success - failure: test that nested user namespaces behave correctly when attached to idmapped mounts
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/645.out /tmp/tone/run/xfstests/results//generic/645.out.bad'  to see the entire diff)
Ran: generic/645
Failures: generic/645
Failed 1 of 1 tests