Unable to retrieve pthread mutex symbols

David Carter dcarter@davidcarter.ca
Thu May 28 15:13:00 GMT 2009


This is a continuation of the discussion that happened in response to  
my blog posting. I'll summarize, but for the full discussion refer to http://davidcarterca.wordpress.com/2009/05/27/systemtap/#comments

Basically, I'm trying to debug mutex use in my program. I use the  
pthreads version, which in turn uses futexes. Using the attached  
systemtap script, I get the addresses of the futexes under contention,  
but not the symbols associated with them. This makes debugging  
difficult.

There are a few steps involved in setting up the test.

1. Using either FC10 or FC11, install the arm4 and arm4-devel  
packages. These don't have SELinux support yet, so you'll either have  
to disable it or make it permissive.

2. Add your user to the arm4 group

  # usermod -a -G arm4 username

You'll have to log out and log in again for this to take effect.

3. Start the arm4 service

4. Compile the arm4 sample program

  $ cc -o arm4test_hello_throughput arm4test_hello_throughput.c -larm4

5. Run the systemtap script while running the arm4 sample program. I  
recommend starting the systemtap script before starting the sample.  
The sample has an infinite loop so stop it after 30 seconds or so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm4test_hello_throughput.c
Type: application/octet-stream
Size: 1930 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20090528/42446d7d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: futexes.stp
Type: application/octet-stream
Size: 1159 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20090528/42446d7d/attachment-0001.obj>
-------------- next part --------------



The output I get shows the hex addresses of the futexes rather than  
the symbols. This makes it difficult to debug.

- Dave

----
Custom Software Solutions
http://www.davidcarter.ca
http://davidcarterca.wordpress.com





More information about the Systemtap mailing list