NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/50485: dtrace doesn't work (fails on loading a script, psinfo.d)



The following reply was made to PR lib/50485; it has been noted by GNATS.

From: Richard PALO <richard%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/50485: dtrace doesn't work (fails on loading a script, psinfo.d)
Date: Tue, 02 Aug 2016 07:43:55 +0200

 Le 10/12/15 09:20, Ryota Ozaki a écrit :
 > The following reply was made to PR lib/50485; it has been noted by GNATS.
 > 
 > From: Ryota Ozaki <ozaki-r%netbsd.org@localhost>
 > To: Christos Zoulas <christos%zoulas.com@localhost>
 > Cc: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%netbsd.org@localhost>, lib-bug-people%netbsd.org@localhost, 
 > 	gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
 > Subject: Re: lib/50485: dtrace doesn't work (fails on loading a script, psinfo.d)
 > Date: Thu, 10 Dec 2015 17:13:57 +0900
 > 
 >  On Sat, Nov 28, 2015 at 10:21 PM, Christos Zoulas <christos%zoulas.com@localhost> wrote:
 >  > On Nov 28,  9:45am, ozaki-r%netbsd.org@localhost (ozaki-r%netbsd.org@localhost) wrote:
 >  > -- Subject: lib/50485: dtrace doesn't work (fails on loading a script, psinfo
 >  >
 >  > | >Number:         50485
 >  > | >Category:       lib
 >  > | >Synopsis:       dtrace doesn't work (fails on loading a script, psinfo.d)
 >  > | >Confidential:   no
 >  > | >Severity:       serious
 >  > | >Priority:       medium
 >  > | >Responsible:    lib-bug-people
 >  > | >State:          open
 >  > | >Class:          sw-bug
 >  > | >Submitter-Id:   net
 >  > | >Arrival-Date:   Sat Nov 28 09:45:00 +0000 2015
 >  > | >Originator:     Ryota Ozaki
 >  > | >Release:        NetBSD-current
 >  > | >Organization:
 >  > | >Environment:
 >  > | NetBSD kvm 7.99.22 NetBSD 7.99.22 (KVM) #876: Sat Nov 28 18:22:04 JST 2015  ozaki-r@rangeley:(hidden) amd64
 >  > | >Description:
 >  > | dtrace(1M) fails with the following error:
 >  > |
 >  > |   # dtrace -n BEGIN
 >  > |   dtrace: invalid probe specifier BEGIN: "/usr/lib/dtrace/psinfo.d", line 46: syntax error near "u_int"
 >  > |
 >  > | psinfo.d seems to contain syntax error(s). If I remove the file and try again, it works fine.
 >  > | >How-To-Repeat:
 >  > | modload dtrace
 >  > | dtrace -n BEGIN
 >  >
 >  > You need to build a kernel with CTF support.
 >  
 >  (Forgot to reply. Sorry for that.)
 >  
 >  You're right. It works with CTF. Thanks!
 >  
 >    ozaki-r
 >  
 > 
 
 I'm curious whether this needs to be reopened as I'm experiencing similar on recent current
 with both default and slightly modified GENERIC kernel.
 > bash-4.3$ uname -a
 > NetBSD nb32.baou.fr 7.99.34 NetBSD 7.99.34 (GEN.nb32) #0: Mon Aug  1 00:06:10 CEST 2016  richard%nb32.xxxx.fr@localhost:/usr/obj/sys/arch/i386/compile/GEN.nb32 i386
 > bash-4.3$ sudo modstat |grep dtra
 > cyclic           misc     filesys  a    1     4252    dtrace
 > dtrace           driver   filesys  a    4     110162  solaris
 > dtrace_fbt       misc     filesys  -    0     5564    dtrace
 > dtrace_profile   misc     filesys  -    0     2158    dtrace,cyclic
 > dtrace_sdt       misc     filesys  -    0     1562    dtrace
 > bash-4.3$ diff /usr/src/sys/arch/i386/conf/GENERIC /usr/src/sys/arch/i386/conf/GEN.nb32 
 > 32a33
 >> makeoptions   CPUFLAGS="-march=pentium-mmx"
 > 581c582
 > < 
 > ---
 >> options DRM_DEBUG
 > 1224c1225
 > < ulpt* at uhub? port ? configuration ? interface ?
 > ---
 >> #ulpt*        at uhub? port ? configuration ? interface ?
 > bash-4.3$ grep -E 'CTF|DTRA' /etc/mk.conf 
 > MKDTRACE=yes
 > MKCTF=yes
 > bash-4.3$ sudo dtrace -l |head 
 >    ID   PROVIDER            MODULE                          FUNCTION NAME
 >     1     dtrace                                                     BEGIN
 >     2     dtrace                                                     END
 >     3     dtrace                                                     ERROR
 >     4       proc            kernel                                   exec-failure
 >     5       proc            kernel                                   exec-success
 >     6       proc            kernel                                   exec
 >     7       proc            kernel                                   exit
 >     8       proc            kernel                                   create
 >     9       proc            kernel                                   lwp-exit
 > bash-4.3$ sudo dtrace -l |wc -l
 >    51650
 > bash-4.3$ cat hello.d 
 > BEGIN
 > {
 >     trace("Hello world");
 >     exit(0);
 > }
 > bash-4.3$ sudo dtrace -s hello.d 
 > dtrace: failed to compile script hello.d: "/usr/lib/dtrace/psinfo.d", line 46: syntax error near "u_int"
 > bash-4.3$ sudo dtrace -n BEGIN
 > dtrace: invalid probe specifier BEGIN: "/usr/lib/dtrace/psinfo.d", line 46: syntax error near "u_int"
 
 I've noticed some noise in the build that I worked around (patches available for inspection) but there
 seems to be some ctf issues in the libproc processing where psinfo.d comes into play.
 
 Anybody else try or notice lately?
 
 What object should contain the ctf data here in question?
 
 -- 
 Richard PALO
 


Home | Main Index | Thread Index | Old Index