Solved Failed to run dtrace scripts

Hi,

I just encounter some errors when I try to run the Dtrace scripts under /usr/share/dtrace/toolkit, but am not sure how to handle them:

Code:
root@darkgeek.pts/1 dtrace/toolkit # ./procsystime -n csh
dtrace: invalid probe specifier
#pragma D option quiet

/*
* Command line arguments
*/
inline int OPT_elapsed = 1;
inline int OPT_cpu = 0;

...<skip>...

: "/usr/lib/dtrace/ip.d", line 111: failed to copy typedef in6_addr_t
source type: Type information is in parent and unavailable

root@darkgeek.pts/1 dtrace/toolkit # perl ./hotkernel
Sampling... Hit Ctrl-C to end.
dtrace: invalid probe specifier
#pragma D option quiet
profile:::profile-1001hz
/arg0/
{
@pc[arg0] = count();
}
dtrace:::END
{
printa("%a %@d\n", @pc);
}
: "/usr/lib/dtrace/ip.d", line 111: failed to copy typedef in6_addr_t
source type: Type information is in parent and unavailable

FUNCTION COUNT PCNT

Seems they both complain an error of "Type information is in parent and unavailable".

My computer has FreeBSD 10.1-RELEASE (GENERIC kernel) amd64 installed, and the following is a list of loaded modules:

Code:
root@darkgeek.pts/1 / # kldstat
Id Refs Address Size Name
1 68 0xffffffff80200000 1755658 kernel
2 1 0xffffffff81956000 aca0 sem.ko
3 1 0xffffffff81961000 6cf30 vboxdrv.ko
4 1 0xffffffff819ce000 b630f0 nvidia.ko
5 3 0xffffffff82532000 b9ab0 linux.ko
6 1 0xffffffff82811000 538a fdescfs.ko
7 1 0xffffffff82817000 9d37 linprocfs.ko
8 1 0xffffffff82821000 357e ums.ko
9 1 0xffffffff82825000 2b58 uhid.ko
10 1 0xffffffff82828000 26c5 pflog.ko
11 1 0xffffffff8282b000 32efe pf.ko
12 4 0xffffffff8285e000 b998 netgraph.ko
13 1 0xffffffff8286a000 40a7 ng_ether.ko
14 1 0xffffffff8286f000 4688 ng_pppoe.ko
15 1 0xffffffff82874000 3820 ng_socket.ko
16 1 0xffffffff82878000 8dc dtraceall.ko
17 3 0xffffffff82879000 1fab cyclic.ko
18 12 0xffffffff8287b000 398b opensolaris.ko
19 10 0xffffffff8287f000 3cfd6 dtrace.ko
20 1 0xffffffff828bc000 45d5 dtmalloc.ko
21 1 0xffffffff828c1000 22ba dtnfscl.ko
22 1 0xffffffff828c4000 639a fbt.ko
23 1 0xffffffff828cb000 57d0b fasttrap.ko
24 1 0xffffffff82923000 4958 lockstat.ko
25 1 0xffffffff82928000 15e6 sdt.ko
26 1 0xffffffff8292a000 d7d8 systrace.ko
27 1 0xffffffff82938000 d402 systrace_freebsd32.ko
28 1 0xffffffff82946000 4c74 profile.ko
So what should I do to solve it? Thanks:D.
 
I had seen some odd failures like that running amd64 on a Soekris with the i386 CPU. Everything else on the system ran fine except dtrace(1).

What does dmesg | head -20 say as far as CPU type/features? Are you compiling your own system or are you using an install from an official ISO?
 
I had seen some odd failures like that running amd64 on a Soekris with the i386 CPU. Everything else on the system ran fine except dtrace(1).

What does dmesg | head -20 say as far as CPU type/features? Are you compiling your own system or are you using an install from an official ISO?
Hi,

Here's my dmesg information:

Code:
root@darkgeek-freebsd.pts/1 dtrace/toolkit # dmesg | head -20
Copyright (c) 1992-2014 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
   The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.1-RELEASE #0: Tue Nov 25 13:41:35 CST 2014
  justin@darkgeek-freebsd:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
VT: running with driver "vga".
CPU: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (3192.82-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x306a9  Family = 0x6  Model = 0x3a  Stepping = 9
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7fbae3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  Structured Extended Features=0x281<FSGSBASE,SMEP,ERMS>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 6442450944 (6144 MB)
avail memory = 6152626176 (5867 MB)
Event timer "LAPIC" quality 600

As to this system, I upgraded it from source (using GENERIC configuration) from 10.0 to 10.1 RELEASE.
 
According to https://wiki.freebsd.org/DTrace/KernelSupport, that is saying something is not correct with how DTrace was compiled in. That shouldn't be an issue with the default 10.1 configuration. A basic sanity check may be to boot from an ISO and immediately drop to a shell and attempt to run the DTrace command.
Hi,

I compile the kernel using GENERIC configuration again and dtrace works like a charm! So the issue stated before maybe is due to my broken upgrading process.
 
Back
Top