Bug 113 - [Anolis OS 8.4 龙芯版][4.19.190-3.an8.loongarch64]ltp测试时dynamic_debug01用例fail,fail原因为/sys/kernel/debug下无dynamic_debug目录
Summary: [Anolis OS 8.4 龙芯版][4.19.190-3.an8.loongarch64]ltp测试时dynamic_debug01用例fail,fa...
Status: CLOSED FIXED
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: general/others (show other bugs) general/others
Version: unspecified
Hardware: loongarch Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: ticat
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-16 16:23 UTC by shanxifanshi
Modified: 2023-07-25 17:10 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 shanxifanshi alibaba_cloud_group 2021-12-16 16:23:02 UTC
[缺陷描述]:
ltp测试时tracing目录下的dynamic_debug01用例fail,fail原因为/sys/kernel/debug下无dynamic_debug目录

测试日志:
<<<test_start>>>
tag=dynamic_debug01 stime=1639641774
cmdline="dynamic_debug01.sh"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
dynamic_debug01 1 TINFO: timeout per run is 0h 5m 0s
dynamic_debug01 1 TINFO: debugfs already mounted at /sys/kernel/debug
dynamic_debug01 1 TBROK: Unable to find /sys/kernel/debug/dynamic_debug

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

系统镜像:
http://8.131.87.1/kojifiles/output/an-8-loongarch64-RC1/compose/BaseOS/loongarch64/iso/

复现环境:
龙芯物理机

复现概率:
必现

内核信息:
# uname -r
4.19.190-3.an8.loongarch64

操作系统信息:
# cat /etc/anolis-release
Anolis OS release 8.4
[root@localhost ~]# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.4"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.4"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.4"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

cpu信息:
# lscpu
Architecture:        loongarch64
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
CPU family:          Loongson-64bit
Model name:          Loongson-3A5000LL
BogoMIPS:            4600.00
L1d cache:           64K
L1i cache:           64K
L2 cache:            256K
L3 cache:            16384K
NUMA node0 CPU(s):   0-3
Flags:               cpucfg lam ual fpu lsx lasx complex crypto lvz lbt_x86 lbt_arm lbt_mips

内存信息:
# free -h
              total        used        free      shared  buff/cache   available
Mem:           15Gi       1.3Gi       2.7Gi        18Mi        11Gi        12Gi
Swap:         7.9Gi       1.0Mi       7.9Gi

[期望结果]:
dynamic_debug01用例pass

[实际结果]:
由于系统中不存在/sys/kernel/debug/dynamic_debug目录,用例fail

[初步分析]:
在Anolis OS 8.4 x86_64环境下对比测试,该用例是pass的,也存在/sys/kernel/debug/dynamic_debug目录,请开发确认是否可以支持内核dynamic_debug调试
Comment 1 shanxifanshi alibaba_cloud_group 2021-12-17 14:45:02 UTC
补充一下复现步骤:
git clone https://github.com/linux-test-project/ltp.git
cd ltp
make autotools
./configure
make
make install
/opt/ltp/runltp -f tracing -s dynamic_debug01
Comment 2 wulifuture 2021-12-18 14:34:48 UTC
龙芯3A5000台式机LTP稳定性压力测试fail,为同样问题
dynamic_debug01 1 TINFO: timeout per run is 0h 5m 0s
dynamic_debug01 1 TINFO: debugfs already mounted at /sys/kernel/debug
dynamic_debug01 1 TBROK: Unable to find /sys/kernel/debug/dynamic_debug

Summary:
passed   0
failed   0
broken   1
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=2 cstime=0
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20210927-184-g57d410a7c

       ###############################################################

            Done executing testcases.
            LTP Version:  20210927-184-g57d410a7c
       ###############################################################


[root@localhost ltp]# lscpu
架构:           loongarch64
字节序:         Little Endian
CPU:             4
在线 CPU 列表:  0-3
每个核的线程数: 1
每个座的核数:   4
座:             1
NUMA 节点:      1
CPU 系列:       Loongson-64bit
型号名称:       Loongson-3A5000
BogoMIPS:       5000.00
L1d 缓存:       64K
L1i 缓存:       64K
L2 缓存:        256K
L3 缓存:        16384K
NUMA 节点0 CPU: 0-3
标记:           cpucfg lam ual fpu lsx lasx complex crypto lvz lbt_x86 lbt_arm lbt_mips

系统镜像:
http://8.131.87.1/kojifiles/output/an-8-loongarch64-RC1/compose/BaseOS/loongarch64/iso/

内核:
[root@localhost ~]# uname -r
4.19.190-3.an8.loongarch64

硬件设备:
Loongson-3A5000台式机
Comment 3 ticat loongson_group 2021-12-21 20:15:33 UTC
分析:
内核配置项未打开
解决:
CONFIG_DYNAMIC=y
Comment 4 ticat loongson_group 2021-12-21 20:16:10 UTC
(In reply to ticat_fp from comment #3)
> 分析:
> 内核配置项未打开
> 解决:
> CONFIG_DYNAMIC=y

CONFIG_DYNAMIC_DEBUG
Comment 5 yangyinglu loongson_group 2021-12-27 10:32:24 UTC
龙芯最新内核支持CONFIG_DYNAMIC配置选项,请更新到最新内核测试
Comment 6 shanxifanshi alibaba_cloud_group 2022-01-10 15:47:23 UTC

(In reply to yangyinglu from comment #5)
> 龙芯最新内核支持CONFIG_DYNAMIC配置选项,请更新到最新内核测试

----在rc2版本测试,/sys/kernel/debug/dynamic_debug目录仍然不存在
# ll /sys/kernel/debug/dynamic_debug
ls: cannot access '/sys/kernel/debug/dynamic_debug': No such file or directory
Comment 7 yangyinglu loongson_group 2022-01-10 19:08:35 UTC
最新内核包比上述测试包新,因为内核包还没有经过评审,需要等待评审流程
Comment 8 shanxifanshi alibaba_cloud_group 2022-01-21 18:11:53 UTC
使用最新的龙芯8.4 GA ISO安装系统后进行验证,该问题依然未解决

# uname -r
4.19.190-4.an8.loongarch64

# ll /sys/kernel/debug/dynamic_debug
ls: cannot access '/sys/kernel/debug/dynamic_debug': No such file or directory

# grep -i dynamic_debug /boot/config-4.19.190-4.an8.loongarch64
# CONFIG_DYNAMIC_DEBUG is not set
Comment 9 shanxifanshi alibaba_cloud_group 2023-07-25 17:10:27 UTC
如上面评论,开发同学已经在内部提供了该包,先关闭该bug,后续同学测试时如再遇到该问题,请重新提单跟踪