Bug 8855 - [Anolis23.1 GA][Beta][ANCK-6.6.25-2] ltp net.nfs 下 nfs09_v30_ip4t、nfs09_v30_ip6t 用例执行fail,TFAIL: Wrong file contents, expected 'File truncated', got 'File truncated not'
Summary: [Anolis23.1 GA][Beta][ANCK-6.6.25-2] ltp net.nfs 下 nfs09_v30_ip4t、nfs09_v30_i...
Status: CLOSED WONTFIX
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: net (show other bugs) net
Version: 6.6.25-2
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: sdwzhz
QA Contact: shuming
URL:
Whiteboard:
Keywords: Function
Depends on:
Blocks:
 
Reported: 2024-04-23 16:48 UTC by Janos
Modified: 2024-05-21 16:57 UTC (History)
14 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janos alibaba_cloud_group 2024-04-23 16:48:04 UTC
[缺陷描述]:
 ltp net.nfs 下 nfs09_v30_ip4t、nfs09_v30_ip6t 用例执行fail,TFAIL: Wrong file contents, expected 'File truncated', got 'File truncated not'
 x86_64、aarch64 架构上都存在该问题

[重现概率]:
必现


[重现环境]:
环境信息:云上ecs

OS:
# cat /etc/os-release
NAME="Anolis OS"
VERSION="23"
ID="anolis"
VERSION_ID="23"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"


KERNEL:
#uname -r
6.6.25-2_rc1.an23.x86_64


MEMORY:
# free -h
               total        used        free      shared  buff/cache   available
Mem:            15Gi       570Mi        13Gi        15Mi       812Mi        14Gi
Swap:             0B          0B          0B


CPU:# lscpu
Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          52 bits physical, 57 bits virtual
  Byte Order:             Little Endian
CPU(s):                   4
  On-line CPU(s) list:    0-3
Vendor ID:                GenuineIntel
  BIOS Vendor ID:         Alibaba Cloud
  Model name:             Intel(R) Xeon(R) Platinum 8475B
    BIOS Model name:      pc-q35-df-2.1  CPU @ 0.0GHz
    BIOS CPU family:      1
    CPU family:           6
    Model:                143
    Thread(s) per core:   2
    Core(s) per socket:   2
    Socket(s):            1
    Stepping:             8
    CPU(s) scaling MHz:   84%
    CPU max MHz:          3800.0000
    CPU min MHz:          800.0000
    BogoMIPS:             5400.00
    Flags:                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss
                           ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid aperfmperf t
                          sc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes x
                          save avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault ibrs_enhanced fsgsbase tsc_adj
                          ust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopt
                          clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd
                          ida arat hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_
                          vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid bus_lock_detect cldemote
                           movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 ar
                          ch_capabilities
Virtualization features:
  Hypervisor vendor:      KVM
  Virtualization type:    full
Caches (sum of all):
  L1d:                    96 KiB (2 instances)
  L1i:                    64 KiB (2 instances)
  L2:                     4 MiB (2 instances)
  L3:                     97.5 MiB (1 instance)
NUMA:
  NUMA node(s):           1
  NUMA node0 CPU(s):      0-3
Vulnerabilities:
  Gather data sampling:   Not affected
  Itlb multihit:          Not affected
  L1tf:                   Not affected
  Mds:                    Not affected
  Meltdown:               Not affected
  Mmio stale data:        Unknown: No mitigations
  Reg file data sampling: Not affected
  Retbleed:               Not affected
  Spec rstack overflow:   Not affected
  Spec store bypass:      Vulnerable
  Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:             Mitigation; Enhanced / Automatic IBRS, RSB filling, PBRSB-eIBRS SW sequence
  Srbds:                  Not affected
  Tsx async abort:        Not affected


[重现步骤]:
# 下载并编译测试套
git clone https://gitee.com/anolis/ltp.git --branch 6.6
cd ltp
make autotools
./configure
make
make install

# 执行测试
/opt/ltp/runltp -f net.nfs -s nfs09_v30_ip4t
/opt/ltp/runltp -f net.nfs -s nfs09_v30_ip6t

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


[实际结果]:
用例执行FAIL,日志如下:

<<<test_start>>>
tag=nfs09_v30_ip4t stime=1713531383
cmdline="nfs09.sh -v 3 -t tcp"
contacts=""
analysis=exit
<<<test_output>>>
nfs09 1 TINFO: Running: nfs09.sh -v 3 -t tcp
nfs09 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
nfs09 1 TINFO: add local addr 10.0.0.2/24
nfs09 1 TINFO: add local addr fd00:1:1:1::2/64
nfs09 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
nfs09 1 TINFO: add remote addr 10.0.0.1/24
nfs09 1 TINFO: add remote addr fd00:1:1:1::1/64
nfs09 1 TINFO: Network config (local -- remote):
nfs09 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
nfs09 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
nfs09 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
tst_device.c:96: TINFO: Found free device 2 '/dev/loop2'
tst_supported_fs_types.c:169: TINFO: Skipping ext2 as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping ext3 as requested by the test
tst_supported_fs_types.c:97: TINFO: Kernel supports ext4
tst_supported_fs_types.c:62: TINFO: mkfs.ext4 does exist
tst_supported_fs_types.c:97: TINFO: Kernel supports xfs
tst_supported_fs_types.c:62: TINFO: mkfs.xfs does exist
tst_supported_fs_types.c:97: TINFO: Kernel supports btrfs
tst_supported_fs_types.c:58: TINFO: mkfs.btrfs does not exist
tst_supported_fs_types.c:105: TINFO: Skipping bcachefs because of FUSE blacklist
tst_supported_fs_types.c:169: TINFO: Skipping vfat as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping exfat as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping ntfs as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping tmpfs as requested by the test
nfs09 1 TINFO: === Testing on ext4 ===
nfs09 1 TINFO: Formatting ext4 with opts='/dev/loop2'
nfs09 1 TINFO: Mounting device: mount -t ext4 /dev/loop2 /tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/mntpoint 
nfs09 1 TINFO: timeout per run is 0h 15m 0s
nfs09 1 TINFO: mount.nfs: (linux nfs-utils 2.6.2)
nfs09 1 TINFO: setup NFSv3, socket type tcp
nfs09 1 TINFO: Mounting /tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/3/0
nfs09 1 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp,vers=3 10.0.0.2:/tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/mntpoint/3/tcp /tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/3/0
nfs09 1 TPASS: ls -l 'testfile' failed as expected
nfs09 1 TFAIL: Wrong file contents, expected 'File truncated', got 'File truncated not'
nfs09 2 TINFO: Cleaning up testcase
nfs09 2 TINFO: Unmounting /tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/3/0
nfs09 2 TINFO: === Testing on xfs ===
nfs09 2 TINFO: Formatting xfs with opts='/dev/loop2'
nfs09 2 TINFO: Mounting device: mount -t xfs /dev/loop2 /tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/mntpoint 
nfs09 2 TINFO: timeout per run is 0h 15m 0s
nfs09 2 TINFO: mount.nfs: (linux nfs-utils 2.6.2)
nfs09 2 TINFO: setup NFSv3, socket type tcp
nfs09 2 TINFO: Mounting /tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/3/0
nfs09 2 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp,vers=3 10.0.0.2:/tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/mntpoint/3/tcp /tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/3/0
nfs09 2 TPASS: ls -l 'testfile' failed as expected
nfs09 2 TFAIL: Wrong file contents, expected 'File truncated', got 'File truncated not'
nfs09 3 TINFO: Cleaning up testcase
nfs09 3 TINFO: Unmounting /tmp/ltp-BWPa0tVUau/LTP_nfs09.y3x4YFgxOu/3/0

Summary:
passed   2
failed   2
broken   0
skipped  0
warnings 0


<<<test_start>>>
tag=nfs09_v30_ip6t stime=1713531438
cmdline="nfs09.sh -6 -v 3 -t tcp"
contacts=""
analysis=exit
<<<test_output>>>
nfs09 1 TINFO: Running: nfs09.sh -6 -v 3 -t tcp
nfs09 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
nfs09 1 TINFO: add local addr 10.0.0.2/24
nfs09 1 TINFO: add local addr fd00:1:1:1::2/64
nfs09 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
nfs09 1 TINFO: add remote addr 10.0.0.1/24
nfs09 1 TINFO: add remote addr fd00:1:1:1::1/64
nfs09 1 TINFO: Network config (local -- remote):
nfs09 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
nfs09 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
nfs09 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
tst_device.c:96: TINFO: Found free device 2 '/dev/loop2'
tst_supported_fs_types.c:169: TINFO: Skipping ext2 as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping ext3 as requested by the test
tst_supported_fs_types.c:97: TINFO: Kernel supports ext4
tst_supported_fs_types.c:62: TINFO: mkfs.ext4 does exist
tst_supported_fs_types.c:97: TINFO: Kernel supports xfs
tst_supported_fs_types.c:62: TINFO: mkfs.xfs does exist
tst_supported_fs_types.c:97: TINFO: Kernel supports btrfs
tst_supported_fs_types.c:58: TINFO: mkfs.btrfs does not exist
tst_supported_fs_types.c:105: TINFO: Skipping bcachefs because of FUSE blacklist
tst_supported_fs_types.c:169: TINFO: Skipping vfat as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping exfat as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping ntfs as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping tmpfs as requested by the test
nfs09 1 TINFO: === Testing on ext4 ===
nfs09 1 TINFO: Formatting ext4 with opts='/dev/loop2'
nfs09 1 TINFO: Mounting device: mount -t ext4 /dev/loop2 /tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/mntpoint 
nfs09 1 TINFO: timeout per run is 0h 15m 0s
nfs09 1 TINFO: mount.nfs: (linux nfs-utils 2.6.2)
nfs09 1 TINFO: setup NFSv3, socket type tcp6
nfs09 1 TINFO: Mounting /tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/3/0
nfs09 1 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp6,vers=3 [fd00:1:1:1::2]:/tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/mntpoint/3/tcp6 /tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/3/0
nfs09 1 TPASS: ls -l 'testfile' failed as expected
nfs09 1 TFAIL: Wrong file contents, expected 'File truncated', got 'File truncated not'
nfs09 2 TINFO: Cleaning up testcase
nfs09 2 TINFO: Unmounting /tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/3/0
nfs09 2 TINFO: === Testing on xfs ===
nfs09 2 TINFO: Formatting xfs with opts='/dev/loop2'
nfs09 2 TINFO: Mounting device: mount -t xfs /dev/loop2 /tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/mntpoint 
nfs09 2 TINFO: timeout per run is 0h 15m 0s
nfs09 2 TINFO: mount.nfs: (linux nfs-utils 2.6.2)
nfs09 2 TINFO: setup NFSv3, socket type tcp6
nfs09 2 TINFO: Mounting /tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/3/0
nfs09 2 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp6,vers=3 [fd00:1:1:1::2]:/tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/mntpoint/3/tcp6 /tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/3/0
nfs09 2 TPASS: ls -l 'testfile' failed as expected
nfs09 2 TFAIL: Wrong file contents, expected 'File truncated', got 'File truncated not'
nfs09 3 TINFO: Cleaning up testcase
nfs09 3 TINFO: Unmounting /tmp/ltp-BWPa0tVUau/LTP_nfs09.F7788azBuD/3/0

Summary:
passed   2
failed   2
broken   0
skipped  0
warnings 0

[原因分析]:
文件传输后,内容缩减(truncate)失败,预期内容只剩 "File truncated",实际文件内容为 "File truncated not"
Comment 1 shuancue alibaba_cloud_group 2024-04-24 19:32:50 UTC
该用例检查 NFS 客户端缓存是否会阻止文件截断,主要执行以下操作:
1. 在远端创建该文件(绕过 NFS),写入内容 "File rewritten not"
2. 通过 NFS 试图以更短的数据覆盖该文件内容为 "File truncated"。
3. 再次在远端读取文件内容并检查是否与 "File truncated" 匹配,最终的内容是 "File truncated not"。看起来在脚本尝试截断文件时失败了,文件之前的内容没有被完全覆盖。
测试脚本具体位置:testcases/network/nfs/nfs_stress/nfs09.sh,请开发同学判断一下该问题是否符合预期
Comment 2 dust.li alibaba_cloud_group 2024-04-30 11:40:15 UTC
这个问题在 001 上有吗?@Janos
Comment 3 Janos alibaba_cloud_group 2024-04-30 11:45:41 UTC
(In reply to dust.li from comment #2)
> 这个问题在 001 上有吗?@Janos

 6.6 kernel 这次应该是首次进行 ltp功能测试,之前的版本都没测试过
Comment 4 Janos alibaba_cloud_group 2024-04-30 11:46:17 UTC
(In reply to dust.li from comment #2)
> 这个问题在 001 上有吗?@Janos

 6.6 kernel 这次应该是首次进行 ltp功能测试,之前的版本都没测试过
Comment 5 sdwzhz alibaba_cloud_group 2024-05-16 15:07:58 UTC
这个和NFSv3在netns间的锁机制有关,我注意到社区也没有处理这个问题。和上一个nfs的问题类似。NFSv4下没有这个问题可以忽略。
Comment 6 yunmeng365524 2024-05-21 16:57:48 UTC
研发分析确认暂不关注,测试建立对应基线。