DTrace: Sending ^C while running script produces no output
Brandon Gooch
jamesbrandongooch at gmail.com
Fri Dec 3 05:20:46 UTC 2010
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].
For example, while trying out a one-liner (from
http://www.brendangregg.com/DTrace/dtrace_oneliners.txt):
brandon at d820:~$ sudo dtrace -n 'syscall:::entry { @num[execname] = count(); }'
dtrace: description 'syscall:::entry ' matched 514 probes
^C
brandon at d820:~$ (12-02 23:11)
If I instead, from another terminal, use pkill to quit or terminate
the process, I get output:
brandon at 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
brandon at 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!
More information about the freebsd-hackers
mailing list