Bug 190493 - [dtrace] failed to resolve cwd: Unknown variable name
Summary: [dtrace] failed to resolve cwd: Unknown variable name
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-02 07:55 UTC by xaionaro
Modified: 2023-01-06 16:33 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xaionaro 2014-06-02 07:55:12 UTC
dtrace doesn't work as described on page [1].

[1] http://docs.oracle.com/cd/E18752_01/html/819-5488/gcfpz.html

Moreover official examples on "/usr/share" doesn't work as well:

[root@freebsd10 ~]# /usr/share/dtrace/toolkit/opensnoop -c 2>&1 | tail -1
: in action list: failed to resolve cwd: Unknown variable name

It's required a way to find out absolute paths of syscalls like "open". The only way I see is to concatenate relative paths with "cwd", but variable "cwd" doesn't work in FreeBSD.

Environment:
root@freebsd10:~ # uname -a
FreeBSD freebsd10.imperium.mephi.ru 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

root@freebsd9:~ # uname -a
FreeBSD freebsd9 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

How-To-Repeat:
/usr/share/dtrace/toolkit/opensnoop -c
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2014-10-04 19:48:03 UTC
This is a known problem, discussed a bit here: https://lists.freebsd.org/pipermail/freebsd-dtrace/2014-June/000219.html

In short, it's probably not straightforward to implement.