Bug 1005301 - process probes do not parse
process probes do not parse
Product: Fedora
Classification: Fedora
Component: systemtap (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Frank Ch. Eigler
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-09-06 11:45 EDT by Andi Kleen
Modified: 2013-09-06 12:48 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-06 12:42:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andi Kleen 2013-09-06 11:45:45 EDT
Description of problem:

#include <sys/sdt.h>

        DTRACE_PROBE2(test, main, 1, 2);

gcc -g -o tprobe tprobe.c

probe process("tprobe").mark("test") { 

$ sudo stap tprobe.stp 
semantic error: while resolving probe point: identifier 'process' at tprobe.stp:2:7
        source: probe process("tprobe").mark("test") { 

semantic error: no match
Pass 2: analysis failed.  [man error::pass2]

Version-Release number of selected component (if applicable):
kernel  3.10.10-200.fc19.x86_64 
How reproducible:


Steps to Reproduce:
1. see above

Actual results:
See above

Expected results:

Parse the file, probe the probe.

Additional info:
Comment 1 Frank Ch. Eigler 2013-09-06 12:01:13 EDT
Hi, Andi.  This just works for me on f19, with same stap version,
but a somewhat earlier kernel (3.10.5).  Can you try ...

% readelf -n tprobe
% stap --vp 03 -L 'process("tprobe").mark("*")'
Comment 2 Lukas Berk 2013-09-06 12:03:52 EDT
I think actual error here is that the .mark parameter should be .mark("main").  The 'test' parameter is what's referred to as the provider.

More information can be found at https://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps

an alternative probe point could also be process("tprobe").provider("test").mark("main"){...}
Comment 3 Frank Ch. Eigler 2013-09-06 12:05:01 EDT
Good eyes, Lukas.
Comment 4 Andi Kleen 2013-09-06 12:42:28 EDT
Ok I tracked it down. It seems to be related to stap not seeing the binary (plus the typo)

Perhaps the documentation should be clearer on this.

For example if I specify an absolute path, does it always match the same binary even when called non absolute? I presume it does because it's matching on the inode.
Comment 5 Frank Ch. Eigler 2013-09-06 12:48:05 EDT
The stapprobes man page includes this:

> Note that for all process probes, PATH names refer to executables
> that are searched the same way shells do: relative to the working
> directory if they contain a "/" character, otherwise in $PATH.
> [...]

The runtime will indeed match things absolutely, not just by inode but
via elf build-ids.

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