Bug 4341 - [Anolis23][x86_64][nightly][ANCK-5.10-14] perf-test测试case:DWARF-unwind run FAILED!
Summary: [Anolis23][x86_64][nightly][ANCK-5.10-14] perf-test测试case:DWARF-unwind run FA...
Status: NEW
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: Others (show other bugs) Others
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: maqiao
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-03 16:31 UTC by anolislw
Modified: 2025-06-26 14:08 UTC (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anolislw alibaba_cloud_group 2023-03-03 16:31:57 UTC
Description of problem:
Anolis23 x86_64环境,社区版nightly perf-test测试套 case:DWARF-unwind run FAILED!

Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. 安装anolis23 x86_64 nightly 内核包及其对应perf包
2. 机器新内核生效后,执行 perf test,找到对应的DWARF-unwind 标号执行 perf test -v +case标号
3. 或者执行perf test -v DWARF unwind

Actual results:
[root@qibo-anolis23-nightly-func-x86-1 ~]# perf test -v DWARF unwind
72: DWARF unwind                                                    :
--- start ---
test child forked, pid 1099205
unwind: '':ip = 0x56195b60f5f6 (0x3f05f6)
unwind: access_mem addr 0x7ffc19c02480, val 56195ceb5ad0, offset 16
unwind: access_mem addr 0x7ffc19c024a0, val 7ffc19c02a20, offset 48
unwind: access_mem addr 0x7ffc19c02488, val 7ffc19c024c0, offset 24
unwind: access_mem addr 0x7ffc19c02490, val 56195ceb5ad0, offset 32
unwind: access_mem addr 0x7ffc19c02498, val 56195b50be60, offset 40
unwind: access_mem addr 0x7ffc19c024a8, val 56195b50bd7c, offset 56
unwind: access_mem addr 0x7ffc19c02a10, val 7ffc19c02ae0, offset 1440
unwind: access_mem addr 0x7ffc19c02a20, val 7ffc19c02a60, offset 1456
unwind: access_mem addr 0x7ffc19c02a18, val 7ffc19c02ad0, offset 1448
unwind: access_mem addr 0x7ffc19c02a28, val 56195b50beca, offset 1464
unwind: '':ip = 0x56195b50bd7b (0x2ecd7b)
unwind: access_mem addr 0x7ffc19c02a48, val 1, offset 1496
unwind: access_mem addr 0x7ffc19c02a60, val 0, offset 1520
unwind: access_mem addr 0x7ffc19c02a50, val 2, offset 1504
unwind: access_mem addr 0x7ffc19c02a58, val 8, offset 1512
unwind: access_mem addr 0x7ffc19c02a68, val 7f1aa3f2be1c, offset 1528
unwind: '':ip = 0x56195b50bec9 (0x2ecec9)
unwind: access_mem addr 0x7ffc19c02a88, val 56195ce8c910, offset 1560
unwind: access_mem addr 0x7ffc19c02a90, val 7ffc19c02b00, offset 1568
unwind: access_mem addr 0x7ffc19c02a98, val 56195ceb5ad0, offset 1576
unwind: access_mem addr 0x7ffc19c02aa0, val ffffffff, offset 1584
unwind: access_mem addr 0x7ffc19c02aa8, val 48, offset 1592
unwind: access_mem addr 0x7ffc19c02ab0, val 56195b771917, offset 1600
unwind: access_mem addr 0x7ffc19c02ab8, val 56195b50bf56, offset 1608
unwind: bsearch:ip = 0x7f1aa3f2be1b (0x39e1b)
unwind: access_mem addr 0x7ffc19c02b00, val 7ffc19c02b20, offset 1680
unwind: access_mem addr 0x7ffc19c02b08, val 56195b50bfa0, offset 1688
unwind: '':ip = 0x56195b50bf55 (0x2ecf55)
unwind: access_mem addr 0x7ffc19c02b20, val 7ffc19c02b40, offset 1712
unwind: access_mem addr 0x7ffc19c02b28, val 56195b50bfe0, offset 1720
unwind: '':ip = 0x56195b50bf9f (0x2ecf9f)
unwind: access_mem addr 0x7ffc19c02b40, val 7ffc19c02b80, offset 1744
unwind: access_mem addr 0x7ffc19c02b48, val 56195b50c099, offset 1752
unwind: '':ip = 0x56195b50bfdf (0x2ecfdf)
unwind: access_mem addr 0x7ffc19c02b68, val 56195bc44bc0, offset 1784
unwind: access_mem addr 0x7ffc19c02b80, val 7ffc19c02c50, offset 1808
unwind: access_mem addr 0x7ffc19c02b70, val 56195b55f8d0, offset 1792
unwind: access_mem addr 0x7ffc19c02b78, val ffffffff, offset 1800
unwind: access_mem addr 0x7ffc19c02b88, val 56195b4e42dc, offset 1816
unwind: '':ip = 0x56195b50c098 (0x2ed098)
failed: got unresolved address 0x56195b50c098
unwind: failed with 'no error'
got wrong number of stack entries 0 != 8
test child finished with -1
---- end ----
DWARF unwind: FAILED!
[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
Comment 1 Banana alibaba_cloud_group 2023-03-06 16:02:12 UTC
以下是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
Comment 2 anolislw alibaba_cloud_group 2023-03-06 16:09:42 UTC
anolis23 x86环境,5.10-14上该case pass
----------------
[root@qibo-anck014-an23-milan-1 ltp]# perf test -v DWARF unwind
72: DWARF unwind                                                    :
--- start ---
test child forked, pid 965490
unwind: test__arch_unwind_sample:ip = 0x555ad20915f6 (0x3f05f6)
unwind: access_mem addr 0x7ffe92761740, val 555ad2e9d3b0, offset 16
unwind: access_mem addr 0x7ffe92761760, val 7ffe92761ce0, offset 48
unwind: access_mem addr 0x7ffe92761748, val 7ffe92761780, offset 24
unwind: access_mem addr 0x7ffe92761750, val 555ad2e9d3b0, offset 32
unwind: access_mem addr 0x7ffe92761758, val 555ad1f8de60, offset 40
unwind: access_mem addr 0x7ffe92761768, val 555ad1f8dd7c, offset 56
unwind: access_mem addr 0x7ffe92761cd0, val 7ffe92761da0, offset 1440
unwind: access_mem addr 0x7ffe92761ce0, val 7ffe92761d20, offset 1456
unwind: access_mem addr 0x7ffe92761cd8, val 7ffe92761d90, offset 1448
unwind: access_mem addr 0x7ffe92761ce8, val 555ad1f8deca, offset 1464
unwind: test_dwarf_unwind__thread:ip = 0x555ad1f8dd7b (0x2ecd7b)
unwind: access_mem addr 0x7ffe92761d08, val 1, offset 1496
unwind: access_mem addr 0x7ffe92761d20, val 0, offset 1520
unwind: access_mem addr 0x7ffe92761d10, val 2, offset 1504
unwind: access_mem addr 0x7ffe92761d18, val 8, offset 1512
unwind: access_mem addr 0x7ffe92761d28, val 7fe134974f5c, offset 1528
unwind: test_dwarf_unwind__compare:ip = 0x555ad1f8dec9 (0x2ecec9)
unwind: access_mem addr 0x7ffe92761d48, val 555ad2e638e0, offset 1560
unwind: access_mem addr 0x7ffe92761d50, val 7ffe92761dc0, offset 1568
unwind: access_mem addr 0x7ffe92761d58, val 555ad2e9d3b0, offset 1576
unwind: access_mem addr 0x7ffe92761d60, val ffffffff, offset 1584
unwind: access_mem addr 0x7ffe92761d68, val 48, offset 1592
unwind: access_mem addr 0x7ffe92761d70, val 555ad21f3917, offset 1600
unwind: access_mem addr 0x7ffe92761d78, val 555ad1f8df56, offset 1608
unwind: bsearch:ip = 0x7fe134974f5b (0x39f5b)
unwind: access_mem addr 0x7ffe92761dc0, val 7ffe92761de0, offset 1680
unwind: access_mem addr 0x7ffe92761dc8, val 555ad1f8dfa0, offset 1688
unwind: test_dwarf_unwind__krava_3:ip = 0x555ad1f8df55 (0x2ecf55)
unwind: access_mem addr 0x7ffe92761de0, val 7ffe92761e00, offset 1712
unwind: access_mem addr 0x7ffe92761de8, val 555ad1f8dfe0, offset 1720
unwind: test_dwarf_unwind__krava_2:ip = 0x555ad1f8df9f (0x2ecf9f)
unwind: access_mem addr 0x7ffe92761e00, val 7ffe92761e40, offset 1744
unwind: access_mem addr 0x7ffe92761e08, val 555ad1f8e099, offset 1752
unwind: test_dwarf_unwind__krava_1:ip = 0x555ad1f8dfdf (0x2ecfdf)
unwind: access_mem addr 0x7ffe92761e28, val 555ad26c6bc0, offset 1784
unwind: access_mem addr 0x7ffe92761e40, val 7ffe92761f10, offset 1808
unwind: access_mem addr 0x7ffe92761e30, val 555ad1fe18d0, offset 1792
unwind: access_mem addr 0x7ffe92761e38, val ffffffff, offset 1800
unwind: access_mem addr 0x7ffe92761e48, val 555ad1f662dc, offset 1816
unwind: test__dwarf_unwind:ip = 0x555ad1f8e098 (0x2ed098)
got: test__dwarf_unwind 0x555ad1f8e098, expecting test__dwarf_unwind
got: test_dwarf_unwind__krava_1 0x555ad1f8dfdf, expecting test_dwarf_unwind__krava_1
got: test_dwarf_unwind__krava_2 0x555ad1f8df9f, expecting test_dwarf_unwind__krava_2
got: test_dwarf_unwind__krava_3 0x555ad1f8df55, expecting test_dwarf_unwind__krava_3
got: bsearch 0x7fe134974f5b, expecting bsearch
got: test_dwarf_unwind__compare 0x555ad1f8dec9, expecting test_dwarf_unwind__compare
got: test_dwarf_unwind__thread 0x555ad1f8dd7b, expecting test_dwarf_unwind__thread
got: test__arch_unwind_sample 0x555ad20915f6, expecting test__arch_unwind_sample
unwind: test__arch_unwind_sample:ip = 0x555ad20915f6 (0x3f05f6)
unwind: access_mem addr 0x7ffe92761740, val 555ad2e9d3b0, offset 16
unwind: access_mem addr 0x7ffe92761760, val 7ffe92761ce0, offset 48
unwind: access_mem addr 0x7ffe92761748, val 7ffe92761780, offset 24
unwind: access_mem addr 0x7ffe92761750, val 555ad2e9d3b0, offset 32
unwind: access_mem addr 0x7ffe92761758, val 555ad1f8de60, offset 40
unwind: access_mem addr 0x7ffe92761768, val 555ad1f8dd7c, offset 56
unwind: access_mem addr 0x7ffe92761cd0, val 7ffe92761da0, offset 1440
unwind: access_mem addr 0x7ffe92761ce0, val 7ffe92761d20, offset 1456
unwind: access_mem addr 0x7ffe92761cd8, val 7ffe92761d90, offset 1448
unwind: access_mem addr 0x7ffe92761ce8, val 555ad1f8dee6, offset 1464
unwind: test_dwarf_unwind__thread:ip = 0x555ad1f8dd7b (0x2ecd7b)
unwind: access_mem addr 0x7ffe92761d08, val 1, offset 1496
unwind: access_mem addr 0x7ffe92761d20, val 0, offset 1520
unwind: access_mem addr 0x7ffe92761d10, val 2, offset 1504
unwind: access_mem addr 0x7ffe92761d18, val 8, offset 1512
unwind: access_mem addr 0x7ffe92761d28, val 7fe134974f5c, offset 1528
unwind: test_dwarf_unwind__compare:ip = 0x555ad1f8dee5 (0x2ecee5)
unwind: access_mem addr 0x7ffe92761d48, val 555ad2e638e0, offset 1560
unwind: access_mem addr 0x7ffe92761d50, val 7ffe92761dc0, offset 1568
unwind: access_mem addr 0x7ffe92761d58, val 555ad2e9d3b0, offset 1576
unwind: access_mem addr 0x7ffe92761d60, val ffffffff, offset 1584
unwind: access_mem addr 0x7ffe92761d68, val 48, offset 1592
unwind: access_mem addr 0x7ffe92761d70, val 555ad21f3917, offset 1600
unwind: access_mem addr 0x7ffe92761d78, val 555ad1f8df56, offset 1608
unwind: bsearch:ip = 0x7fe134974f5b (0x39f5b)
unwind: access_mem addr 0x7ffe92761dc0, val 7ffe92761de0, offset 1680
unwind: access_mem addr 0x7ffe92761dc8, val 555ad1f8dfa0, offset 1688
unwind: test_dwarf_unwind__krava_3:ip = 0x555ad1f8df55 (0x2ecf55)
unwind: access_mem addr 0x7ffe92761de0, val 7ffe92761e00, offset 1712
unwind: access_mem addr 0x7ffe92761de8, val 555ad1f8dfe0, offset 1720
unwind: test_dwarf_unwind__krava_2:ip = 0x555ad1f8df9f (0x2ecf9f)
unwind: access_mem addr 0x7ffe92761e00, val 7ffe92761e40, offset 1744
unwind: access_mem addr 0x7ffe92761e08, val 555ad1f8e099, offset 1752
unwind: test_dwarf_unwind__krava_1:ip = 0x555ad1f8dfdf (0x2ecfdf)
unwind: access_mem addr 0x7ffe92761e28, val 555ad26c6bc0, offset 1784
unwind: access_mem addr 0x7ffe92761e40, val 7ffe92761f10, offset 1808
unwind: access_mem addr 0x7ffe92761e30, val 555ad1fe18d0, offset 1792
unwind: access_mem addr 0x7ffe92761e38, val ffffffff, offset 1800
unwind: access_mem addr 0x7ffe92761e48, val 555ad1f662dc, offset 1816
unwind: test__dwarf_unwind:ip = 0x555ad1f8e098 (0x2ed098)
got: test__arch_unwind_sample 0x555ad20915f6, expecting test__arch_unwind_sample
got: test_dwarf_unwind__thread 0x555ad1f8dd7b, expecting test_dwarf_unwind__thread
got: test_dwarf_unwind__compare 0x555ad1f8dee5, expecting test_dwarf_unwind__compare
got: bsearch 0x7fe134974f5b, expecting bsearch
got: test_dwarf_unwind__krava_3 0x555ad1f8df55, expecting test_dwarf_unwind__krava_3
got: test_dwarf_unwind__krava_2 0x555ad1f8df9f, expecting test_dwarf_unwind__krava_2
got: test_dwarf_unwind__krava_1 0x555ad1f8dfdf, expecting test_dwarf_unwind__krava_1
got: test__dwarf_unwind 0x555ad1f8e098, expecting test__dwarf_unwind
test child finished with 0
---- end ----
DWARF unwind: Ok
[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
Comment 3 anolislw alibaba_cloud_group 2023-03-06 16:47:10 UTC
对比了下,在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
------------
Convert-perf-time-to-TSC: Skip
DWARF-unwind: Pass  #pass的
x86-instruction-decoder---new-instructions: Pass
Comment 4 zhangjing alibaba_cloud_group 2023-03-28 17:35:54 UTC
该问题是因为anolis23上的perf是经过strip的,查找dwarf_unwind符号为空,所以测试DWARF-unwind无法识别对应的函数符号,从而报错。anolis8上的perf工具有dwarf_unwind函数符号,所以它不报错。使用upstream的代码在anolis23上测试,并将perf进行strip,该测试项也会fail,因此该问题暂时置为later.

查看anolis23上的perf工具没有dward_unwind相关函数符号:
[root@iZbp11g4dg2q997fe12m38Z perf]#objdump -tT /usr/bin/perf | grep dwarf_unwind
[root@iZbp11g4dg2q997fe12m38Z perf]#

在anolis23上通过源码直接make,可以看到刚编译的perf工具有dwarf_unwind相关符号,且该测试是通过的,然后strip perf,没有dwarf_unwind相关符号,该测试失败。
[root@iZbp11g4dg2q997fe12m38Z perf]# ./perf test 70
 70: Test dwarf unwind                                               : Ok
[root@iZbp11g4dg2q997fe12m38Z perf]# objdump -tT perf | grep dwarf_unwind
0000000000ca8400 g     O .data	0000000000000018              suite__dwarf_unwind
000000000047ccb0 g     F .text	000000000000006a              test_dwarf_unwind__krava_3
000000000047cd20 g     F .text	0000000000000032              test_dwarf_unwind__krava_2
000000000047cd60 g     F .text	0000000000000032              test_dwarf_unwind__krava_1
000000000047cda0 g     F .text	000000000000015a              test__dwarf_unwind
000000000047cc20 g     F .text	000000000000008b              test_dwarf_unwind__compare
0000000000ca8420 g     O .data	0000000000000040              tests__dwarf_unwind
000000000047cb00 g     F .text	000000000000011e              test_dwarf_unwind__thread
[root@iZbp11g4dg2q997fe12m38Z perf]#
[root@iZbp11g4dg2q997fe12m38Z perf]# strip perf
[root@iZbp11g4dg2q997fe12m38Z perf]# objdump -tT perf | grep dwarf_unwind
[root@iZbp11g4dg2q997fe12m38Z perf]#
[root@iZbp11g4dg2q997fe12m38Z perf]# ./perf test 70
 70: Test dwarf unwind                                               : FAILED!


在anolis8环境中检查安装的perf工具,可以看到有dwarf_unwind相关符号,因此该项测试也是OK的。
[root@iZuf6i4iwe2asnhp3fn7mpZ ~]# objdump -tT /usr/bin/perf | grep dwarf_unwind
00000000002ed260 g    DF .text	0000000000000036  Base        test_dwarf_unwind__krava_1
00000000002ed220 g    DF .text	0000000000000036  Base        test_dwarf_unwind__krava_2
00000000002ed1a0 g    DF .text	0000000000000072  Base        test_dwarf_unwind__krava_3
00000000002ed100 g    DF .text	0000000000000096  Base        test_dwarf_unwind__compare
00000000002ecfc0 g    DF .text	0000000000000139  Base        test_dwarf_unwind__thread
00000000002ed2a0 g    DF .text	000000000000014f  Base        test__dwarf_unwind

[root@iZuf6i4iwe2asnhp3fn7mpZ ~]# perf test 72
72: DWARF unwind                                                    : Ok
Comment 5 yunhe123 alibaba_cloud_group 2024-04-25 14:51:11 UTC
Anolis23-6.6.25内核在云上ecs测试也存在该问题,日志如下:
# perf test 71 -v
 71: Test dwarf unwind                                               :
--- start ---
test child forked, pid 532063
unwind: '':ip = 0x55ec960dad76 (0x21ad76)
unwind: access_mem addr 0x7fffef90ca00, val 55ec96f079b0, offset 16
unwind: access_mem addr 0x7fffef90ca20, val 7fffef90cfc0, offset 48
unwind: access_mem addr 0x7fffef90ca08, val 7fffef90ca40, offset 24
unwind: access_mem addr 0x7fffef90ca10, val 55ec96f079b0, offset 32
unwind: access_mem addr 0x7fffef90ca18, val 55ec95fbd640, offset 40
unwind: access_mem addr 0x7fffef90ca28, val 55ec95fbd55c, offset 56
unwind: access_mem addr 0x7fffef90cfb0, val 7fffef90d080, offset 1472
unwind: access_mem addr 0x7fffef90cfc0, val 7fffef90d000, offset 1488
unwind: access_mem addr 0x7fffef90cfb8, val 7fffef90d070, offset 1480
unwind: access_mem addr 0x7fffef90cfc8, val 55ec95fbd6aa, offset 1496
unwind: '':ip = 0x55ec95fbd55b (0xfd55b)
unwind: access_mem addr 0x7fffef90cfe8, val 1, offset 1528
unwind: access_mem addr 0x7fffef90d000, val 0, offset 1552
unwind: access_mem addr 0x7fffef90cff0, val 2, offset 1536
unwind: access_mem addr 0x7fffef90cff8, val 8, offset 1544
unwind: access_mem addr 0x7fffef90d008, val 7f307303afcc, offset 1560
unwind: '':ip = 0x55ec95fbd6a9 (0xfd6a9)
unwind: access_mem addr 0x7fffef90d028, val 55ec96ed5860, offset 1592
unwind: access_mem addr 0x7fffef90d030, val 7fffef90d0a0, offset 1600
unwind: access_mem addr 0x7fffef90d038, val 55ec96f079b0, offset 1608
unwind: access_mem addr 0x7fffef90d040, val 55ec96016250, offset 1616
unwind: access_mem addr 0x7fffef90d048, val 7fffef90d8f8, offset 1624
unwind: access_mem addr 0x7fffef90d050, val 55ec967638c0, offset 1632
unwind: access_mem addr 0x7fffef90d058, val 55ec95fbd736, offset 1640
unwind: bsearch:ip = 0x7f307303afcb (0x3afcb)
unwind: access_mem addr 0x7fffef90d0a0, val 7fffef90d0c0, offset 1712
unwind: access_mem addr 0x7fffef90d0a8, val 55ec95fbd780, offset 1720
unwind: '':ip = 0x55ec95fbd735 (0xfd735)
unwind: access_mem addr 0x7fffef90d0c0, val 7fffef90d0e0, offset 1744
unwind: access_mem addr 0x7fffef90d0c8, val 55ec95fbd7c0, offset 1752
unwind: '':ip = 0x55ec95fbd77f (0xfd77f)
unwind: access_mem addr 0x7fffef90d0e0, val 7fffef90d120, offset 1776
unwind: access_mem addr 0x7fffef90d0e8, val 55ec95fbd879, offset 1784
unwind: '':ip = 0x55ec95fbd7bf (0xfd7bf)
unwind: access_mem addr 0x7fffef90d108, val 55ec967638c0, offset 1816
unwind: access_mem addr 0x7fffef90d120, val 7fffef90d1f0, offset 1840
unwind: access_mem addr 0x7fffef90d110, val ffffffffffffffff, offset 1824
unwind: access_mem addr 0x7fffef90d118, val 55ec96016250, offset 1832
unwind: access_mem addr 0x7fffef90d128, val 55ec95f8f1aa, offset 1848
unwind: '':ip = 0x55ec95fbd878 (0xfd878)
failed: got unresolved address 0x55ec95fbd878
unwind: failed with 'no error'
got wrong number of stack entries 0 != 8
test child finished with -1
---- end ----
Test dwarf unwind: FAILED!
Comment 6 anolislw alibaba_cloud_group 2024-11-06 17:49:24 UTC
记录下在anolis23 x86环境,内核为 6.6.25-2.2_rc1.an23.x86_64 的系统上也存在问题
-----------------------

[root@5f9Lab15 tone]# perf test 71 -v
 71: Test dwarf unwind                                               :
--- start ---
test child forked, pid 972674
unwind: '':ip = 0x55ea763e4db6 (0x21adb6)
unwind: access_mem addr 0x7ffea7fffef0, val 55ea78543080, offset 16
unwind: access_mem addr 0x7ffea7ffff10, val 7ffea80004b0, offset 48
unwind: access_mem addr 0x7ffea7fffef8, val 7ffea7ffff30, offset 24
unwind: access_mem addr 0x7ffea7ffff00, val 55ea78543080, offset 32
unwind: access_mem addr 0x7ffea7ffff08, val 55ea762c75a0, offset 40
unwind: access_mem addr 0x7ffea7ffff18, val 55ea762c74bc, offset 56
unwind: access_mem addr 0x7ffea80004a0, val 7ffea8000570, offset 1472
unwind: access_mem addr 0x7ffea80004b0, val 7ffea80004f0, offset 1488
unwind: access_mem addr 0x7ffea80004a8, val 7ffea8000560, offset 1480
unwind: access_mem addr 0x7ffea80004b8, val 55ea762c760a, offset 1496
unwind: '':ip = 0x55ea762c74bb (0xfd4bb)
unwind: access_mem addr 0x7ffea80004d8, val 1, offset 1528
unwind: access_mem addr 0x7ffea80004f0, val 0, offset 1552
unwind: access_mem addr 0x7ffea80004e0, val 2, offset 1536
unwind: access_mem addr 0x7ffea80004e8, val 8, offset 1544
unwind: access_mem addr 0x7ffea80004f8, val 7ff80343afcc, offset 1560
unwind: '':ip = 0x55ea762c7609 (0xfd609)
unwind: access_mem addr 0x7ffea8000518, val 55ea7850a300, offset 1592
unwind: access_mem addr 0x7ffea8000520, val 7ffea8000590, offset 1600
unwind: access_mem addr 0x7ffea8000528, val 55ea78543080, offset 1608
unwind: access_mem addr 0x7ffea8000530, val 55ea76320290, offset 1616
unwind: access_mem addr 0x7ffea8000538, val 7ffea8000de8, offset 1624
unwind: access_mem addr 0x7ffea8000540, val 55ea76a6d8c0, offset 1632
unwind: access_mem addr 0x7ffea8000548, val 55ea762c7696, offset 1640
unwind: bsearch:ip = 0x7ff80343afcb (0x3afcb)
unwind: access_mem addr 0x7ffea8000590, val 7ffea80005b0, offset 1712
unwind: access_mem addr 0x7ffea8000598, val 55ea762c76e0, offset 1720
unwind: '':ip = 0x55ea762c7695 (0xfd695)
unwind: access_mem addr 0x7ffea80005b0, val 7ffea80005d0, offset 1744
unwind: access_mem addr 0x7ffea80005b8, val 55ea762c7720, offset 1752
unwind: '':ip = 0x55ea762c76df (0xfd6df)
unwind: access_mem addr 0x7ffea80005d0, val 7ffea8000610, offset 1776
unwind: access_mem addr 0x7ffea80005d8, val 55ea762c77d9, offset 1784
unwind: '':ip = 0x55ea762c771f (0xfd71f)
unwind: access_mem addr 0x7ffea80005f8, val 55ea76a6d8c0, offset 1816
unwind: access_mem addr 0x7ffea8000610, val 7ffea80006e0, offset 1840
unwind: access_mem addr 0x7ffea8000600, val ffffffffffffffff, offset 1824
unwind: access_mem addr 0x7ffea8000608, val 55ea76320290, offset 1832
unwind: access_mem addr 0x7ffea8000618, val 55ea7629910a, offset 1848
unwind: '':ip = 0x55ea762c77d8 (0xfd7d8)
failed: got unresolved address 0x55ea762c77d8
unwind: failed with 'no error'
got wrong number of stack entries 0 != 8
test child finished with -1
---- end ----
Test dwarf unwind: FAILED!
[root@5f9Lab15 tone]# uname -r
6.6.25-2.2_rc1.an23.x86_64
Comment 7 gaohongmei 2025-06-26 14:08:51 UTC
记录下在anolis23 x86,内核为 6.6.88-cbp.git.1432012a7.an23.x86_64 的系统上也存在问题

# uname -r
6.6.88-cbp.git.1432012a7.an23.x86_64
# 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/"


# cd /var/tmp/tone/run/
# perf test -v 72
 72: Test dwarf unwind                                               :
--- start ---
test child forked, pid 1790360
unwind: '':ip = 0x55d8c3c631d6 (0x21c1d6)
unwind: access_mem addr 0x7ffc0fa26130, val 55d8ee8fffa0, offset 16
unwind: access_mem addr 0x7ffc0fa26150, val 7ffc0fa266f0, offset 48
unwind: access_mem addr 0x7ffc0fa26138, val 7ffc0fa26170, offset 24
unwind: access_mem addr 0x7ffc0fa26140, val 55d8ee8fffa0, offset 32
unwind: access_mem addr 0x7ffc0fa26148, val 55d8c3b44c10, offset 40
unwind: access_mem addr 0x7ffc0fa26158, val 55d8c3b44b2c, offset 56
unwind: access_mem addr 0x7ffc0fa266e0, val 7ffc0fa267b0, offset 1472
unwind: access_mem addr 0x7ffc0fa266f0, val 7ffc0fa26730, offset 1488
unwind: access_mem addr 0x7ffc0fa266e8, val 7ffc0fa267a0, offset 1480
unwind: access_mem addr 0x7ffc0fa266f8, val 55d8c3b44c7a, offset 1496
unwind: '':ip = 0x55d8c3b44b2b (0xfdb2b)
unwind: access_mem addr 0x7ffc0fa26718, val 1, offset 1528
unwind: access_mem addr 0x7ffc0fa26730, val 0, offset 1552
unwind: access_mem addr 0x7ffc0fa26720, val 2, offset 1536
unwind: access_mem addr 0x7ffc0fa26728, val 8, offset 1544
unwind: access_mem addr 0x7ffc0fa26738, val 7f3a25e3b10c, offset 1560
unwind: '':ip = 0x55d8c3b44c79 (0xfdc79)
unwind: access_mem addr 0x7ffc0fa26758, val 55d8ee8abc40, offset 1592
unwind: access_mem addr 0x7ffc0fa26760, val 7ffc0fa267d0, offset 1600
unwind: access_mem addr 0x7ffc0fa26768, val 55d8ee8fffa0, offset 1608
unwind: access_mem addr 0x7ffc0fa26770, val 55d8c3b9d520, offset 1616
unwind: access_mem addr 0x7ffc0fa26778, val 55d8c42ec980, offset 1624
unwind: access_mem addr 0x7ffc0fa26780, val 7ffc0fa27038, offset 1632
unwind: access_mem addr 0x7ffc0fa26788, val 55d8c3b44d06, offset 1640
unwind: bsearch:ip = 0x7f3a25e3b10b (0x3b10b)
unwind: access_mem addr 0x7ffc0fa267d0, val 7ffc0fa267f0, offset 1712
unwind: access_mem addr 0x7ffc0fa267d8, val 55d8c3b44d50, offset 1720
unwind: '':ip = 0x55d8c3b44d05 (0xfdd05)
unwind: access_mem addr 0x7ffc0fa267f0, val 7ffc0fa26810, offset 1744
unwind: access_mem addr 0x7ffc0fa267f8, val 55d8c3b44d90, offset 1752
unwind: '':ip = 0x55d8c3b44d4f (0xfdd4f)
unwind: access_mem addr 0x7ffc0fa26810, val 7ffc0fa26850, offset 1776
unwind: access_mem addr 0x7ffc0fa26818, val 55d8c3b44e49, offset 1784
unwind: '':ip = 0x55d8c3b44d8f (0xfdd8f)
unwind: access_mem addr 0x7ffc0fa26838, val 55d8c42ec980, offset 1816
unwind: access_mem addr 0x7ffc0fa26850, val 7ffc0fa26920, offset 1840
unwind: access_mem addr 0x7ffc0fa26840, val ffffffffffffffff, offset 1824
unwind: access_mem addr 0x7ffc0fa26848, val 55d8c3b9d520, offset 1832
unwind: access_mem addr 0x7ffc0fa26858, val 55d8c3b162aa, offset 1848
unwind: '':ip = 0x55d8c3b44e48 (0xfde48)
failed: got unresolved address 0x55d8c3b44e48
unwind: failed with 'no error'
got wrong number of stack entries 0 != 8
test child finished with -1
---- end ----
Test dwarf unwind: FAILED!