Bug 300901 - Systemtap translator's missing deref_fault labels
Summary: Systemtap translator's missing deref_fault labels
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: systemtap
Version: rawhide
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Frank Ch. Eigler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-21 17:58 UTC by Jan Kratochvil
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-25 03:04:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Kratochvil 2007-09-21 17:58:07 UTC
Description of problem:
Just tried to trace wait4(2) but with no luck.

Version-Release number of selected component (if applicable):
systemtap-0.5.14-1.fc8.x86_64
kernel-2.6.23-0.189.rc6.git8.fc8.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. echo 'probe syscall.wait4 {}' >./wait4.stp;stap -u ./wait4.stp

Actual results:
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.

Expected results:
Started tracing.

Additional info:
/tmp/stapq4rMQR/stap_....c: In function 'function__struct_timeval':
/tmp/stapq4rMQR/stap_....c:1382: error: label 'deref_fault' used but not defined 
/tmp/stapq4rMQR/stap_....c: In function 'function__struct_timespec':
/tmp/stapq4rMQR/stap_....c:1568: error: label 'deref_fault' used but not defined 
cc1: warnings being treated as errors
/tmp/stapq4rMQR/stap_....c: In function 'function__struct_itimerval':
/tmp/stapq4rMQR/stap_....c:1686: warning: initialization from incompatible
pointer type
/tmp/stapq4rMQR/stap_....c:1692: error: label 'deref_fault' used but not defined

Comment 1 William Cohen 2007-09-21 18:52:07 UTC
The actual problem is a orthogonal to the instrumentation of the syscall.wait4.
You should be able to run without the "-u" option:

echo 'probe syscall.wait4 {}' >./wait4.stp;stap ./wait4.stp


The "-u" option for systemtap avoids optimizing out code, so all generated code
is left in. The kread macro in systemtap_write/src/runtime/loc2c-runtime.h uses
the macro deref, which refers to macro DEREF_FAULT which has the offending
reference to the label deref_fault.  The translator is not including the needed
labels in the generated functions.





Comment 2 Frank Ch. Eigler 2007-09-24 13:34:15 UTC
The problem is that several embedded-C functions use kread() but
do not have the necessary CATCH_DEREF_FAULT at the bottom.  Real bug.

Comment 3 Frank Ch. Eigler 2007-09-25 03:04:33 UTC
fixed.


Note You need to log in before you can comment on or make changes to this bug.