Description of problem: Anolis23 x86_64环境,社区版nightly perf-test测试套 case:probe-libcs-inet_pton--backtrace-it-with-ping run FAILED! Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 安装anolis23 x86_64 nightly 内核包及其对应perf包 2. 机器新内核生效后,执行 perf test,找到对应的probe libc's inet_pton & backtrace it with ping标号执行 perf test -v +case标号 3. 例如执行perf test -v 78 Actual results: [root@qibo-anolis23-nightly-func-x86-1 ~]# perf test -v 78 78: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 1099844 ping 1099867 [003] 49938.213208: probe_libc:inet_pton: (7f4b844bd8b0) 7f4b844bd8b0 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) 5623d3f296fe [unknown] (/usr/bin/ping) FAIL: expected backtrace entry "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib64/libc.so.6\)$" got "5623d3f296fe [unknown] (/usr/bin/ping)" test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! [root@qibo-anolis23-nightly-func-x86-1 ~]# [root@qibo-anolis23-nightly-func-x86-1 ~]# uname -r 5.10.134-32.git.c6fa6630dc70.an23.x86_64 [root@qibo-anolis23-nightly-func-x86-1 ~]# [root@qibo-anolis23-nightly-func-x86-1 ~]# cat /etc/anolis-release Anolis OS release 23 Expected results: case pass Additional info: [root@qibo-anolis23-nightly-func-x86-1 ~]# uname -r 5.10.134-32.git.c6fa6630dc70.an23.x86_64 [root@qibo-anolis23-nightly-func-x86-1 ~]# [root@qibo-anolis23-nightly-func-x86-1 ~]# cat /etc/anolis-release Anolis OS release 23 [root@qibo-anolis23-nightly-func-x86-1 ~]# perf -v perf version 5.10.134-32.git.c6fa6630dc70.an23.x86_64 [root@qibo-anolis23-nightly-func-x86-1 ~]# Expected results: case pass Additional info: [root@qibo-anolis23-nightly-func-x86-1 ~]# cat /etc/anolis-release Anolis OS release 23 [root@qibo-anolis23-nightly-func-x86-1 ~]# uname -r 5.10.134-32.git.c6fa6630dc70.an23.x86_64 [root@qibo-anolis23-nightly-func-x86-1 ~]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 4.0M 0 4.0M 0% /dev tmpfs 7.6G 0 7.6G 0% /dev/shm tmpfs 3.1G 608K 3.1G 1% /run /dev/vda1 40G 7.5G 33G 19% / tmpfs 7.6G 1.7G 6.0G 22% /tmp tmpfs 1.6G 0 1.6G 0% /run/user/0 [root@qibo-anolis23-nightly-func-x86-1 ~]# free -g total used free shared buff/cache available Mem: 15 0 12 1 2 12 Swap: 0 0 0 [root@qibo-anolis23-nightly-func-x86-1 ~]# cat /proc/cmdline BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-5.10.134-32.git.c6fa6630dc70.an23.x86_64 root=UUID=ece72b7f-465b-433d-8b3b-e5fa53a04642 ro rhgb cryptomgr.notests rcupdate.rcu_cpu_stall_timeout=300 quiet biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200n8 noibrs nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295 cgroup.memory=nokmem crashkernel=0M-2G:0M,2G-8G:192M,8G-:256M [root@qibo-anolis23-nightly-func-x86-1 ~]# [root@qibo-anolis23-nightly-func-x86-1 ~]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Vendor ID: GenuineIntel BIOS Vendor ID: Alibaba Cloud Model name: Intel(R) Xeon(R) Platinum 8369B CPU @ 2.70GHz BIOS Model name: pc-i440fx-2.1 CPU @ 0.0GHz BIOS CPU family: 1 CPU family: 6 Model: 106 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 Stepping: 6 BogoMIPS: 5399.99 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx5 12cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi pku ospke av x512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm arch_capabil ities Virtualization features: Hypervisor vendor: KVM Virtualization type: full Caches (sum of all): L1d: 96 KiB (2 instances) L1i: 64 KiB (2 instances) L2: 2.5 MiB (2 instances) L3: 48 MiB (1 instance) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-3 Vulnerabilities: Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown Retbleed: Not affected Spec store bypass: Vulnerable Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Enhanced IBRS, RSB filling, PBRSB-eIBRS SW sequence Srbds: Not affected Tsx async abort: Not affected
Anolis23 aarch64有相同问题
以下是anolis8 4.19内核和5.10内核perf的结果 [root@iZbp11lagjmwtlkrtvp6hgZ ~]# uname -r 4.19.91-26.6.an8.x86_64 [root@iZbp11lagjmwtlkrtvp6hgZ ~]# perf test 1: vmlinux symtab matches kallsyms : Skip 2: Detect openat syscall event : Ok 3: Detect openat syscall event on all cpus : Ok 4: Read samples using the mmap interface : Ok 5: Test data source output : Ok 6: Parse event definition strings : Ok 7: Simple expression parser : Ok 8: PERF_RECORD_* events & perf_sample fields : Ok 9: Parse perf pmu format : Ok 10: DSO data read : Ok 11: DSO data cache : Ok 12: DSO data reopen : Ok 13: Roundtrip evsel->name : Ok 14: Parse sched tracepoints fields : Ok 15: syscalls:sys_enter_openat event fields : Ok 16: Setup struct perf_event_attr : FAILED! 17: Match and link multiple hists : Ok 18: 'import perf' in python : Ok 19: Breakpoint overflow signal handler : Ok 20: Breakpoint overflow sampling : Ok 21: Breakpoint accounting : Ok 22: Number of exit events of a simple workload : Skip 23: Software clock events period values : Ok 24: Object code reading : FAILED! 25: Sample parsing : Ok 26: Use a dummy software event to keep tracking : Skip 27: Parse with no sample_id_all bit set : Ok 28: Filter hist entries : Ok 29: Lookup mmap thread : Ok 30: Share thread mg : Ok 31: Sort output of hist entries : Ok 32: Cumulate child hist entries : Ok 33: Track with sched_switch : Ok 34: Filter fds with revents mask in a fdarray : Ok 35: Add fd to a fdarray, making it autogrow : Ok 36: kmod_path__parse : Ok 37: Thread map : Ok 38: LLVM search and compile : 38.1: Basic BPF llvm compile : Skip 38.2: kbuild searching : Skip 38.3: Compile source for BPF prologue generation : Skip 38.4: Compile source for BPF relocation : Skip 39: Session topology : Ok 40: BPF filter : 40.1: Basic BPF filtering : Skip 40.2: BPF pinning : Skip 40.3: BPF prologue generation : Skip 40.4: BPF relocation checker : Skip 41: Synthesize thread map : Ok 42: Remove thread map : Ok 43: Synthesize cpu map : Ok 44: Synthesize stat config : Ok 45: Synthesize stat : Ok 46: Synthesize stat round : Ok 47: Synthesize attr update : Ok 48: Event times : Ok 49: Read backward ring buffer : Ok 50: Print cpu map : Ok 51: Probe SDT events : Ok 52: is_printable_array : Ok 53: Print bitmap : Ok 54: perf hooks : Ok 55: builtin clang support : Skip (not compiled in) 56: unit_number__scnprintf : Ok 57: mem2node : Ok 58: x86 rdpmc : FAILED! 59: Convert perf time to TSC : FAILED! 60: DWARF unwind : Ok 61: x86 instruction decoder - new instructions : Ok 62: x86 bp modify : Ok 63: Add vfs_getname probe to get syscall args filenames : Skip 64: probe libc's inet_pton & backtrace it with ping : Ok 65: Use vfs_getname probe to get syscall args filenames : Skip 66: Check open filename arg using perf trace + vfs_getname: Skip [root@iZbp19qa0u321f026n4pllZ ~]# uname -a Linux iZbp19qa0u321f026n4pllZ 5.10.134-13.an8.x86_64 #1 SMP Mon Jan 9 10:39:46 CST 2023 x86_64 x86_64 x86_64 GNU/Linux [root@iZbp19qa0u321f026n4pllZ ~]# perf test 1: vmlinux symtab matches kallsyms : Skip 2: Detect openat syscall event : Ok 3: Detect openat syscall event on all cpus : Ok 4: Read samples using the mmap interface : Ok 5: Test data source output : Ok 6: Parse event definition strings : Ok 7: Simple expression parser : Ok 8: PERF_RECORD_* events & perf_sample fields : Ok 9: Parse perf pmu format : Ok 10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 11: DSO data read : Ok 12: DSO data cache : Ok 13: DSO data reopen : Ok 14: Roundtrip evsel->name : Ok 15: Parse sched tracepoints fields : Ok 16: syscalls:sys_enter_openat event fields : Ok 17: Setup struct perf_event_attr : Ok 18: Match and link multiple hists : Ok 19: 'import perf' in python : Ok 20: Breakpoint overflow signal handler : Ok 21: Breakpoint overflow sampling : Ok 22: Breakpoint accounting : Ok 23: Watchpoint : 23.1: Read Only Watchpoint : Skip 23.2: Write Only Watchpoint : Ok 23.3: Read / Write Watchpoint : Ok 23.4: Modify Watchpoint : Ok 24: Number of exit events of a simple workload : Skip 25: Software clock events period values : Ok 26: Object code reading : FAILED! 27: Sample parsing : Ok 28: Use a dummy software event to keep tracking : Skip 29: Parse with no sample_id_all bit set : Ok 30: Filter hist entries : Ok 31: Lookup mmap thread : Ok 32: Share thread maps : Ok 33: Sort output of hist entries : Ok 34: Cumulate child hist entries : Ok 35: Track with sched_switch : Ok 36: Filter fds with revents mask in a fdarray : Ok 37: Add fd to a fdarray, making it autogrow : Ok 38: kmod_path__parse : Ok 39: Thread map : Ok 40: LLVM search and compile : 40.1: Basic BPF llvm compile : Skip 40.2: kbuild searching : Skip 40.3: Compile source for BPF prologue generation : Skip 40.4: Compile source for BPF relocation : Skip 41: Session topology : Ok 42: BPF filter : 42.1: Basic BPF filtering : Skip 42.2: BPF pinning : Skip 42.3: BPF prologue generation : Skip 43: Synthesize thread map : Ok 44: Remove thread map : Ok 45: Synthesize cpu map : Ok 46: Synthesize stat config : Ok 47: Synthesize stat : Ok 48: Synthesize stat round : Ok 49: Synthesize attr update : Ok 50: Event times : Ok 51: Read backward ring buffer : Ok 52: Print cpu map : Ok 53: Merge cpu map : Ok 54: Probe SDT events : Ok 55: is_printable_array : Ok 56: Print bitmap : Ok 57: perf hooks : Ok 58: builtin clang support : Skip (not compiled in) 59: unit_number__scnprintf : Ok 60: mem2node : Ok 61: time utils : Ok 62: Test jit_write_elf : Ok 63: Test libpfm4 support : Skip (not compiled in) 64: Test api io : Ok 65: maps__merge_in : Ok 66: Demangle Java : Ok 67: Parse and process metrics : Ok 68: PE file support : Ok 69: Event expansion for cgroups : Ok 70: x86 rdpmc : FAILED! 71: Convert perf time to TSC : FAILED! 72: DWARF unwind : Ok 73: x86 instruction decoder - new instructions : Ok 74: Intel PT packet decoder : Ok 75: x86 bp modify : Ok 76: Check Arm SPE trace data recording and synthesized samples : Skip 77: Check open filename arg using perf trace + vfs_getname : FAILED! 78: probe libc's inet_pton & backtrace it with ping : Ok 79: build id cache operations : Ok 80: Zstd perf.data compression/decompression : Ok 81: Add vfs_getname probe to get syscall args filenames : FAILED! 82: Use vfs_getname probe to get syscall args filenames : FAILED! 83: Check Arm CoreSight trace data recording and synthesized samples: Skip
anolis23 x86环境下 5.10 014上也存在该问题 ----------- [root@qibo-anck014-an23-milan-1 ltp]# perf test -v 78 78: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 959030 fgrep: warning: fgrep is obsolescent; using grep -F fgrep: warning: fgrep is obsolescent; using grep -F ping 959053 [002] 23302.275852: probe_libc:inet_pton: (7f3efe410640) egrep: warning: egrep is obsolescent; using grep -E 7f3efe410640 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) egrep: warning: egrep is obsolescent; using grep -E 7f3efe30c510 __libc_start_call_main+0x80 (/usr/lib64/libc.so.6) egrep: warning: egrep is obsolescent; using grep -E FAIL: expected backtrace entry "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib64/libc.so.6\)$" got "7f3efe30c510 __libc_start_call_main+0x80 (/usr/lib64/libc.so.6)" test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! [root@qibo-anck014-an23-milan-1 ltp]# echo $? 0 [root@qibo-anck014-an23-milan-1 ltp]# uname -r 5.10.134-14_rc1.an23.x86_64 [root@qibo-anck014-an23-milan-1 ltp]# cat /etc/anolis-release Anolis OS release 23 [root@qibo-anck014-an23-milan-1 ltp]#
对比了下,在anolis8 5.10 x86 nightly环境下该case是pass的 ----------- https://tone.openanolis.cn/ws/jfupduzb/test_result/54537 https://anolis-service-pub.oss-cn-zhangjiakou.aliyuncs.com/biz-result/tone/54537/default_1677947660507423852/1/stdout.log?OSSAccessKeyId=LTAI5tRdZMfwezuemndcMdnR&Expires=1678099318&Signature=vwYXIHG8rOTn9lHKS3EG1qD%2B7rM%3D ------------ 75: x86 bp modify : Ok 76: Check Arm SPE trace data recording and synthesized samples : Skip 77: probe libc's inet_pton & backtrace it with ping : Ok #pass的 78: build id cache operations : Ok
@liuwei,帮忙贴一下perf的版本信息。
(In reply to yunmeng365524 from comment #5) > @liuwei,帮忙贴一下perf的版本信息。 这里包括014 版本的perf、an8 5.10 的perf,方便看两个版本之间的差异。
(In reply to yunmeng365524 from comment #6) > (In reply to yunmeng365524 from comment #5) > > @liuwei,帮忙贴一下perf的版本信息。 > > 这里包括014 版本的perf、an8 5.10 的perf,方便看两个版本之间的差异。 an23 5.10-014 x86的perf版本是5.10.134-14_rc1.an23.x86_64 ------------------------------------------------ link: http://8.131.87.1/kojifiles/repos/dist-an23-build/latest/x86_64/toplink/work/tasks/9201/549201/perf-5.10.134-14_rc1.an23.x86_64.rpm anolis8 5.10 x86的perf版本序列号是变化的,每晚随着nightly build新的。以最新的为例如下: ------------------------------ [root@qibo-anolis8-nightly-func-x86-3 ~]# perf test 77 77: probe libc's inet_pton & backtrace it with ping : Ok [root@qibo-anolis8-nightly-func-x86-3 ~]# [root@qibo-anolis8-nightly-func-x86-3 ~]# uname -r 5.10.134-334.git.23b31a882ca6.an8.x86_64 [root@qibo-anolis8-nightly-func-x86-3 ~]# [root@qibo-anolis8-nightly-func-x86-3 ~]# perf -v perf version 5.10.134-334.git.23b31a882ca6.an8.x86_64 [root@qibo-anolis8-nightly-func-x86-3 ~]# [root@qibo-anolis8-nightly-func-x86-3 ~]# cat /etc/anolis-release Anolis OS release 8.8 [root@qibo-anolis8-nightly-func-x86-3 ~]#
anolis23上的glibc版本太新了,升到2.36了,在测试”probe-libcs-inet_pton--backtrace-it-with-ping“时调用栈已经没有getaddrinfo函数符号了。如下所示,perf 采集的数据中没有getaddrinfo符号,但是expected文件中有getaddrinfo文件,因此两者匹配失败,导致测试失败: perf 采集的信息: [root@iZbp11g4dg2q997fe12m38Z tmp]# cat perf.script.+3m ping 3449382 [002] 12539007.493707: probe_libc:inet_pton:(7f84e7e948b0) 7f84e7e948b0 __GI___inet_pton+0x0(/usr/lib64/libc.s0.6) 5601980586fe [unknown] (/usr/bin/ping) 7f84e7d90550 -libc_start_call_main+0x80 (/usr/lib64/libc.s0.6) expected文件中期待的信息: eventattr='max-stack=3' echo "getaddrinfo\+@x![:xdigit:]]+[[ispace:]]\($libc))$"»>$expected echo ".*(\+0x[[:xdigit:]l+|\[unknown\])[[:space:11\(.*/bin/oing.*\)g" >> expected 当前upstream代码还未解决此问题,相关链接:https://lore.kernel.org/lkml/f5e69102-ed17-1f2d-3a09-3c7968b611ff@linux.ibm.com/ 待upsteam更新后,再回合相应的patch,此问题置为later。
Anolis23.1 loongarch64上存在相同问题 [perf version] [root@anolis ~]# perf --version perf version 5.10.134-16.2_rc1.an23.loongarch64 [内核信息]: [root@anolis ~]# uname -a Linux anolis 5.10.134-16.2_rc1.an23.loongarch64 #1 SMP Tue Jan 2 09:58:44 CST 2024 loongarch64 loongarch64 loongarch64 GNU/Linux [操作系统信息]: [root@anolis ~]# cat /etc/os-release NAME="Anolis OS" VERSION="23" ID="anolis" VERSION_ID="23" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" [问题]:必现 [root@anolis ~]# perf test -v 72 72: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 11916 fgrep: warning: fgrep is obsolescent; using grep -F fgrep: warning: fgrep is obsolescent; using grep -F FAIL: could not add event test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! [root@anolis ~]# perf test -s 24 1: vmlinux symtab matches kallsyms : Skip 2: Detect openat syscall event : FAILED! 3: Detect openat syscall event on all cpus : FAILED! 4: Read samples using the mmap interface : FAILED! 5: Test data source output : Ok 6: Parse event definition strings : FAILED! 7: Simple expression parser : Ok 8: PERF_RECORD_* events & perf_sample fields : Ok 9: Parse perf pmu format : Ok 10: PMU events : 10.1: PMU event table sanity : FAILED! 10.2: PMU event map aliases : FAILED! 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 11: DSO data read : Ok 12: DSO data cache : Ok 13: DSO data reopen : Ok 14: Roundtrip evsel->name : Ok 15: Parse sched tracepoints fields : Ok 16: syscalls:sys_enter_openat event fields : FAILED! 17: Setup struct perf_event_attr : Ok 18: Match and link multiple hists : Ok 19: 'import perf' in python : FAILED! 20: Breakpoint overflow signal handler : FAILED! 21: Breakpoint overflow sampling : FAILED! 22: Breakpoint accounting : Skip 23: Watchpoint : 23.1: Read Only Watchpoint : FAILED! 23.2: Write Only Watchpoint : FAILED! 23.3: Read / Write Watchpoint : FAILED! 23.4: Modify Watchpoint : FAILED! 24: Number of exit events of a simple workload : Skip (user override) 25: Software clock events period values : Ok 26: Object code reading : Ok 27: Sample parsing : Ok 28: Use a dummy software event to keep tracking : Ok 29: Parse with no sample_id_all bit set : Ok 30: Filter hist entries : Ok 31: Lookup mmap thread : Ok 32: Share thread maps : Ok 33: Sort output of hist entries : Ok 34: Cumulate child hist entries : Ok 35: Track with sched_switch : FAILED! 36: Filter fds with revents mask in a fdarray : Ok 37: Add fd to a fdarray, making it autogrow : Ok 38: kmod_path__parse : Ok 39: Thread map : Ok 40: LLVM search and compile : 40.1: Basic BPF llvm compile : Ok 40.2: kbuild searching : FAILED! 40.3: Compile source for BPF prologue generation : Skip 40.4: Compile source for BPF relocation : Skip 41: Session topology : Ok 42: BPF filter : 42.1: Basic BPF filtering : Ok 42.2: BPF pinning : Ok 43: Synthesize thread map : Ok 44: Remove thread map : Ok 45: Synthesize cpu map : Ok 46: Synthesize stat config : Ok 47: Synthesize stat : Ok 48: Synthesize stat round : Ok 49: Synthesize attr update : Ok 50: Event times : Ok 51: Read backward ring buffer : Skip 52: Print cpu map : Ok 53: Merge cpu map : Ok 54: Probe SDT events : Ok 55: is_printable_array : Ok 56: Print bitmap : Ok 57: perf hooks : Ok 58: builtin clang support : Skip (not compiled in) 59: unit_number__scnprintf : Ok 60: mem2node : Ok 61: time utils : Ok 62: Test jit_write_elf : Ok 63: Test libpfm4 support : Skip (not compiled in) 64: Test api io : Ok 65: maps__merge_in : Ok 66: Demangle Java : Ok 67: Parse and process metrics : Ok 68: PE file support : FAILED! 69: Event expansion for cgroups : Ok 70: build id cache operations : Ok 71: Add vfs_getname probe to get syscall args filenames : FAILED! 72: probe libc's inet_pton & backtrace it with ping : FAILED! 73: Use vfs_getname probe to get syscall args filenames : FAILED! 74: Zstd perf.data compression/decompression : Ok 75: Check Arm CoreSight trace data recording and synthesized samples: Skip 76: Check Arm SPE trace data recording and synthesized samples : Skip 77: Check open filename arg using perf trace + vfs_getname : FAILED!
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3989
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/4002