systemtap fails to discover installed debug modules
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Ubuntu |
Fix Released
|
High
|
John Rigby | ||
linux (Ubuntu) |
Fix Released
|
Medium
|
Chris J Arges | ||
Precise |
Fix Released
|
Medium
|
Chris J Arges | ||
Quantal |
Fix Released
|
Medium
|
Chris J Arges | ||
linux-2.6 (Debian) |
Fix Released
|
Unknown
|
Bug Description
== Precise SRU Justification ==
Impact: When using systemtap with Ubuntu kernels, the proper debug modules cannot be automatically discovered.
== Fix ==
This fix allows for the build system to insert the .gnu_debuglink sections in the .ko files pointing to the full unstripped .ko in /usr/lib/debug/.. in the dbgsym ddebs. In addition there are checks to ensure the debug symbol actually exists before creating the .gnu_debuglink section.
== Testcase ==
1) Install systemtap.
2) Run "stap -l 'module(
3) This should show list all the probe points for that module.
--
Binary package hint: systemtap
Even if the proper debug symbols are installed:
# stap -l 'kernel.
will succeed
and this will fail.
# stap -l 'module(
Now there's no shortage of blogs and wikis on how to work
around this but no one has seemingly ever investigated the root
cause. If one were to run this through strace you would find
the following.
open("/
open("/
open("/
open("/
open("/
Note that the path is correct, it's the name of the KO that stap is expecting that is wrong,
Kernel debug symbols provided by Ubuntu are unstripped yet maintain the .ko extension,
systemtap (actually libelf/elfutils) is expecting the filename to be module.ko.debug.
After discussing this on #systemtap on Freenode, the following script was proposed to
generate a symlink tree, by build id, in /usr/lib/debug, with the proper extension. This
completely solves the issue, and is also of benefit to things like gdb and oprofile.
#!/bin/sh
for file in `find /usr/lib/debug -name '*.ko' -print`
do
dir=`echo $buildid | cut -c1-2`
fn=`echo $buildid | cut -c3-`
mkdir -p /usr/lib/
ln -s $file /usr/lib/
ln -s $file /usr/lib/
done
If we could integrate this into the ddeb postinstall script, the problem would
be solved.
Changed in linux-2.6 (Debian): | |
status: | Unknown → Fix Released |
Changed in linaro-ubuntu: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → John Rigby (jcrigby) |
milestone: | none → 11.09 |
Changed in linux (Ubuntu): | |
assignee: | nobody → Chris J Arges (christopherarges) |
Changed in linux (Ubuntu): | |
assignee: | Chris J Arges (christopherarges) → Tim Gardner (timg-tpi) |
Changed in linux (Ubuntu): | |
assignee: | Tim Gardner (timg-tpi) → Chris J Arges (christopherarges) |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
description: | updated |
Changed in linux (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Quantal): | |
status: | In Progress → Fix Committed |
no longer affects: | linux (Ubuntu Lucid) |
eu-readelf is provided by elfutils and is required to run the attached script.