llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.53k stars 11.79k forks source link

coredump with perf2bolt on Aarch64 #100705

Open dnutakki opened 2 months ago

dnutakki commented 2 months ago

I see a coredump with the following command on Aarch64 :-

perf2bolt -p perf.data -o perf.fdata PERF2BOLT: Starting data aggregation job for perf.data PERF2BOLT: spawning perf job to read branch events PERF2BOLT: spawning perf job to read mem events PERF2BOLT: spawning perf job to read process events PERF2BOLT: spawning perf job to read task events BOLT-INFO: Target architecture: aarch64 BOLT-INFO: BOLT version: 91073380ac5a0dceebdd09f360a1dc194d7ee93f BOLT-INFO: first alloc address is 0x400000 BOLT-INFO: creating new program header table at address 0xc00000, offset 0x800000 BOLT-INFO: enabling relocation mode BOLT-INFO: enabling strict relocation mode for aggregation purposes BOLT-INFO: pre-processing profile using perf data aggregator BOLT-INFO: binary build-id is: 2bb5a6045ace8915cd40671d93021aa708d4facb PERF2BOLT: spawning perf job to read buildid list PERF2BOLT-ERROR: failed to match build-id from perf output. This indicates the input binary supplied for data aggregation is not the same recorded by perf when collecting profiling data, or there were no samples recorded for the binary. Use -ignore-build-id option to override.

perf2bolt -p perf.data -o perf.fdata -ignore-build-id PERF2BOLT: Starting data aggregation job for perf.data PERF2BOLT: spawning perf job to read branch events PERF2BOLT: spawning perf job to read mem events PERF2BOLT: spawning perf job to read process events PERF2BOLT: spawning perf job to read task events BOLT-INFO: Target architecture: aarch64 BOLT-INFO: BOLT version: 91073380ac5a0dceebdd09f360a1dc194d7ee93f BOLT-INFO: first alloc address is 0x400000 BOLT-INFO: creating new program header table at address 0xc00000, offset 0x800000 BOLT-INFO: enabling relocation mode BOLT-INFO: enabling strict relocation mode for aggregation purposes BOLT-INFO: pre-processing profile using perf data aggregator BOLT-INFO: binary build-id is: 2bb5a6045ace8915cd40671d93021aa708d4facb PERF2BOLT: spawning perf job to read buildid list PERF2BOLT-ERROR: failed to match build-id from perf output. This indicates the input binary supplied for data aggregation is not the same recorded by perf when collecting profiling data, or there were no samples recorded for the binary. Use -ignore-build-id option to override. PERF2BOLT: waiting for perf mmap events collection to finish... PERF2BOLT: parsing perf-script mmap events output PERF2BOLT: waiting for perf task events collection to finish... PERF2BOLT: parsing perf-script task events output PERF2BOLT: input binary is associated with 1 PID(s) PERF2BOLT: waiting for perf events collection to finish... PERF2BOLT: parse branch events... PERF2BOLT: read 0 samples and 0 LBR entries PERF2BOLT: traces mismatching disassembled function contents: 0 PERF2BOLT: out of range traces involving unknown regions: 0 PERF2BOLT: waiting for perf mem events collection to finish... BOLT-ERROR: cannot find BB containing branch destination. FATAL BOLT-ERROR: ======================================= BOLT is unable to proceed because it couldn't properly understand this function. If you are running the most recent version of BOLT, you may want to report this and paste this dump. Please check that there is no sensitive contents being shared in this dump.

Offending function: pardump

Function contents ( 0000: FD7BBBA9 E20301AA FD030091 F35301A9 |.{...........S..| 0010: F40300AA F30301AA F55B02A9 F76303A9 |.........[...c..| 0020: 38008052 F92300F9 000040F9 36704039 |8..R.#....@.6p@9| 0030: 01184DF9 D60E0012 1823D61A 350040F9 |..M......#..5.@.| 0040: 370C40F9 E1230090 21802A91 A0023FD6 |7.@..#..!....?.| 0050: 800240F9 E1230090 620640F9 21C02A91 |..@..#..b.@.!..| 0060: 66724039 63124229 651A40B9 A0023FD6 |fr@9c.B)e.@...?.| 0070: DF0A0071 000A0054 1F130071 EC040054 |...q...T...q...T| 0080: 360F0034 DF060071 610D0054 601240B9 |6..4...qa..T.@.| 0090: F8230090 392400F0 18E32B91 39833991 |.#..9$....+.9.9.| 00A0: 16008052 A0020034 620240F9 C37E0853 |...R...4b.@..~.S| 00B0: 61724039 C01E0012 D6060011 210C0012 |ar@9........!...| 00C0: 0020C11A 417863F8 22486078 E10318AA |. ..Axc."Hx....| 00D0: 800240F9 A0023FD6 DF0A40F2 C1050054 |..@...?...@....T| 00E0: 800240F9 E10319AA A0023FD6 601240B9 |..@.......?..@.| 00F0: DF02006B A3FDFF54 800240F9 F00317AA |...k...T..@.....| 0100: F35341A9 F55B42A9 F76343A9 F92340F9 |.SA..[B..cC..#@.| 0110: FD7BC5A8 00021FD6 DF0E0071 C1080054 |.{.........q...T| 0120: 601240B9 F8230090 392400F0 18232C91 |.@..#..9$...#,.| 0130: 39833991 16008052 00FEFF34 1F2003D5 |9.9....R...4. ..| 0140: 620240F9 C37E0853 61724039 C01E0012 |b.@..~.Sar@9....| 0150: D6060011 210C0012 0020C11A 417863F8 |....!.... ..Axc.| 0160: 224860F8 E10318AA 800240F9 A0023FD6 |"H.......@...?.| 0170: DF0640F2 81010054 800240F9 E10319AA |..@....T..@.....| 0180: A0023FD6 601240B9 DF02006B A3FDFF54 |..?..@....k...T| 0190: DAFFFF17 601240B9 DF02006B 63F8FF54 |.....@....kc..T| 01A0: D6FFFF17 601240B9 DF02006B A3FCFF54 |.....@....k...T| 01B0: D2FFFF17 601240B9 F8230090 392400F0 |.....@..#..9$..| 01C0: 18032C91 39833991 16008052 60F9FF34 |..,.9.9....R..4| 01D0: 620240F9 C37E0853 61724039 C01E0012 |b.@..~.Sar@9....| 01E0: D6060011 210C0012 0020C11A 417863F8 |....!.... ..Axc.| 01F0: 224860B8 E10318AA 800240F9 A0023FD6 |"H.......@...?.| 0200: DF0640F2 01010054 800240F9 E10319AA |..@....T..@.....| 0210: A0023FD6 601240B9 DF02006B A3FDFF54 |..?..@....k...T| 0220: B6FFFF17 601240B9 DF02006B 23FDFF54 |.....@....k#..T| 0230: B2FFFF17 800240F9 E1230090 21402C91 |......@..#..!@,.| 0240: A0023FD6 800240F9 F00317AA F35341A9 |..?...@......SA.| 0250: F55B42A9 F76343A9 F92340F9 FD7BC5A8 |.[B..cC..#@..{..| 0260: 00021FD6 601240B9 F8230090 392400F0 |.....@..#..9$..| 0270: 18C32B91 39833991 16008052 E0F3FF34 |..+.9.9....R...4| 0280: 620240F9 C37E0853 61724039 C01E0012 |b.@..~.Sar@9....| 0290: D6060011 210C0012 0020C11A 417863F8 |....!.... ..Axc.| 02A0: 22486038 E10318AA 800240F9 A0023FD6 |"H8......@...?.| 02B0: DF0E40F2 01010054 800240F9 E10319AA |..@....T..@.....| 02C0: A0023FD6 601240B9 DF02006B A3FDFF54 |..?..@....k...T| 02D0: 8AFFFF17 601240B9 DF02006B 23FDFF54 |....`.@....k#..T| 02E0: 86FFFF17 1F2003D5 1F2003D5 1F2003D5 |..... ... ... ..| 02F0: 1F2003D5 1F2003D5 1F2003D5 1F2003D5 |. ... ... ... ..| )

Binary Function "pardump" { Number : 404 State : disassembled Address : 0x454a10 Size : 0x2e4 MaxSize : 0x300 Offset : 0x54a10 Section : .text Orc Section : .local.text.pardump LSDA : 0x0 IsSimple : 1 IsMultiEntry: 0 IsSplit : 0 BB Count : 24 CFI Instrs : 34 } DWARF CFI Instructions: 00000004: OpDefCfaOffset 80 00000004: OpOffset Reg29 -80 00000004: OpOffset Reg30 -72 00000010: OpOffset Reg19 -64 00000010: OpOffset Reg20 -56 00000020: OpOffset Reg21 -48 00000020: OpOffset Reg22 -40 00000020: OpOffset Reg23 -32 00000020: OpOffset Reg24 -24 00000028: OpOffset Reg25 -16 00000114: OpRememberState 00000114: OpRestore Reg30 00000114: OpRestore Reg29 00000114: OpRestore Reg25 00000114: OpRestore Reg23 00000114: OpRestore Reg24 00000114: OpRestore Reg21 00000114: OpRestore Reg22 00000114: OpRestore Reg19 00000114: OpRestore Reg20 00000114: OpDefCfaOffset 0 00000118: OpRestoreState 00000260: OpRememberState 00000260: OpRestore Reg30 00000260: OpRestore Reg29 00000260: OpRestore Reg25 00000260: OpRestore Reg23 00000260: OpRestore Reg24 00000260: OpRestore Reg21 00000260: OpRestore Reg22 00000260: OpRestore Reg19 00000260: OpRestore Reg20 00000260: OpDefCfaOffset 0 00000264: OpRestoreState End of Function "pardump"

ERROR: disassembly failed - inconsistent branch found.

LLVM ERROR: pthread_join failed: Resource deadlock avoided Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var LLVM_SYMBOLIZER_PATH to point to it): 0 perf2bolt 0x0000000000d1c510 1 perf2bolt 0x0000000000d1a600 2 perf2bolt 0x0000000000d1a784 3 linux-vdso.so.1 0x0000fffff7ffc8dc __kernel_rt_sigreturn + 0 4 libc.so.6 0x0000fffff7a8f7a8 gsignal + 176 5 libc.so.6 0x0000fffff7a79af0 abort + 280 6 perf2bolt 0x0000000000cbbff0 7 perf2bolt 0x0000000000d23b2c 8 perf2bolt 0x0000000000d23d64 9 perf2bolt 0x0000000002002b48 10 perf2bolt 0x0000000002002da4 11 perf2bolt 0x00000000013dcf64 12 libc.so.6 0x0000fffff7a91f44 13 libc.so.6 0x0000fffff7a920c4 14 perf2bolt 0x0000000000d8a558 15 perf2bolt 0x0000000000d9422c 16 perf2bolt 0x00000000013ddac4 17 perf2bolt 0x0000000001278638 18 perf2bolt 0x0000000000def09c 19 libpthread.so.0 0x0000fffff7f988f4 20 perf2bolt 0x0000000001278d40 21 perf2bolt 0x000000000127aa6c 22 perf2bolt 0x0000000002003c10 23 perf2bolt 0x00000000020048a8 24 libpthread.so.0 0x0000fffff7f90950 25 libc.so.6 0x0000fffff7a7ce1c PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Abort (core dumped)

System Details :-

cat /etc/oracle-release Oracle Linux Server release 8.6

uname -a Linux 5.15.0-205.149.5.1.el8uek.aarch64 #2 SMP Fri Apr 5 13:37:11 PDT 2024 aarch64 aarch64 aarch64 GNU/Linux

llvm-bolt --version LLVM (http://llvm.org/): LLVM version 20.0.0git Optimized build with assertions. BOLT revision 91073380ac5a0dceebdd09f360a1dc194d7ee93f

Registered Targets: aarch64 - AArch64 (little endian) aarch64_32 - AArch64 (little endian ILP32) aarch64_be - AArch64 (big endian) arm64 - ARM64 (little endian) arm64_32 - ARM64 (little endian ILP32) x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64

perf --version perf version 4.18.0-553.8.1.el8_10.aarch64

(gdb) thread apply all bt

Thread 2 (Thread 0xfffff7a57010 (LWP 2001779)):

0 0x0000fffff7f96d70 in pthread_cond_wait@@GLIBC_2.17 () from /lib64/libpthread.so.0

1 0x0000fffff7d87b08 in std::condition_variable::wait(std::unique_lock&) () from /lib64/libstdc++.so.6

2 0x00000000020034d0 in llvm::StdThreadPool::wait() ()

3 0x00000000013de8c4 in llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, unsigned int) ()

4 0x0000000000d9fa54 in llvm::bolt::RewriteInstance::buildFunctionsCFG() ()

5 0x0000000000dd3738 in llvm::bolt::RewriteInstance::run() ()

6 0x00000000004077a0 in main ()

Thread 1 (Thread 0xfffff6774190 (LWP 2001791)):

0 0x0000fffff7a8f7a8 in raise () from /lib64/libc.so.6

1 0x0000fffff7a79ba8 in abort () from /lib64/libc.so.6

2 0x0000000000cbbff0 in llvm::report_fatal_error(llvm::Twine const&, bool) ()

3 0x0000000000d23b2c in ReportErrnumFatal(char const*, int) ()

4 0x0000000000d23d64 in llvm::llvm_thread_join_impl(unsigned long) ()

5 0x0000000002002b48 in llvm::StdThreadPool::~StdThreadPool() ()

6 0x0000000002002da4 in llvm::StdThreadPool::~StdThreadPool() ()

7 0x00000000013dcf64 in std::unique_ptr<llvm::StdThreadPool, std::default_delete >::~unique_ptr() ()

8 0x0000fffff7a91f44 in __run_exit_handlers () from /lib64/libc.so.6

9 0x0000fffff7a920c4 in exit () from /lib64/libc.so.6

10 0x0000000000d8a558 in llvm::Error llvm::handleErrorImpl<llvm::bolt::RewriteInstance::buildFunctionsCFG()::{lambda(llvm::bolt::BinaryFunction&, unsigned short)#1}::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::{lambda(llvm::bolt::BOLTError const&)#1}>(std::unique_ptr<llvm::ErrorInfoBase, std::default_delete >, llvm::bolt::RewriteInstance::buildFunctionsCFG()::{lambda(llvm::bolt::BinaryFunction&, unsigned short)#1}::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::{lambda(llvm::bolt::BOLTError const&)#1}&&) ()

11 0x0000000000d9422c in std::_Function_handler<void (llvm::bolt::BinaryFunction&, unsigned short), llvm::bolt::RewriteInstance::buildFunctionsCFG()::{lambda(llvm::bolt::BinaryFunction&, unsigned short)#1}>::_M_invoke(std::_Any_data const&, llvm::bolt::BinaryFunction&, unsigned short&&) ()

12 0x00000000013ddac4 in std::_Function_handler<void (), std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, unsigned int)::{lambda(std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction> >, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction> >, unsigned short)#1} (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction> >, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction> >, unsigned int)> >::_M_invoke(std::_Any_data const&) ()

13 0x0000000001278638 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::future_base::_Result_base::_Deleter> (), std::future_base::_Task_setter<std::unique_ptr<std::future_base::_Result, std::future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()> > >, void> >::_M_invoke(std::_Any_data const&) ()

14 0x0000000000def09c in std::future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::future_base::_Result_base::_Deleter> ()>, bool) ()

15 0x0000fffff7f988f4 in __pthread_once_slow () from /lib64/libpthread.so.0

16 0x0000000001278d40 in std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<std::function<void ()> > >, void>::_M_complete_async()

--Type for more, q to quit, c to continue without paging--c ()

17 0x000000000127aa6c in std::_Function_handler<void (), llvm::ThreadPoolInterface::asyncImpl(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()

18 0x0000000002003c10 in llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) ()

19 0x00000000020048a8 in void* llvm::thread::ThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::{lambda()#1}> >(std::tuple<llvm::StdThreadPool::grow(int)::{lambda()#1}>) ()

20 0x0000fffff7f90950 in start_thread () from /lib64/libpthread.so.0

21 0x0000fffff7a7ce1c in thread_start () from /lib64/libc.so.6

(gdb)

llvmbot commented 2 months ago

@llvm/issue-subscribers-bolt

Author: None (dnutakki)

I see a coredump with the following command on Aarch64 :- > perf2bolt -p perf.data -o perf.fdata <binary_name> PERF2BOLT: Starting data aggregation job for perf.data PERF2BOLT: spawning perf job to read branch events PERF2BOLT: spawning perf job to read mem events PERF2BOLT: spawning perf job to read process events PERF2BOLT: spawning perf job to read task events BOLT-INFO: Target architecture: aarch64 BOLT-INFO: BOLT version: 91073380ac5a0dceebdd09f360a1dc194d7ee93f BOLT-INFO: first alloc address is 0x400000 BOLT-INFO: creating new program header table at address 0xc00000, offset 0x800000 BOLT-INFO: enabling relocation mode BOLT-INFO: enabling strict relocation mode for aggregation purposes BOLT-INFO: pre-processing profile using perf data aggregator BOLT-INFO: binary build-id is: 2bb5a6045ace8915cd40671d93021aa708d4facb PERF2BOLT: spawning perf job to read buildid list PERF2BOLT-ERROR: failed to match build-id from perf output. This indicates the input binary supplied for data aggregation is not the same recorded by perf when collecting profiling data, or there were no samples recorded for the binary. Use -ignore-build-id option to override. > perf2bolt -p perf.data -o perf.fdata <binary_name> -ignore-build-id PERF2BOLT: Starting data aggregation job for perf.data PERF2BOLT: spawning perf job to read branch events PERF2BOLT: spawning perf job to read mem events PERF2BOLT: spawning perf job to read process events PERF2BOLT: spawning perf job to read task events BOLT-INFO: Target architecture: aarch64 BOLT-INFO: BOLT version: 91073380ac5a0dceebdd09f360a1dc194d7ee93f BOLT-INFO: first alloc address is 0x400000 BOLT-INFO: creating new program header table at address 0xc00000, offset 0x800000 BOLT-INFO: enabling relocation mode BOLT-INFO: enabling strict relocation mode for aggregation purposes BOLT-INFO: pre-processing profile using perf data aggregator BOLT-INFO: binary build-id is: 2bb5a6045ace8915cd40671d93021aa708d4facb PERF2BOLT: spawning perf job to read buildid list PERF2BOLT-ERROR: failed to match build-id from perf output. This indicates the input binary supplied for data aggregation is not the same recorded by perf when collecting profiling data, or there were no samples recorded for the binary. Use -ignore-build-id option to override. PERF2BOLT: waiting for perf mmap events collection to finish... PERF2BOLT: parsing perf-script mmap events output PERF2BOLT: waiting for perf task events collection to finish... PERF2BOLT: parsing perf-script task events output PERF2BOLT: input binary is associated with 1 PID(s) PERF2BOLT: waiting for perf events collection to finish... PERF2BOLT: parse branch events... PERF2BOLT: read 0 samples and 0 LBR entries PERF2BOLT: traces mismatching disassembled function contents: 0 PERF2BOLT: out of range traces involving unknown regions: 0 PERF2BOLT: waiting for perf mem events collection to finish... BOLT-ERROR: cannot find BB containing branch destination. FATAL BOLT-ERROR: ======================================= BOLT is unable to proceed because it couldn't properly understand this function. If you are running the most recent version of BOLT, you may want to report this and paste this dump. Please check that there is no sensitive contents being shared in this dump. Offending function: pardump Function contents ( 0000: FD7BBBA9 E20301AA FD030091 F35301A9 |.{...........S..| 0010: F40300AA F30301AA F55B02A9 F76303A9 |.........[...c..| 0020: 38008052 F92300F9 000040F9 36704039 |8..R.#....@.6p@9| 0030: 01184DF9 D60E0012 1823D61A 350040F9 |..M......#..5.@.| 0040: 370C40F9 E1230090 21802A91 A0023FD6 |7.@..#..!.*...?.| 0050: 800240F9 E1230090 620640F9 21C02A91 |..@..#..b.@.!.*.| 0060: 66724039 63124229 651A40B9 A0023FD6 |fr@9c.B)e.@...?.| 0070: DF0A0071 000A0054 1F130071 EC040054 |...q...T...q...T| 0080: 360F0034 DF060071 610D0054 601240B9 |6..4...qa..T`.@.| 0090: F8230090 392400F0 18E32B91 39833991 |.#..9$....+.9.9.| 00A0: 16008052 A0020034 620240F9 C37E0853 |...R...4b.@..~.S| 00B0: 61724039 C01E0012 D6060011 210C0012 |ar@9........!...| 00C0: 0020C11A 417863F8 22486078 E10318AA |. ..Axc."H`x....| 00D0: 800240F9 A0023FD6 DF0A40F2 C1050054 |..@...?...@....T| 00E0: 800240F9 E10319AA A0023FD6 601240B9 |..@.......?.`.@.| 00F0: DF02006B A3FDFF54 800240F9 F00317AA |...k...T..@.....| 0100: F35341A9 F55B42A9 F76343A9 F92340F9 |.SA..[B..cC..#@.| 0110: FD7BC5A8 00021FD6 DF0E0071 C1080054 |.{.........q...T| 0120: 601240B9 F8230090 392400F0 18232C91 |`.@..#..9$...#,.| 0130: 39833991 16008052 00FEFF34 1F2003D5 |9.9....R...4. ..| 0140: 620240F9 C37E0853 61724039 C01E0012 |b.@..~.Sar@9....| 0150: D6060011 210C0012 0020C11A 417863F8 |....!.... ..Axc.| 0160: 224860F8 E10318AA 800240F9 A0023FD6 |"H`.......@...?.| 0170: DF0640F2 81010054 800240F9 E10319AA |..@....T..@.....| 0180: A0023FD6 601240B9 DF02006B A3FDFF54 |..?.`.@....k...T| 0190: DAFFFF17 601240B9 DF02006B 63F8FF54 |....`.@....kc..T| 01A0: D6FFFF17 601240B9 DF02006B A3FCFF54 |....`.@....k...T| 01B0: D2FFFF17 601240B9 F8230090 392400F0 |....`.@..#..9$..| 01C0: 18032C91 39833991 16008052 60F9FF34 |..,.9.9....R`..4| 01D0: 620240F9 C37E0853 61724039 C01E0012 |b.@..~.Sar@9....| 01E0: D6060011 210C0012 0020C11A 417863F8 |....!.... ..Axc.| 01F0: 224860B8 E10318AA 800240F9 A0023FD6 |"H`.......@...?.| 0200: DF0640F2 01010054 800240F9 E10319AA |..@....T..@.....| 0210: A0023FD6 601240B9 DF02006B A3FDFF54 |..?.`.@....k...T| 0220: B6FFFF17 601240B9 DF02006B 23FDFF54 |....`.@....k#..T| 0230: B2FFFF17 800240F9 E1230090 21402C91 |......@..#..!@,.| 0240: A0023FD6 800240F9 F00317AA F35341A9 |..?...@......SA.| 0250: F55B42A9 F76343A9 F92340F9 FD7BC5A8 |.[B..cC..#@..{..| 0260: 00021FD6 601240B9 F8230090 392400F0 |....`.@..#..9$..| 0270: 18C32B91 39833991 16008052 E0F3FF34 |..+.9.9....R...4| 0280: 620240F9 C37E0853 61724039 C01E0012 |b.@..~.Sar@9....| 0290: D6060011 210C0012 0020C11A 417863F8 |....!.... ..Axc.| 02A0: 22486038 E10318AA 800240F9 A0023FD6 |"H`8......@...?.| 02B0: DF0E40F2 01010054 800240F9 E10319AA |..@....T..@.....| 02C0: A0023FD6 601240B9 DF02006B A3FDFF54 |..?.`.@....k...T| 02D0: 8AFFFF17 601240B9 DF02006B 23FDFF54 |....`.@....k#..T| 02E0: 86FFFF17 1F2003D5 1F2003D5 1F2003D5 |..... ... ... ..| 02F0: 1F2003D5 1F2003D5 1F2003D5 1F2003D5 |. ... ... ... ..| ) Binary Function "pardump" { Number : 404 State : disassembled Address : 0x454a10 Size : 0x2e4 MaxSize : 0x300 Offset : 0x54a10 Section : .text Orc Section : .local.text.pardump LSDA : 0x0 IsSimple : 1 IsMultiEntry: 0 IsSplit : 0 BB Count : 24 CFI Instrs : 34 } DWARF CFI Instructions: 00000004: OpDefCfaOffset 80 00000004: OpOffset Reg29 -80 00000004: OpOffset Reg30 -72 00000010: OpOffset Reg19 -64 00000010: OpOffset Reg20 -56 00000020: OpOffset Reg21 -48 00000020: OpOffset Reg22 -40 00000020: OpOffset Reg23 -32 00000020: OpOffset Reg24 -24 00000028: OpOffset Reg25 -16 00000114: OpRememberState 00000114: OpRestore Reg30 00000114: OpRestore Reg29 00000114: OpRestore Reg25 00000114: OpRestore Reg23 00000114: OpRestore Reg24 00000114: OpRestore Reg21 00000114: OpRestore Reg22 00000114: OpRestore Reg19 00000114: OpRestore Reg20 00000114: OpDefCfaOffset 0 00000118: OpRestoreState 00000260: OpRememberState 00000260: OpRestore Reg30 00000260: OpRestore Reg29 00000260: OpRestore Reg25 00000260: OpRestore Reg23 00000260: OpRestore Reg24 00000260: OpRestore Reg21 00000260: OpRestore Reg22 00000260: OpRestore Reg19 00000260: OpRestore Reg20 00000260: OpDefCfaOffset 0 00000264: OpRestoreState End of Function "pardump" ERROR: disassembly failed - inconsistent branch found. ======================================= LLVM ERROR: pthread_join failed: Resource deadlock avoided Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 perf2bolt 0x0000000000d1c510 1 perf2bolt 0x0000000000d1a600 2 perf2bolt 0x0000000000d1a784 3 linux-vdso.so.1 0x0000fffff7ffc8dc __kernel_rt_sigreturn + 0 4 libc.so.6 0x0000fffff7a8f7a8 gsignal + 176 5 libc.so.6 0x0000fffff7a79af0 abort + 280 6 perf2bolt 0x0000000000cbbff0 7 perf2bolt 0x0000000000d23b2c 8 perf2bolt 0x0000000000d23d64 9 perf2bolt 0x0000000002002b48 10 perf2bolt 0x0000000002002da4 11 perf2bolt 0x00000000013dcf64 12 libc.so.6 0x0000fffff7a91f44 13 libc.so.6 0x0000fffff7a920c4 14 perf2bolt 0x0000000000d8a558 15 perf2bolt 0x0000000000d9422c 16 perf2bolt 0x00000000013ddac4 17 perf2bolt 0x0000000001278638 18 perf2bolt 0x0000000000def09c 19 libpthread.so.0 0x0000fffff7f988f4 20 perf2bolt 0x0000000001278d40 21 perf2bolt 0x000000000127aa6c 22 perf2bolt 0x0000000002003c10 23 perf2bolt 0x00000000020048a8 24 libpthread.so.0 0x0000fffff7f90950 25 libc.so.6 0x0000fffff7a7ce1c PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Abort (core dumped) System Details :- > cat /etc/oracle-release Oracle Linux Server release 8.6 > uname -a Linux 5.15.0-205.149.5.1.el8uek.aarch64 #2 SMP Fri Apr 5 13:37:11 PDT 2024 aarch64 aarch64 aarch64 GNU/Linux > llvm-bolt --version LLVM (http://llvm.org/): LLVM version 20.0.0git Optimized build with assertions. BOLT revision 91073380ac5a0dceebdd09f360a1dc194d7ee93f Registered Targets: aarch64 - AArch64 (little endian) aarch64_32 - AArch64 (little endian ILP32) aarch64_be - AArch64 (big endian) arm64 - ARM64 (little endian) arm64_32 - ARM64 (little endian ILP32) x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 > perf --version perf version 4.18.0-553.8.1.el8_10.aarch64 (gdb) thread apply all bt Thread 2 (Thread 0xfffff7a57010 (LWP 2001779)): #0 0x0000fffff7f96d70 in pthread_cond_wait@@GLIBC_2.17 () from /lib64/libpthread.so.0 #1 0x0000fffff7d87b08 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /lib64/libstdc++.so.6 #2 0x00000000020034d0 in llvm::StdThreadPool::wait() () #3 0x00000000013de8c4 in llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, unsigned int) () #4 0x0000000000d9fa54 in llvm::bolt::RewriteInstance::buildFunctionsCFG() () #5 0x0000000000dd3738 in llvm::bolt::RewriteInstance::run() () #6 0x00000000004077a0 in main () Thread 1 (Thread 0xfffff6774190 (LWP 2001791)): #0 0x0000fffff7a8f7a8 in raise () from /lib64/libc.so.6 #1 0x0000fffff7a79ba8 in abort () from /lib64/libc.so.6 #2 0x0000000000cbbff0 in llvm::report_fatal_error(llvm::Twine const&, bool) () #3 0x0000000000d23b2c in ReportErrnumFatal(char const*, int) () #4 0x0000000000d23d64 in llvm::llvm_thread_join_impl(unsigned long) () #5 0x0000000002002b48 in llvm::StdThreadPool::~StdThreadPool() () #6 0x0000000002002da4 in llvm::StdThreadPool::~StdThreadPool() () #7 0x00000000013dcf64 in std::unique_ptr<llvm::StdThreadPool, std::default_delete<llvm::StdThreadPool> >::~unique_ptr() () #8 0x0000fffff7a91f44 in __run_exit_handlers () from /lib64/libc.so.6 #9 0x0000fffff7a920c4 in exit () from /lib64/libc.so.6 #10 0x0000000000d8a558 in llvm::Error llvm::handleErrorImpl<llvm::bolt::RewriteInstance::buildFunctionsCFG()::{lambda(llvm::bolt::BinaryFunction&, unsigned short)#1}::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::{lambda(llvm::bolt::BOLTError const&)#1}>(std::unique_ptr<llvm::ErrorInfoBase, std::default_delete<llvm::Error> >, llvm::bolt::RewriteInstance::buildFunctionsCFG()::{lambda(llvm::bolt::BinaryFunction&, unsigned short)#1}::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::{lambda(llvm::bolt::BOLTError const&)#1}&&) () #11 0x0000000000d9422c in std::_Function_handler<void (llvm::bolt::BinaryFunction&, unsigned short), llvm::bolt::RewriteInstance::buildFunctionsCFG()::{lambda(llvm::bolt::BinaryFunction&, unsigned short)#1}>::_M_invoke(std::_Any_data const&, llvm::bolt::BinaryFunction&, unsigned short&&) () #12 0x00000000013ddac4 in std::_Function_handler<void (), std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, unsigned int)::{lambda(std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction> >, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction> >, unsigned short)#1} (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction> >, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction> >, unsigned int)> >::_M_invoke(std::_Any_data const&) () #13 0x0000000001278638 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()> > >, void> >::_M_invoke(std::_Any_data const&) () #14 0x0000000000def09c in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) () #15 0x0000fffff7f988f4 in __pthread_once_slow () from /lib64/libpthread.so.0 #16 0x0000000001278d40 in std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<std::function<void ()> > >, void>::_M_complete_async() --Type <RET> for more, q to quit, c to continue without paging--c () #17 0x000000000127aa6c in std::_Function_handler<void (), llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::{lambda()#1}>::_M_invoke(std::_Any_data const&) () #18 0x0000000002003c10 in llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) () #19 0x00000000020048a8 in void* llvm::thread::ThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::{lambda()#1}> >(std::tuple<llvm::StdThreadPool::grow(int)::{lambda()#1}>) () #20 0x0000fffff7f90950 in start_thread () from /lib64/libpthread.so.0 #21 0x0000fffff7a7ce1c in thread_start () from /lib64/libc.so.6 (gdb)