[dtrace-discuss] What''s wrong with this script

CHao-Hong Guo
Wed, 17 Aug 2005 18:43:48 -0000

Bryan Cantrill ???:

>On Thu, Aug 18, 2005 at 01:19:29AM +0800, CHao-Hong Guo wrote:
>
>
>>hi, guys,
>>
>>I write a simple script as follow,
>>
>>
>>#!/usr/sbin/dtrace -Fs
>>
>>
>>syscall::ioctl:entry
>>/execname == "test.exe"/
>>{
>>self->trace = 1;
>>printf("fd: %d", arg0);
>>}
>>
>>fbt:::
>>/self->trace/
>>{
>>}
>>
>>syscall::ioctl:return
>>/execname == "test.exe"/
>>{
>>self->trace = 0;
>>}
>>
>>
>>When I run this script on my laptop (NEC Versa1000, snv_19),
>>the sytem is frozen.
>>
>>
>
>Yikes -- that''s bad.  What do you mean by "frozen"
exactly?  Does the
>system reboot?  Does DTrace work at all on this machine?  (That is,
>could you confirm that "dtrace -n
BEGIN''{exit(0)}''" works?)  Are you
>running KMDB?  If so, does it happen when KMDB is not running?  And can
>you send us the output of modinfo?
>
>
>
No response, the keyboard, mouse, all. I have to press power
botton to shutdown my system.

It seems that Dan is right, who suspects that my system memory is exhausted.
When I change

fbt:::
/self->trace/
{}


to,


fbt:scsi::
/self->trace/
{}

fbt:sd::
/self->trace/
{}

it works well.



>>could you tell me what ''s wrong with this script?
>>
>>
>
>Nothing''s wrong with the script -- that should work.  (And indeed,
many
>of run scripts like that all the time on latest bits...)
>
>	- Bryan
>
>--------------------------------------------------------------------------
>Bryan Cantrill, Solaris Kernel Development.       http://blogs.sun.com/bmc
>
>