Bug 20051 - [Anolis23][nightly][aarch64]bcc的包没有和最新的内核同步发布,导致bcc功能不可用
Summary: [Anolis23][nightly][aarch64]bcc的包没有和最新的内核同步发布,导致bcc功能不可用
Status: NEW
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: gaochang
QA Contact: bolong_tbl
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-02 16:52 UTC by gitpush
Modified: 2025-04-02 16:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gitpush alibaba_cloud_group 2025-04-02 16:52:48 UTC
问题概述:
bcc的包没有和最新的内核同步发布,导致bcc功能不可用
repo里面已经发布了kernel-6.6.71-3的内核。但是repo里的bcc还是和旧的kernel-6.6.25-2.2内核配套。

验证步骤:
[root@iZbp12gvtfevdipl8om4bqZ tools]# ./cachestat 1 2
modprobe: FATAL: Module kheaders not found in directory /lib/modules/6.6.25-2.2.an23.aarch64
Unable to find kernel headers. Try rebuilding kernel with CONFIG_IKHEADERS=m (module) or installing the kernel development package for your running kernel version.
chdir(/lib/modules/6.6.25-2.2.an23.aarch64/build): No such file or directory
Traceback (most recent call last):
  File "/usr/share/bcc/tools/./cachestat", line 120, in <module>
    b = BPF(text=bpf_text)
        ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/bcc/__init__.py", line 479, in __init__
    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>
[root@iZbp12gvtfevdipl8om4bqZ tools]# rpm -qa | grep kernel
kernel-6.6.25-2.2.an23.aarch64
kernel-tools-libs-6.6.71-3.an23.aarch64
kernel-tools-6.6.71-3.an23.aarch64
kernel-headers-6.6.71-3.an23.aarch64
kernel-6.6.71-3.an23.aarch64
kernel-devel-6.6.71-3.an23.aarch64
[root@iZbp12gvtfevdipl8om4bqZ tools]# ./vfscount 1
modprobe: FATAL: Module kheaders not found in directory /lib/modules/6.6.25-2.2.an23.aarch64
Unable to find kernel headers. Try rebuilding kernel with CONFIG_IKHEADERS=m (module) or installing the kernel development package for your running kernel version.
chdir(/lib/modules/6.6.25-2.2.an23.aarch64/build): No such file or directory
Traceback (most recent call last):
  File "/usr/share/bcc/tools/./vfscount", line 31, in <module>
    b = BPF(text="""
        ^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/bcc/__init__.py", line 479, in __init__
    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>
[root@iZbp12gvtfevdipl8om4bqZ tools]# ldd ./vfscount
	not a dynamic executable
[root@iZbp12gvtfevdipl8om4bqZ tools]# file ./vfscount
./vfscount: Python script, ASCII text executable
[root@iZbp12gvtfevdipl8om4bqZ tools]# file ./cachestat
./cachestat: Python script, ASCII text executable
[root@iZbp12gvtfevdipl8om4bqZ tools]# vim ./vfscount
[root@iZbp12gvtfevdipl8om4bqZ tools]# rpm -qa | grep bcc
bcc-tools-0.30.0-1.an23.aarch64
bcc-0.30.0-1.an23.aarch64
python3-bcc-0.30.0-1.an23.noarch

环境:
[root@iZbp13yv3gjues4ly59lkkZ ~]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23.2"
ID="anolis"
VERSION_ID="23.2"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23.2"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"
[root@iZbp13yv3gjues4ly59lkkZ ~]# arch
aarch64