stap is getting a segmentation fault on RHEL 5.1 bets

David Wilder dwilder@us.ibm.com
Wed Oct 3 18:03:00 GMT 2007


Frank Ch. Eigler wrote:
> dwilder wrote:
> 
>> [...] To recap my problem is that stap is getting a segmentation
>> fault on s390, RHEL5.1 beta.  This happens anytime I attempting to
>> probe modules.
> 
> OK.
> 
>> Adding the -g flag did not add much more to the backtrace.  So I did
>> a little brute force troubleshooting.  What I found is that
>> dwarf_diename() is returning a bad pointer causing the segmentation
>> fault.
> 
> It could be an elfutils bug.
> 
>> [...]  Any ideas?  I am going to try building new debug info files
>> and see if it helps.
> 
> You could also try elfutils 0.129.
> 
> - FChE

The problem only occurs when using the debuginfo files built from the 
kernel src.rpm.  Here is what I did.  Installed and built all the kernel 
rpms from kernel-2.6.18-48.el5.src.rpm (rpmbuild -ba).  Installed the 
debug kernel and the associated debuginfo and kernel devel rpms.  (note 
I chose the debug kernel but the problem happens on the non-debug kernel 
also.)

I ran stap probing a function in the qdio module, stap faulted!
I replace the qdio.ko.debug file in /usr/lib/debug...  with the
qdio.ko file left over in the rpm build directory 
(/usr/src/redhat/BUILD/kernel...).

Now when I run my stap scrip it works fine.  It looks like the rpm build 
is doing something to the debuginfo files.  The sizes are slightly 
different, but not as small as the running module in /lib/modules.

ls -l qdio*
-rw-r--r-- 1 root root 1373490 Oct  3 10:27 qdio.ko.debug
-rwxr--r-- 1 root root 1199376 Oct  2 20:56 qdio.ko.debug.orig

file qdio*
qdio.ko.debug:      ELF 64-bit MSB relocatable, IBM S/390, version 1 
(SYSV), not stripped
qdio.ko.debug.orig: ELF 64-bit MSB relocatable, IBM S/390, version 1 
(SYSV), not stripped

Any idea what rpmbuild could be doing to the debuginfo files?
I looked through the kernel.spec file and found no clues, but I am 
unfamiliar with rpm spec files, so I may have missed something.

I have not tried upgrading elfutils yet as you suggested.





More information about the Systemtap mailing list