Bug 1963865 - perf script gives lots of "BFD: DWARF error"
Summary: perf script gives lots of "BFD: DWARF error"
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel-tools
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Justin M. Forbes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-24 09:26 UTC by Richard W.M. Jones
Modified: 2022-12-13 15:23 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-13 15:23:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2021-05-24 09:26:31 UTC
Description of problem:

# perf record -a -g --call-graph=dwarf -- nbdkit -U - sparse-random size=1T --run 'nbdcopy "$uri" "$uri"'
# perf script > out.perf
BFD: DWARF error: invalid abstract instance DIE ref
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: could not find abbrev number 127
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: could not find abbrev number 708
BFD: DWARF error: mangled line number section (bad file number)
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: offset (823271579) greater than or equal to .debug_str size (58644)
BFD: DWARF error: could not find abbrev number 114
BFD: DWARF error: offset (10592310) greater than or equal to .debug_str size (58644)
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: info pointer extends beyond end of attributes
BFD: DWARF error: offset (91691187) greater than or equal to .debug_str size (58644)
BFD: DWARF error: offset (805306373) greater than or equal to .debug_str size (43389)
BFD: DWARF error: mangled line number section (bad file number)
BFD: DWARF error: could not find abbrev number 336
[etc]

Version-Release number of selected component (if applicable):

perf-5.13.0-0.rc2.git0.1.fc35.x86_64
nbdkit-debuginfo-1.25.7-1.fc35.x86_64
libnbd-debuginfo-1.7.11-1.fc35.x86_64

How reproducible:

100%

Steps to Reproduce:
1. See above

Additional info:

Something to do with DWARF5 debugging information?

Comment 1 Richard W.M. Jones 2021-05-24 09:36:14 UTC
An even simpler reproducer:

# perf record -a -g --call-graph=dwarf -- nbdkit --version
# perf script > out.perf
detected invalid bpf_prog_info
BFD: DWARF error: offset (4722738) greater than or equal to .debug_str size (6255)
BFD: DWARF error: could not find abbrev number 80
BFD: DWARF error: offset (18444) greater than or equal to .debug_str size (6255)
BFD: DWARF error: offset (9247694) greater than or equal to .debug_str size (6255)
BFD: DWARF error: invalid abstract instance DIE ref
BFD: DWARF error: offset (21564085) greater than or equal to .debug_str size (160981)
BFD: DWARF error: offset (2165245130) greater than or equal to .debug_str size (160981)
BFD: DWARF error: offset (395643904) greater than or equal to .debug_str size (160981)
BFD: DWARF error: offset (51249821) greater than or equal to .debug_str size (160981)
BFD: DWARF error: offset (386400256) greater than or equal to .debug_str size (160981)
BFD: DWARF error: could not find abbrev number 287
[etc for pages and pages]

Comment 2 Richard W.M. Jones 2021-05-24 09:42:07 UTC
Possibly this linker bug which would lead to corrupted dwarf5 info?
https://sourceware.org/bugzilla/show_bug.cgi?id=27587

Comment 3 Richard W.M. Jones 2021-05-24 09:58:14 UTC
Also happens in Fedora 34 with:

perf-5.12.5-300.fc34.x86_64
nbdkit-1.25.7-1.fc34.x86_64
nbdkit-debuginfo-1.25.7-1.fc34.x86_64
libnbd-1.7.9-1.fc34.x86_64
libnbd-debuginfo-1.7.9-1.fc34.x86_64

Comment 4 Justin M. Forbes 2021-05-24 15:01:17 UTC
It is more likely that perf is expecting dwarf5 and we switched back to dwarf4 because crash doesn't support dwarf5 yet.  Let me see what I can find.  We flipped CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT sometime between rc1 and rc2.

Comment 5 Justin M. Forbes 2021-05-24 16:17:31 UTC
Sorry, was reading that wrong. Likely not what I mentioned above. Looking at binutils, that patch is not included in any builds for rawhide or fc34, so it is possible that is the cause.

Comment 6 Richard W.M. Jones 2021-05-25 17:35:31 UTC
I filed this bug yesterday and I thought at the time that perf script was
failing to produce any output at all.  (The messages look a lot like errors,
so I didn't bother to check the output.)

It turns out that perf script does in fact work to a large extent despite
all of these messages.  There are some mangled symbols which appear as
"??", but by and large perf is producing enough output to still produce
meaningful flamegraphs etc.

So it's not a total failure to read DWARF5, but some kind of corner case
either in one library we're using or in a small subset of DWARF5 data.

Comment 7 Ben Cotton 2021-08-10 13:03:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 8 Ben Cotton 2022-11-29 16:57:46 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 9 Ben Cotton 2022-12-13 15:23:48 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.