Bug 29008 - [ANCK-6.6.102-5.2.1_rc1][riscv64][anolis23.3]ltp cpuhotplug04 用例存在fail,且运行卡住很久无法完成,报错free(): invalid pointer、malloc(): unaligned tcache chunk detected
Summary: [ANCK-6.6.102-5.2.1_rc1][riscv64][anolis23.3]ltp cpuhotplug04 用例存在fail,且运行卡住很...
Status: NEW
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: riscv Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: feynmang
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-30 11:15 UTC by wangxiaorou92
Modified: 2025-12-31 17:04 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wangxiaorou92 alibaba_cloud_group 2025-12-30 11:15:49 UTC
【问题描述】
ltp cpuhotplug04 用例存在fail,且运行卡住很久无法完成,导致超时

日志:
<<<test_start>>>
tag=cpuhotplug04 stime=1767003527
cmdline="cpuhotplug04.sh -l 1"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
Name:   cpuhotplug04
Date:   Mon Dec 29 18:18:47 CST 2025
Desc:   Does it prevent us from offlining the last CPU?

/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: wait_for: No record of process 184072358628
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: [: =: unary operator expected
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: xmalloc: cannot allocate 32 bytes
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: [: =: unary operator expected
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: xmalloc: cannot allocate 32 bytes
…………
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: [: =: unary operator expected
cpuhotplug04 1 TFAIL: Have we just offlined the last CPU?
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: xmalloc: cannot allocate 32 bytes
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: xmalloc: cannot allocate 32 bytes
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 225: [: =: unary operator expected
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: xmalloc: cannot allocate 32 bytes
free(): invalid pointer
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 225: [: =: unary operator expected
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: xmalloc: cannot allocate 32 bytes
……
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: wait_for: No record of process 273728659114
malloc(): unaligned tcache chunk detected
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: [: =: unary operator expected
malloc(): unaligned tcache chunk detected
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: [: =: unary operator expected
cpuhotplug04 1 TFAIL: Have we just offlined the last CPU?
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: xmalloc: cannot allocate 32 bytes
*** stack smashing detected ***: terminated
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: [: =: unary operator expected
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: xmalloc: cannot allocate 32 bytes
……
cpuhotplug04 1 TFAIL: Have we just offlined the last CPU?
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: [: =: unary operator expected
cpuhotplug04 1 TFAIL: Have we just offlined the last CPU?
/var/tmp/tone/run/ltp/testcases/bin/cpuhotplug_hotplug.sh: line 280: [: =: unary operator expected
free(): invalid pointer

【重新概率】
必现

【环境信息】
[root@localhost anuser]# uname -a
Linux localhost.localdomain 6.6.102-5.2.1_rc1.an23.riscv64 #1 SMP PREEMPT_DYNAMIC Tue Dec 16 04:26:06 EST 2025 riscv64 riscv64 riscv64 GNU/Linux
[root@localhost anuser]# grubby --info=$(grubby --default-kernel)
index=0
kernel="/boot/vmlinuz-6.6.102-5.2.1_rc1.an23.riscv64"
args="ro console=ttyS0,115200 root=LABEL=ROOT rootfstype=ext4 rootwait rw earlycon selinux=0 LANG=en_US.UTF-8 nvme.use_threaded_interrupts=1 nvme_core.io_timeout=3000 audit=0 per_numa_node_futex=disable"
root="UUID=e297bfa3-2c55-44f8-90cb-ae8eb642d188"
initrd="/boot/initramfs-6.6.102-5.2.1_rc1.an23.riscv64.img"
title="Anolis OS (6.6.102-5.2.1_rc1.an23.riscv64) 23.3"
id="934f52b3285c4e3f930c74e63b821b67-6.6.102-5.2.1_rc1.an23.riscv64"
[root@localhost anuser]# cat /proc/cmdline
root=UUID=e297bfa3-2c55-44f8-90cb-ae8eb642d188 ro console=ttyS0,115200 root=LABEL=ROOT rootfstype=ext4 rootwait rw earlycon selinux=0 LANG=en_US.UTF-8 nvme.use_threaded_interrupts=1 nvme_core.io_timeout=3000 audit=0 per_numa_node_futex=disable
[root@localhost anuser]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23.3"
ID="anolis"
VERSION_ID="23.3"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23.3"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"
[root@localhost anuser]# lscpu
Architecture:          riscv64
  Byte Order:          Little Endian
CPU(s):                64
  On-line CPU(s) list: 0-63
NUMA:
  NUMA node(s):        4
  NUMA node0 CPU(s):   0-7,16-23
  NUMA node1 CPU(s):   8-15,24-31
  NUMA node2 CPU(s):   32-39,48-55
  NUMA node3 CPU(s):   40-47,56-63
[root@localhost anuser]# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0 953.9G  0 disk
├─nvme0n1p1 259:1    0 121.9M  0 part /boot/efi
├─nvme0n1p2 259:2    0   488M  0 part /boot
├─nvme0n1p3 259:3    0 143.1G  0 part /
├─nvme0n1p4 259:4    0     1K  0 part
├─nvme0n1p5 259:5    0 286.1G  0 part
└─nvme0n1p6 259:6    0 286.1G  0 part
[root@localhost anuser]# df -hT
Filesystem                                                                 Type      Size  Used Avail Use% Mounted on
/dev/nvme0n1p3                                                             ext4      141G   54G   81G  41% /
devtmpfs                                                                   devtmpfs  4.0M     0  4.0M   0% /dev
tmpfs                                                                      tmpfs      31G     0   31G   0% /dev/shm
tmpfs                                                                      tmpfs      13G  680K   13G   1% /run
tmpfs                                                                      tmpfs      31G  9.1M   31G   1% /tmp
/dev/nvme0n1p2                                                             ext4      448M  197M  222M  48% /boot
/dev/nvme0n1p1                                                             vfat      122M   47M   75M  39% /boot/efi
tmpfs                                                                      tmpfs     6.2G   16K  6.2G   1% /run/user/1000


【复现步骤】
#内核包:
http://8.131.87.1/kojifiles/repos/dist-an23.3-riscv64-gcc14-build/latest/riscv64/toplink/work/tasks/5939/1035939/
#获取ltp源码并编译
git clone http://code.alibaba-inc.com/alikernel/ltp.git --branch Ali6000
export CFLAGS="-fcommon"  
cd ltp
make autotools
make
make install
cd /opt/ltp
#执行用例
./runltp -f cpuhotplug -s  cpuhotplug04

【实际结果】ltp cpuhotplug04 用例运行存在fail,且卡住长时间无法运行完成
【预期结果】ltp cpuhotplug04  用例运行pass
Comment 1 wangxiaorou92 alibaba_cloud_group 2025-12-31 17:04:19 UTC
x86架构相关bug:https://bugzilla.openanolis.cn/show_bug.cgi?id=3377