Description of problem: + sudo perf record --call-graph dwarf -p 657298 /home/rjones/d/libnbd/run nbdcopy nbd://localhost null: [ perf record: Woken up 2516 times to write data ] [ perf record: Captured and wrote 630.839 MB perf.data (78032 samples) ] + sudo perf script > out.perf perf: util/unwind-libdw.c:30: __find_debuginfo: Assertion `dso' failed. Version-Release number of selected component (if applicable): perf-5.11.0-1.fc35.x86_64 libdwarves1-1.20-1.fc34.x86_64 How reproducible: 100% (for me) Steps to Reproduce: 1. I cannot reproduce this except with the single perf session I am running. Core was generated by `perf script'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 49 return ret; (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 #1 0x00007fab96b838a4 in __GI_abort () at abort.c:79 #2 0x00007fab96b83789 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at assert.c:92 #3 0x00007fab96b92a16 in __GI___assert_fail ( assertion=assertion@entry=0x5645cdc1ad2d "dso", file=file@entry=0x5645cdc25089 "util/unwind-libdw.c", line=line@entry=30, function=function@entry=0x5645cdc10750 <__PRETTY_FUNCTION__.0> "__find_debuginfo") at assert.c:101 #4 0x00005645cdaba36c in __find_debuginfo (mod=<optimized out>, userdata=<optimized out>, modname=<optimized out>, base=<optimized out>, file_name=<optimized out>, debuglink_file=<optimized out>, debuglink_crc=482130406, debuginfo_file_name=0x5645d0902d88) at util/unwind-libdw.c:30 #5 __find_debuginfo (mod=<optimized out>, userdata=<optimized out>, modname=<optimized out>, base=<optimized out>, file_name=<optimized out>, debuglink_file=<optimized out>, debuglink_crc=482130406, debuginfo_file_name=0x5645d0902d88) at util/unwind-libdw.c:23 #6 0x00007fab973e1d7c in find_debuginfo.part () from /lib64/libdw.so.1 #7 0x00007fab973e2b3b in dwfl_module_getdwarf () from /lib64/libdw.so.1 #8 0x00007fab973e8eb5 in dwfl_module_dwarf_cfi () from /lib64/libdw.so.1 #9 0x00007fab973f19f1 in __libdwfl_frame_unwind () from /lib64/libdw.so.1 #10 0x00007fab973f1bd0 in dwfl_frame_pc () from /lib64/libdw.so.1 #11 0x00005645cdab9ff0 in frame_callback (state=0x5645d09029f0, arg=0x5645d065a060) at util/unwind-libdw.c:205 #12 0x00007fab973efe33 in dwfl_thread_getframes () from /lib64/libdw.so.1 #13 0x00007fab973ef93b in get_one_thread_cb () from /lib64/libdw.so.1 #14 0x00007fab973efc72 in dwfl_getthreads () from /lib64/libdw.so.1 #15 0x00007fab973f01b7 in dwfl_getthread_frames () from /lib64/libdw.so.1 #16 0x00005645cdaba514 in unwind__get_entries ( cb=cb@entry=0x5645cda1f1b0 <unwind_entry>, arg=arg@entry=0x7fab961bbc98, thread=0x5645d0663c40, data=data@entry=0x7ffd348d8410, max_stack=127, max_stack@entry=22085) at util/unwind-libdw.c:258 #17 0x00005645cda25a97 in thread__resolve_callchain_unwind ( evsel=0x5645cf78b1c0, max_stack=22085, sample=0x7ffd348d8410, cursor=0x7fab961bbc98, thread=<optimized out>) at util/machine.c:2890 #18 0x00005645cd96a14c in process_event (machine=<optimized out>, al=0x7ffd348d81e0, evsel=0x5645cf78b1c0, sample=<optimized out>, script=<optimized out>) at builtin-script.c:2007 #19 process_sample_event (machine=<optimized out>, evsel=0x5645cf78b1c0, sample=<optimized out>, event=<optimized out>, tool=<optimized out>) at builtin-script.c:2171 #20 process_sample_event (tool=<optimized out>, event=<optimized out>, sample=<optimized out>, evsel=0x5645cf78b1c0, machine=<optimized out>) at builtin-script.c:2131 #21 0x00005645cda2c1ee in perf_session__deliver_event (session=0x5645cf79ff50, event=0x7fab70b7fe10, tool=0x7ffd348d9190, file_offset=44219920) at util/session.c:1546 #22 0x00005645cda2fed1 in do_flush (show_progress=false, oe=0x5645cf7a6b00) at util/ordered-events.c:244 #23 __ordered_events__flush (oe=0x5645cf7a6b00, how=OE_FLUSH__ROUND, timestamp=<optimized out>) at util/ordered-events.c:323 #24 0x00005645cda2c5ad in perf_session__process_user_event ( session=session@entry=0x5645cf79ff50, event=event@entry=0x7fab70bf8268, file_offset=file_offset@entry=44712552) at util/session.c:1598 #25 0x00005645cda2cddb in perf_session__process_event (file_offset=44712552, event=0x7fab70bf8268, session=0x5645cf79ff50) at util/session.c:1758 #26 0x00005645cda2e6ba in reader__process_events (prog=0x7ffd348d9030, session=0x5645cf79ff50, rd=<synthetic pointer>) at util/session.c:2221 #27 __perf_session__process_events (session=0x5645cf79ff50) at util/session.c:2278 #28 perf_session__process_events (session=0x5645cf79ff50) at util/session.c:2311 #29 0x00005645cd96ece7 in __cmd_script (script=0x7ffd348d9190) at builtin-script.c:2558 #30 cmd_script (argc=<optimized out>, argv=<optimized out>) at builtin-script.c:3957 #31 0x00005645cd9cb930 in run_builtin (p=0x5645cdf67e98 <commands+408>, argc=1, argv=0x7ffd348db030) at perf.c:312 #32 0x00005645cd93715f in handle_internal_command (argv=0x7ffd348db030, argc=1) at perf.c:364 #33 run_argv (argv=<synthetic pointer>, argcp=<synthetic pointer>) at perf.c:408 #34 main (argc=1, argv=0x7ffd348db030) at perf.c:538
I found there is an upstream bug: https://bugzilla.kernel.org/show_bug.cgi?id=211801
I built this scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=62275878 with the patch from: https://www.spinics.net/lists/linux-perf-users/msg12625.html It fixes the problem for me.
This patch was included in kernel-tools-5.11.7 and newer.