Bug 1279030 - perf fails to access debug symbols for kernel modules
Summary: perf fails to access debug symbols for kernel modules
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 22
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-07 10:13 UTC by Lorenzo Pistone
Modified: 2016-07-19 19:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 19:59:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
strace output of perf (501.04 KB, application/x-gzip)
2015-11-10 18:50 UTC, Lorenzo Pistone
no flags Details

Description Lorenzo Pistone 2015-11-07 10:13:30 UTC
Description of problem:
It appears that perf fails to load any symbol from loadable kernel modules, because a nonsensical path "./[modulename]" is tried.

How reproducible:
Always

Steps to Reproduce:
1. strace -e open perf top -e cycles --call-graph dwarf 2>files
2. grep <modulename> files
3. watch attempts to load file "[modulename]"

Expected results:
perf should be loading debug symbols from /usr/lib/debug/usr/lib/modules/`uname -r`/kernel/modulepath/modulename.ko.debug

Additional info:
Symlinking the bad module path to the right path workarounds the issue.

Comment 1 Josh Boyer 2015-11-10 16:45:29 UTC
What version of perf?

Also, can you put a sample of the errors you are seeing here?  I don't see this problem at all.

Comment 2 Lorenzo Pistone 2015-11-10 16:50:03 UTC
4.2.5, but I've seen this happening since I started using perf (2-3 years). I see it with "perf top" so I'm not sure what kind of samples you're asking for. Here's a screenshot of it happening http://i.imgur.com/n2CXbu8.png , and strace shows only "[iptable_raw]" was probed to read debug symbols: open("[iptable_raw]", O_RDONLY)         = -1 ENOENT (No such file or directory)

Comment 3 Josh Boyer 2015-11-10 18:14:51 UTC
Can you just attach your 'files' file that you've redirected output to?  I'm still not seeing this.

Comment 4 Lorenzo Pistone 2015-11-10 18:50:39 UTC
Created attachment 1092393 [details]
strace output of perf

sudo strace perf top -e cycles:pp --call-graph dwarf 2>strace_perf

First instance of the faulty debug file resolution:
open("[tun]", O_RDONLY)                 = -1 ENOENT (No such file or directory)

Comment 5 Josh Boyer 2015-11-10 19:25:17 UTC
Do you have the corresponding kernel debuginfo packages installed?

Also, the Fedora perf was built without xz compression support and could not read the xz compressed modules we install.  It is likely worthwhile testing the 4.2.6 build once it is available.

Comment 6 Lorenzo Pistone 2015-11-10 23:07:46 UTC
Yes of course I do have the debuginfo package. Also as I said, symlinking the debug object file works, so it's not a problem of xz compression (the debug file is not compressed even).

Comment 7 Fedora End Of Life 2016-07-19 19:59:03 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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 please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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.