Bug 11429 - stap on RHEL 5.5: multiple debuginfo problems
Summary: stap on RHEL 5.5: multiple debuginfo problems
Status: RESOLVED INVALID
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-24 23:42 UTC by Jim Keniston
Modified: 2010-03-25 17:18 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Keniston 2010-03-24 23:42:05 UTC
I'm reporting this on behalf of Roger Mach, a new stap user.  Any help would be
appreciated.

Subject: resend of system tap issue
From: Roger Mach <bigmach@us.ibm.com>
To: jkenisto@us.ibm.com
Date: Wed, 24 Mar 2010 16:17:33 -0700
...
I installed RHEL 5.5 rc2 on a lab machine, and then installed the
following packages (following the instructions in the System Tap
Beginner's Guide):

systemtap-1.1-3.el5
systemtap-runtime-1.1-3.el5
kernel-devel-2.6.18-194.el5.x86_64.rpm

I was unable to locate the kernel-debuginfo and kernel-debuginfo-common
rpms, so I installed kernel-2.6.18-194.el5.src.rpm and did an 'rpmbuild
-bb' to generate them, which I then installed:

kernel-debuginfo-2.6.18-194.el5.x86_64.rpm
kernel-debuginfo-common-2.6.18-194.el5.x86_64.rpm

At that point I was able to run the initial testing command suggested in
section 2.1.3 of the Beginner's Guide and it worked.

I then attempted to set a probe on a function in a kernel module:

stap -v -e 'probe
module("ipmi_watchdog").function("ipmi_wdog_pretimeout_handler").call
{printf("ipmi_wdog_pretimeout_handler called\n"); exit()}'

But I got this error:

WARNING: cannot find module ipmi_watchdog debuginfo: No DWARF
information found

By running stap under strace I noticed that it was looking for
the .debug files in /lib/modules/<kernel version>/kernel/... and I
determined that my kernel-debuginfo* packages had installed them
under /usr/lib/debug/lib/modules/<kernel version>/kernel/... so I worked
around that issue by creating symlinks for each .debug file (1260 of
them!) in /lib/modules pointing to the actual file
in /usr/lib/debug/lib/modules.  So that is potential bug #1, that
the .debug files weren't in the expected place.

Now, even though the .debug files are being found by stap, I still get
the same "No DWARF information found" error.  There are still a handful
of files not found, including:

/lib/modules/2.6.18-194.el5/kernel/drivers/char/ipmi/.debug/ipmi_watchdog.ko.debug
/lib/modules/2.6.18-194.el5/kernel/drivers/char/ipmi/build/ipmi_watchdog.ko.debug

If I change my command to use kprobe.module instead, everything appears
to work properly:

stap -e 'probe
kprobe.module("ipmi_watchdog").function("ipmi_wdog_pretimeout_handler")
{printf("ipmi_wdog_pretimeout_handler called\n"); exit()}'

So this is problem #2, that symbols from modules don't appear to be
available even though system tap is able to locate at least some of the
the .debug files.
Comment 1 Frank Ch. Eigler 2010-03-24 23:56:58 UTC
The problem may be that the debuginfo files associated with this build
do not match those with the RH-provided kernel/module image.  If you 
build your own kernel, you must go whole-hog and not mix half-previous
half-new object files.

Try building and installing all the resulting pieces from a rpmbuild -ba,
not just -debuginfo; then things will work.
Comment 2 Jim Keniston 2010-03-25 17:18:37 UTC
Roger says: "Yup, that fixed it.  I guess I should have thought to try that. 
Sorry for the false alarm."

Thanks.  Closing this as INVALID.