Troubles with debug info, using systemtap on debian.

James Y Knight foom@fuhm.net
Tue Nov 10 18:38:00 GMT 2009


On Nov 10, 2009, at 4:32 AM, Eugeniy Meshcheryakov wrote:
>> probe module("autofs4").function("autofs4_fill_super") {}
> I never saw systemtap segfaulting. I do not have autofs4 module, but i
> tried with snd module and it works. What version of
> systemtap/libelf1/libdw1 do you use?

After seeing the segfaults, I compiled both systemtap and elfutils  
from latest git head, as of yesterday. Same segfaults. Before that, I  
was using:
systemtap 1.0-2
libelf/etc 0.143-1

The segfaults only occur if the installed module is stripped of debug  
data (which it usually is), and if the debug data itself is stripped  
of code. That is the case with the files debian's kernel-package  
installs into /usr/lib/debug/*.ko, but I'm led to believe is not the  
case with the files that Fedora installs into /usr/lib/debug/*.ko.debug.

Unless something *further* strange is going on in my environment,  
anyone should be able to reproduce by:
1) removing the symlink to your kernel build dir (rm /lib/modules/ 
$VERS/build): renaming is not enough, systemtap still finds it!
2) ensuring that the debug info in /usr/lib/debug is stripped of code  
with objcopy --only-keep-debug.
3) ensuring the kernel modules in /lib/modules/$VERS are stripped of  
debug info.

I'd certainly be interested if people can't reproduce this, so I can  
look further to try to figure out what else might be a triggering  
factor...

>> 3) The debian kernel's debuginfo does "objcopy --only-keep-
>> debug"...That seems like it shouldn't cause systemtap to blow up,
>> but it does. I guess that's a known bug?
> No it is not. At least not for me.

When I was discussing this on IRC "przemoc86" mentioned that debuginfo  
stripped of code might not be currently supported. In any case, a  
segfault seems poor, whether or not it's supposed to be supported. :)

James



More information about the Systemtap mailing list