on 03/12/2010 07:20 Brandon Gooch said the following:
> I've been tinkering with DTrace a bit, and I've notice something
> peculiar on each system I've tried it on.
> 
> Sending ^C from the keyboard in the terminal (console, XTerm, Konsole)
> produces no output [1].

Can you ktrace the dtrace process?
I wonder, could it be that SIGINT from ^C is somehow delivered twice?..

> For example, while trying out a one-liner (from
> http://www.brendangregg.com/DTrace/dtrace_oneliners.txt):
> 
> bran...@d820:~$ sudo dtrace -n 'syscall:::entry { @num[execname] = count(); }'
> dtrace: description 'syscall:::entry ' matched 514 probes
> ^C

BTW, sudo might play a role here...  Just a thought.

> bran...@d820:~$                                                   (12-02 
> 23:11)
> 
> 
> If I instead, from another terminal, use pkill to quit or terminate
> the process, I get output:
> 
> bran...@d820:~$ sudo dtrace -n 'syscall:::entry { @num[execname] = count(); 
> }';
> dtrace: description 'syscall:::entry ' matched 514 probes
> 
> 
>   akonadi_control                                                   4
>   akonadiserver                                                     5
>   syslogd                                                           6
>   sendmail                                                          8
>   akonadi_ical_resour                                              12
>   akonadi_maildir_res                                              12
>   akonadi_nepomuk_con                                              12
>   akonadi_vcard_resou                                              12
>   kuiserver                                                        12
>   akonadi_maildispatc                                              14
>   korgac                                                           14
>   virtuoso-t                                                       15
>   dbus-daemon                                                      17
>   mysqld                                                           18
>   hald                                                             24
>   knotify4                                                         27
>   akonadi_contacts_re                                              36
>   nepomukservicestub                                               70
>   pkill                                                            70
>   powerd                                                           72
>   dtrace                                                          101
>   zsh                                                             111
>   sudo                                                            495
>   kwin                                                           2812
>   firefox-bin                                                    3175
>   kdeinit4                                                      11044
>   Xorg                                                          39588
> bran...@d820:~$                                                   (12-02 
> 23:14)
> 
> 
> I also want to add that I've tried this with a variety of shells on
> both 8.2-PRERELEASE and HEAD systems, i386 and amd64, built with GCC
> and nearly GENERIC kernels in order to try to eliminate the cause.
> 
> I feel as though this has something to do with file descriptors being
> closed too soon when handling the signal or something of that nature.
> It's also been suggested that this could be a bug in libdtrace, but I
> haven't the knowledge (or skill) to try and pinpoint the cause myself.
> 
> Is there anyone here that may be able to provide feedback or debugging
> suggestions?
> 
> Thanks!
> 
> -Brandon
> 
> [1] This isn't always the case, only like 99.99% of the time.
> Sometimes I do get output, but usually it's just snippets, and
> sometimes random characters!

-- 
Andriy Gapon
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to