Re: DTrace/FreeBSD source snapshot




John Birrell writes:
On Mon, Feb 04, 2008 at 04:34:12PM -0500, Andrew Gallatin wrote:

With this installed, I'm seeing a problem running any
dtrace scripts:

dtrace: failed to compile script /nfs/home/gallatin/dtrace/printa.d:
"/usr/lib/dtrace/psinfo.d", line 37: syntax error near "uid_t"

I'm guessing dtrace doesn't know what a uid_t is. Is this some sort
of installation problem on my part?

Hmmm. That looks like a CTF conversion problem, assuming that uid_t
is actually referenced in our kernel (which I think it should be).

Does a ctfdump of the kernel list uid_t?

There was no ctf data at all. I build kernels the old
fashioned way in /sys (no buildkernel), and I ran config
prior to installworld, so the makefile did not have the CTF
Total pilot error on my part, sorry to have bothered you!
panic: solaris assert: ((__curthread())->td_proc) == p, file:

Ah that's WIP. I shouldn't have added fasttrap to the dtraceall
module dependencies. Can you take it out or just load all the other
modules manually? You wo't get anywhere trying to trace userland stuff
yet.

That works, thanks!

FWIW, I was mainly looking to try some of the kernel
profiling scripts that I use on Solaris and MacOSX.
They're variations on the example scripts.

When I ran the following on a fairly busy system:
#!/usr/sbin/dtrace -s

profile:::profile-997
{
@a[stack(20)]=count();
}


END
{
trunc(@a, 20);
printa(@a);
}

I see nothing:

% ~/dtrace/profile_stack.d
dtrace: script '/nfs/home/gallatin/dtrace/profile_stack.d' matched 2
probes
<20 seconds elapses>
^C
CPU ID FUNCTION:NAME
2 2 :END

20064

Under similar load on Solaris (or MacOSX), I'd see a bunch of
different "hot" stacks. A few more tries hung the system for ~30
seconds, until it crashed:

bge0: watchdog timeout -- resetting
spin lock 0xffffffff80a5ac20 (smp rendezvous) held by 0xffffff008c96aa50 (tid 100135) too long
panic: spin lock held too long
cpuid = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
panic() at panic+0x17d
_mtx_lock_spin_failed() at _mtx_lock_spin_failed+0x39
_mtx_lock_spin() at _mtx_lock_spin+0x9e
smp_rendezvous_cpus() at smp_rendezvous_cpus+0xe1
dtrace_xcall() at dtrace_xcall+0x6a
dtrace_state_deadman() at dtrace_state_deadman+0x19
cyclic_clock() at cyclic_clock+0x12b
lapic_handle_timer() at lapic_handle_timer+0x8b
Xtimerint() at Xtimerint+0x67
--- interrupt, rip = 0xffffffff806fd9e6, rsp = 0xffffffffac289b90, rbp = 0xffffffffac289ba0 ---
acpi_cpu_c1() at acpi_cpu_c1+0x6
acpi_cpu_idle() at acpi_cpu_idle+0x19c
sched_idletd() at sched_idletd+0x46
fork_exit() at fork_exit+0x11f
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xffffffffac289d30, rbp = 0 ---


FWIW, this is an 8-way opteron.

Drew

_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • dtrace kernel priviledge
    ... We want to give developers priviledge so they can run dtrace so find ... There are so many scripts which ... manipulate kernel). ...
    (comp.unix.solaris)
  • RE: perl module installation
    ... run perl scripts from the browser on this box. ... I have download from CPAN ... module installation, are your errors when you try to use them or install ...
    (perl.beginners)
  • Re: How can this site get back to rowing topics
    ... IE7Pro which is similar to GreaseMonkey but for IE. Installation is ... available while IE restarts. ... Scripts from the list on the left, then click on the "Reload All ...
    (rec.sport.rowing)
  • Re: sun calendar & dsee6 on CentOS machine-- need to return to preinstall configuration
    ... previous configuration attempts made by the scripts on my ... that I can remove the previous installation attempts from this machine ... I'm pretty sure that won't even work anyway as the scripts surely ... eventually broke the rpm database on my target machine. ...
    (comp.sys.sun.apps)
  • Re: SP4 error running replsys.sql
    ... During the installation of SQL SP4 I also received the error: ... The application must have been trying to connect to the SQL database ... while the scripts were attempting to run. ...
    (microsoft.public.sqlserver.setup)