Bug 19202 - [ANCK6.6.71-3 rc1][aarch64][倚天710机器]bpftrace-test测试,mdflush用例失败,fatal error: 'linux/genhd.h' file not found
Summary: [ANCK6.6.71-3 rc1][aarch64][倚天710机器]bpftrace-test测试,mdflush用例失败,fatal error: ...
Status: NEW
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: aarch64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: lv0322
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-04 10:41 UTC by zhixin01
Modified: 2025-03-06 17:32 UTC (History)
6 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 10:41:42 UTC
[缺陷描述]:
bpftrace-test测试,biosnoop用例失败,ERROR: Struct/union of type 'struct request' does not contain a field named 'rq_disk'

测试日志如下:
/usr/share/bpftrace/tools/mdflush.bt    failed
    @disk[arg0] = ((struct request *)arg0)->rq_disk->disk_name;
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: BTF: failed to read data (Invalid argument) from: /sys/kernel/btf/vmlinux
ERROR: BTF: failed to read data (Invalid argument) from: /usr/lib/debug/lib/modules/6.6.71-3_rc1.al8.aarch64/vmlinux
ERROR: BTF: failed to find BTF data 
ERROR: BTF: failed to read data (Invalid argument) from: /sys/kernel/btf/vmlinux
ERROR: BTF: failed to read data (Invalid argument) from: /usr/lib/debug/lib/modules/6.6.71-3_rc1.al8.aarch64/vmlinux
ERROR: BTF: failed to find BTF data 
definitions.h:3:10: fatal error: 'linux/genhd.h' file not found
ERROR: Input (117): #include <__btf_generated_header.h>

[重现概率]:
必现

[重现环境]:
环境信息:倚天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

#rpm -qa | grep kernel | grep 6.6.71-3_rc1.al8
kernel-devel-6.6.71-3_rc1.al8.aarch64
kernel-headers-6.6.71-3_rc1.al8.aarch64
kernel-debuginfo-6.6.71-3_rc1.al8.aarch64
kernel-6.6.71-3_rc1.al8.aarch64
kernel-debuginfo-common-aarch64-6.6.71-3_rc1.al8.aarch64

#yum install bpftrace
Last metadata expiration check: 21:28:05 ago on Mon 03 Mar 2025 01:01:45 PM CST.
Package bpftrace-0.16.0-8.al8.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

#yum install bpftrace-test
Last metadata expiration check: 21:28:09 ago on Mon 03 Mar 2025 01:01:45 PM CST.
Package bpftrace-test-0.16.0-8.al8.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

[重现步骤]:
1. 安装6.6.71-3_rc1.al8.aarch64内核,并重启生效
2. yum install bpftrace
3. /usr/share/bpftrace/tools/mdflush.bt

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

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

[分析]
从日志看是缺少BTF data
Comment 1 lv0322 alibaba_cloud_group 2025-03-06 17:32:33 UTC
已知问题,目前该版本bpftrace这两个用例不适配6.6内核。使用上游最新的mdflush可以正常pass。https://github.com/bpftrace/bpftrace/blob/master/tools/mdflush.bt