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
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.
The problem is that several embedded-C functions use kread() but do not have the necessary CATCH_DEREF_FAULT at the bottom. Real bug.
fixed.