llvm / llvm-project

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

core dump when doing perf2bolt #62730

Open takenliu opened 1 year ago

takenliu commented 1 year ago
$ ~/takenliu/git/llvm/build/bin/perf2bolt -p ./perf.data -o perf.fdata ./tendisplus_static 
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: x86_64
BOLT-INFO: BOLT version: 7f191e6d2c9ec4af1819c4e80a5453583cd72f08
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x1400000, offset 0x1000000
BOLT-INFO: enabling relocation mode
BOLT-INFO: static input executable detected
BOLT-INFO: enabling strict relocation mode for aggregation purposes
BOLT-WARNING: split function detected on input : _ZN12_GLOBAL__N_14pool4freeEPv.constprop.0.cold. The support is limited in relocation mode
BOLT-WARNING: sizes differ for function __pthread_cond_wait. FDE : 822; symbol table : 551. Using max size.
BOLT-WARNING: sizes differ for function pthread_cond_wait. FDE : 822; symbol table : 551. Using max size.
BOLT-INFO: using __condvar_cleanup1 as another entry to function __pthread_cond_wait(*2)
BOLT-WARNING: sizes differ for function __pthread_cond_timedwait. FDE : 989; symbol table : 704. Using max size.
BOLT-WARNING: sizes differ for function pthread_cond_timedwait. FDE : 989; symbol table : 704. Using max size.
BOLT-INFO: using __condvar_cleanup2/1 as another entry to function __pthread_cond_timedwait(*2)
BOLT-INFO: using __write_nocancel as another entry to function __write(*3)
BOLT-INFO: using __read_nocancel as another entry to function __read(*3)
BOLT-INFO: using __close_nocancel as another entry to function __close(*3)
BOLT-INFO: using __accept_nocancel as another entry to function __libc_accept(*3)
BOLT-INFO: using __connect_nocancel as another entry to function __connect(*3)
BOLT-INFO: using __recvfrom_nocancel as another entry to function __recvfrom(*3)
BOLT-INFO: using __recvmsg_nocancel as another entry to function __libc_recvmsg(*3)
BOLT-INFO: using __sendmsg_nocancel as another entry to function sendmsg(*3)
BOLT-INFO: using __sendto_nocancel as another entry to function sendto(*3)
BOLT-INFO: using __fsync_nocancel as another entry to function __libc_fsync(*2)
BOLT-INFO: using __lseek_nocancel as another entry to function __libc_lseek(*8)
BOLT-INFO: using __msync_nocancel as another entry to function __libc_msync(*2)
BOLT-INFO: using __nanosleep_nocancel as another entry to function __libc_nanosleep(*3)
BOLT-INFO: using __open_nocancel as another entry to function open(*5)
BOLT-INFO: using __pause_nocancel as another entry to function pause(*2)
BOLT-INFO: using __pread_nocancel as another entry to function __pread(*6)
BOLT-INFO: using __pwrite_nocancel as another entry to function pwrite(*6)
BOLT-INFO: using __msgrcv_nocancel as another entry to function msgrcv(*2)
BOLT-INFO: using __msgsnd_nocancel as another entry to function msgsnd(*2)
BOLT-ERROR: function __restore_rt/1 is in conflict with FDE [5e4e1f, 5e4e29). Skipping.
BOLT-INFO: using __poll_nocancel as another entry to function poll(*3)
BOLT-INFO: using __sync_file_range_nocancel as another entry to function sync_file_range
BOLT-INFO: using __fdatasync_nocancel as another entry to function fdatasync
BOLT-WARNING: sizes differ for function clone. FDE : 55; symbol table : 129. Using max size.
BOLT-WARNING: sizes differ for function __clone. FDE : 55; symbol table : 129. Using max size.
BOLT-INFO: using __epoll_wait_nocancel as another entry to function epoll_wait
BOLT-ERROR: function _dl_tlsdesc_undefweak is in conflict with FDE [e26925, e2693e). Skipping.
BOLT-ERROR: function _dl_tlsdesc_resolve_rela is in conflict with FDE [e2693e, e269af). Skipping.
BOLT-ERROR: function _dl_tlsdesc_resolve_hold is in conflict with FDE [e269af, e26a22). Skipping.
BOLT-WARNING: FDE [0xdf1015, 0xdf1051) conflicts with function clone(*2)
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCat5e4e1f. Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCate26925. Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCate2693e. Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCate269af. Skipping.
BOLT-WARNING: Failed to analyze 18 relocations
BOLT-INFO: pre-processing profile using perf data aggregator
BOLT-WARNING: build-id will not be checked because we could not read one from input binary
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 64 samples and 1753 LBR entries
PERF2BOLT: 0 samples (0.0%) were ignored
PERF2BOLT: traces mismatching disassembled function contents: 10 (0.6%)
PERF2BOLT: out of range traces involving unknown regions: 0 (0.0%)
PERF2BOLT: waiting for perf mem events collection to finish...
BOLT-WARNING: unable to disassemble instruction at offset 0x7e (address 0xe251ce) in function _dl_runtime_profile_avx512
BOLT-WARNING: unable to disassemble instruction at offset 0x7e (address 0xe2564e) in function _dl_runtime_profile_avx
BOLT-WARNING: unable to disassemble instruction at offset 0x7e (address 0xe25ace) in function _dl_runtime_profile_sse
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function _ZL28read_encoded_value_with_basehmPKhPm/1(*2)
perf2bolt: /home/mysql/takenliu/git/llvm/llvm-project/bolt/include/bolt/Core/BinaryFunction.h:1585: void llvm::bolt::BinaryFunction::addCFIInstruction(uint64_t, llvm::MCCFIInstruction&&): Assertion `I->first == Offset && "CFI pointing to unknown instruction"' failed.
 #0 0x000055cbff21561e llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/mysql/takenliu/git/llvm/build/bin/perf2bolt+0xc5461e)
 #1 0x000055cbff2130ab llvm::sys::RunSignalHandlers() (/home/mysql/takenliu/git/llvm/build/bin/perf2bolt+0xc520ab)
 #2 0x000055cbff2131ed SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f7b48bab630 __restore_rt sigaction.c:0:0
 #4 0x00007f7b47cb6387 raise (/usr/lib64/libc.so.6+0x36387)
 #5 0x00007f7b47cb7a78 abort (/usr/lib64/libc.so.6+0x37a78)
 #6 0x00007f7b47caf1a6 __assert_fail_base (/usr/lib64/libc.so.6+0x2f1a6)
 #7 0x00007f7b47caf252 (/usr/lib64/libc.so.6+0x2f252)
 #8 0x000055cc003b48c3 (/home/mysql/takenliu/git/llvm/build/bin/perf2bolt+0x1df38c3)
 #9 0x000055cc003b49c4 llvm::bolt::CFIReaderWriter::fillCFIInfoFor(llvm::bolt::BinaryFunction&) const::'lambda'(llvm::dwarf::CFIProgram::Instruction const&)::operator()(llvm::dwarf::CFIProgram::Instruction const&) const Exceptions.cpp:0:0
#10 0x000055cc003b5708 llvm::bolt::CFIReaderWriter::fillCFIInfoFor(llvm::bolt::BinaryFunction&) const (/home/mysql/takenliu/git/llvm/build/bin/perf2bolt+0x1df4708)
#11 0x000055cbff29c8cc llvm::bolt::RewriteInstance::disassembleFunctions() (/home/mysql/takenliu/git/llvm/build/bin/perf2bolt+0xcdb8cc)
#12 0x000055cbff2d71c4 llvm::bolt::RewriteInstance::run() (/home/mysql/takenliu/git/llvm/build/bin/perf2bolt+0xd161c4)
#13 0x000055cbfe836d2e main (/home/mysql/takenliu/git/llvm/build/bin/perf2bolt+0x275d2e)
#14 0x00007f7b47ca2555 __libc_start_main (/usr/lib64/libc.so.6+0x22555)
#15 0x000055cbfe8c4dd3 _start (/home/mysql/takenliu/git/llvm/build/bin/perf2bolt+0x303dd3)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/mysql/takenliu/git/llvm/build/bin/perf2bolt -p ./perf.data -o perf.fdata ./tendisplus_static
Aborted (core dumped)
llvmbot commented 1 year ago

@llvm/issue-subscribers-bolt