Bug 19590 - [ANCK6.6.71-3.64k rc2][aarch64]alitests测试套中recursive_stat用例失败,预期memory父目录memory.stat中关于total_workingset_refault_anon的统计值大于子目录,实际统计数据为0
Summary: [ANCK6.6.71-3.64k rc2][aarch64]alitests测试套中recursive_stat用例失败,预期memory父目录memo...
Status: NEW
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: aarch64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: shuancue
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-17 16:05 UTC by zhixin01
Modified: 2025-03-24 17:16 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 zhixin01 alibaba_cloud_group 2025-03-17 16:05:34 UTC
[缺陷描述]:
alitests测试套中recursive_stat用例失败,预期memory父目录memory.stat中关于total_workingset_refault_anon的统计值大于子目录,实际统计数据为0

用例在ANCK6.6.71-3.64k rc1上是成功的,为新增失败用例

测试日志:
<<<test_start>>>
tag=recursive_stat stime=1742196423
cmdline="       recursive_stat.sh"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
recursive_stat 1 TINFO: Running: recursive_stat.sh
recursive_stat 1 TINFO: timeout per run is 0h 5m 0s
recursive_stat 1 TINFO: memory_test/memory.stat: total_workingset_refault_anon: 0
recursive_stat 1 TINFO: memory_test/memory_A/memory.stat: total_workingset_refault_anon: 0
recursive_stat 1 TINFO: memory_test/memory_B/memory.stat: total_workingset_refault_anon: 0
recursive_stat 1 TFAIL: recursive stat testcase fail

Summary:
passed   0
failed   1
broken   0
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=12 termination_type=exited termination_id=1 corefile=no
cutime=3 cstime=5
<<<test_end>>>

[重现概率]:
必现

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

#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):              128
On-line CPU(s) list: 0-127
Thread(s) per core:  1
Core(s) per socket:  128
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-128
Stepping:            r0p0
CPU MHz:             2750.000
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-63
NUMA node1 CPU(s):   64-127
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:          125Gi       3.6Gi       121Gi        12Mi       1.0Gi       122Gi
Swap:         2.0Gi          0B       2.0Gi

#cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/boot/vmlinuz-6.6.71-3.64k_rc2.al8.aarch64 root=UUID=7b354d7d-d8b2-4768-b838-731ccf1256f3 ro console=tty0 biosdevname=0 console=ttyS0,115200 rd.driver.pre=ahci cgroup.memory=nokmem crashkernel=0M-2G:0M,2G-64G:256M,64G-:384M iommu.passthrough=1 iommu.strict=0 nospectre_bhb ssbd=force-off transparent_hugepage_tmpfs=always thp_shmem=64K:always thp_anon=64K:always thp_file=8K-2M:always thp_file=2M:always+exec

[重现步骤]:
# 下载并编译用例
git clone http://gitlab-sp.alibaba-inc.com/os-quality/alitests.git
export CFLAGS="-fcommon"               #  gcc 10 需要添加这个
cd alitests
make autotools
./configure
make
make install

# 执行测试
/opt/ltp/runltp -f alitests -s recursive_stat 

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

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

[原因定位]:
测试原理:
在memory cgroup目录下新建测试目录memory_test,然后建立子目录memory_A和memory_B,并设置两个子目录内存占用限制均为256M,之后构建memory_A和memory_B的内存占用均为200M,查看memory.stat中total_inactive_anon统计值,预期父目录统计值大于子目录,实际total_workingset_refault_anon一直为0
Comment 1 zhixin01 alibaba_cloud_group 2025-03-24 17:16:45 UTC
在6.6.71-3.100_rc2.2.al8.aarch64+64k内核上验证recursive_stat用例依然失败
<<<test_start>>>
tag=recursive_stat stime=1742807491
cmdline="       recursive_stat.sh"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
recursive_stat 1 TINFO: memory_test/memory.stat: total_workingset_refault_anon: 0
recursive_stat 1 TINFO: memory_test/memory_A/memory.stat: total_workingset_refault_anon: 0
recursive_stat 1 TINFO: memory_test/memory_B/memory.stat: total_workingset_refault_anon: 0
recursive_stat 1 TFAIL: recursive stat testcase fail
/opt/ltp/testcases/bin/recursive_stat.sh: line 37: 154274 Terminated              cgexec -g memory:memory_test/memory_A touch_memory 200000000
/opt/ltp/testcases/bin/recursive_stat.sh: line 37: 154275 Terminated              cgexec -g memory:memory_test/memory_B touch_memory 200000000

Summary:
passed   0
failed   1
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=7 termination_type=exited termination_id=1 corefile=no
cutime=3 cstime=4
<<<test_end>>>

#uname -r
6.6.71-3.100_rc2.2.al8.aarch64+64k