From nobody@FreeBSD.org  Sat Mar  3 01:30:52 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 423B8106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  3 Mar 2012 01:30:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 182188FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  3 Mar 2012 01:30:52 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q231UpWq092165
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 3 Mar 2012 01:30:51 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q231UpFJ092140;
	Sat, 3 Mar 2012 01:30:51 GMT
	(envelope-from nobody)
Message-Id: <201203030130.q231UpFJ092140@red.freebsd.org>
Date: Sat, 3 Mar 2012 01:30:51 GMT
From: Yuri <yuri@tsoft.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: drtrace finds the syntax error in /usr/lib/dtrace/psinfo.d: syntax error near "uid_t"
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         165644
>Category:       kern
>Synopsis:       [dtrace] dtrace finds the syntax error in /usr/lib/dtrace/psinfo.d: syntax error near "uid_t"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 03 01:40:07 UTC 2012
>Closed-Date:    Sun Mar 04 02:36:58 UTC 2012
>Last-Modified:  Sun Mar  4 19:40:14 UTC 2012
>Originator:     Yuri
>Release:        9.0
>Organization:
n/a
>Environment:
>Description:
Running this script:
dtrace -n 'proc:::signal-send /pid/ { printf("%s -%d %d",execname,args[2],args[1]->pr_pid); }'

I get this error:
dtrace: invalid probe specifier proc:::signal-send /pid/ { printf("%s -%d %d",execname,args[2],args[1]->pr_pid); }: "/usr/lib/dtrace/psinfo.d", line 37: syntax error near "uid_t"

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Andriy Gapon <avg@FreeBSD.org>
To: bug-followup@FreeBSD.org, yuri@tsoft.com
Cc:  
Subject: Re: misc/165644: drtrace finds the syntax error in /usr/lib/dtrace/psinfo.d:
 syntax error near &quot;uid_t&quot;
Date: Sat, 03 Mar 2012 10:34:28 +0200

 There is no syntax error.
 In this cryptic way dtrace says that there is no dtrace support in your kernel.
 
 -- 
 Andriy Gapon

From: Yuri <yuri@rawbw.com>
To: Andriy Gapon <avg@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/165644: drtrace finds the syntax error in /usr/lib/dtrace/psinfo.d:
 syntax error near &quot;uid_t&quot;
Date: Sat, 03 Mar 2012 01:33:13 -0800

 On 03/03/2012 00:34, Andriy Gapon wrote:
 > There is no syntax error.
 > In this cryptic way dtrace says that there is no dtrace support in your kernel.
 
 In the case of lack of DTrace support the error is different:
 $ dtrace: failed to initialize dtrace: DTrace device not available on system
 
 Yuri

From: Andriy Gapon <avg@FreeBSD.org>
To: bug-followup@FreeBSD.org, yuri@tsoft.com
Cc:  
Subject: Re: misc/165644: drtrace finds the syntax error in /usr/lib/dtrace/psinfo.d:
 syntax error near &quot;uid_t&quot;
Date: Sat, 03 Mar 2012 12:39:52 +0200

 The message you quoted appears when dtrace module is not loaded.  I talked about
 the case where your kernel is not compiled to support DTrace.
 
 -- 
 Andriy Gapon
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Mar 4 02:36:15 UTC 2012 
State-Changed-Why:  
please compile dtrace into your kernel and let us know if the problem 
persists. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165644 

From: Andriy Gapon <avg@FreeBSD.org>
To: bug-followup@FreeBSD.org, yuri@tsoft.com
Cc:  
Subject: Re: kern/165644: [dtrace] dtrace finds the syntax error in /usr/lib/dtrace/psinfo.d:
 syntax error near &quot;uid_t&quot;
Date: Sun, 04 Mar 2012 14:19:47 +0200

 The last advice is not completely accurate.
 It should rather be to follow the instructions here
 http://www.freebsd.org/doc/handbook/dtrace-enable.html to the latter.  Main
 thing is to not forget WITH_CTF=1 bit.  Also it seems that it is required that
 the kernel is built with debug support (-g flag).
 
 -- 
 Andriy Gapon

From: Yuri <yuri@rawbw.com>
To: Andriy Gapon <avg@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/165644: [dtrace] dtrace finds the syntax error in /usr/lib/dtrace/psinfo.d:
 syntax error near &quot;uid_t&quot;
Date: Sun, 04 Mar 2012 09:12:12 -0800

 On 03/04/2012 04:19, Andriy Gapon wrote:
 > The last advice is not completely accurate.
 > It should rather be to follow the instructions here
 > http://www.freebsd.org/doc/handbook/dtrace-enable.html to the latter.  Main
 > thing is to not forget WITH_CTF=1 bit.  Also it seems that it is required that
 > the kernel is built with debug support (-g flag).
 >
 
 Thanks,
 
 WITH_CTF=1 is what was missing. Now DTrace works fine.
 Maybe it's a good idea to error out with a meaningful message when some 
 required bit for DTrace is missing?
 
 Yuri
 

From: Andriy Gapon <avg@FreeBSD.org>
To: Yuri <yuri@rawbw.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/165644: [dtrace] dtrace finds the syntax error in /usr/lib/dtrace/psinfo.d:
 syntax error near &quot;uid_t&quot;
Date: Sun, 04 Mar 2012 21:39:37 +0200

 on 04/03/2012 19:12 Yuri said the following:
 > On 03/04/2012 04:19, Andriy Gapon wrote:
 >> The last advice is not completely accurate.
 >> It should rather be to follow the instructions here
 >> http://www.freebsd.org/doc/handbook/dtrace-enable.html to the latter.  Main
 >> thing is to not forget WITH_CTF=1 bit.  Also it seems that it is required that
 >> the kernel is built with debug support (-g flag).
 >>
 > 
 > Thanks,
 > 
 > WITH_CTF=1 is what was missing. Now DTrace works fine.
 > Maybe it's a good idea to error out with a meaningful message when some required
 > bit for DTrace is missing?
 
 It's definitely a good idea.  Unfortunately, nobody has come up with a solution
 so far.  If you have any patches or practical ideas - they are definitely welcome.
 ??
 -- 
 Andriy Gapon
>Unformatted:
