Bug 1279030

Summary: perf fails to access debug symbols for kernel modules
Product: [Fedora] Fedora Reporter: Lorenzo Pistone <blaffablaffa>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 22CC: blaffablaffa, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 19:59:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
strace output of perf none

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.