Bug 300901 - Systemtap translator's missing deref_fault labels
Systemtap translator's missing deref_fault labels
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: systemtap (Show other bugs)
rawhide
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Frank Ch. Eigler
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-21 13:58 EDT by Jan Kratochvil
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-24 23:04:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Kratochvil 2007-09-21 13:58:07 EDT
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 14:52:07 EDT
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 09:34:15 EDT
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-24 23:04:33 EDT
fixed.

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