Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Dec 2010 22:05:08 -0600
From:      Brandon Gooch <jamesbrandongooch@gmail.com>
To:        Artem Belevich <fbsdlist@src.cx>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: DTrace: Sending ^C while running script produces no output
Message-ID:  <AANLkTinoxX27PAwJMQOCBuGzUhyW7nXRWZt6Q9uFZ6oH@mail.gmail.com>
In-Reply-To: <AANLkTi=T21q%2B_N577xcxb755RYP2OmpA3BEJrGnJ5CmD@mail.gmail.com>
References:  <AANLkTikmxpRQY_nOD6SB32-nd7YTTgysv2zWgzv7ozYy@mail.gmail.com> <AANLkTikGYJiiqbx6v7xMtNpj4%2Bcom1i3ivDtyOegA4DZ@mail.gmail.com> <AANLkTi=T21q%2B_N577xcxb755RYP2OmpA3BEJrGnJ5CmD@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 2, 2010 at 11:48 PM, Artem Belevich <fbsdlist@src.cx> wrote:
> On Thu, Dec 2, 2010 at 9:46 PM, Artem Belevich <fbsdlist@src.cx> wrote:
>> On Thu, Dec 2, 2010 at 9:20 PM, Brandon Gooch
>> <jamesbrandongooch@gmail.com> wrote:
>>> 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):
>>
>> I've got two boxes, both running stable-8/amd64.
>>
>> stable/8 r215749 (+cyclic patch) - reliably produces output, though
>> for some reason does not count anything for 32-bit apps.
>> stable/8 r215546 - seems to have the problem you've described. I did
>> get normal output once out of 10 or so attempts.
>
> Tried on another box, also amd64:
>
> stable/8 r212650 - works fine.

I've rebuilt kernel and world on every DTrace enabled system. I built
from a clean svn checkout. I still see this behavior, although it's
definitely the worst on HEAD:

brandon@x300:/usr/src$ svn info                                   (12-03 22:00)
Path: .
URL: svn://svn.freebsd.org/base/head
Repository Root: svn://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 216114
Node Kind: directory
Schedule: normal
Last Changed Author: lstewart
Last Changed Rev: 216114
Last Changed Date: 2010-12-02 00:05:44 -0600 (Thu, 02 Dec 2010)

The following NEVER works on this system running HEAD:

brandon@x300:~$ sudo dtrace -n 'syscall:::entry { @num[execname] = count(); }'
dtrace: description 'syscall:::entry ' matched 514 probes
^C

brandon@x300:~$                                                   (12-03 21:59)

Of course, sending ANY signal to dtrace via pkill or killall promptly
causes dtrace to spit out:

brandon@x300:~$ sudo dtrace -n 'syscall:::entry { @num[execname] = count(); }'
dtrace: description 'syscall:::entry ' matched 514 probes


  dbus-daemon                                                       6
  syslogd                                                           7
  ntpd                                                              8
  sendmail                                                          9
  hald-addon-storage                                               10
  cut                                                              39
  hald                                                             40
  mixer                                                            44
  killall                                                          51
  powerd                                                           55
  zsh                                                              69
  openbox                                                          90
  dtrace                                                          109
  xterm                                                           172
  conky                                                           180
  sh                                                              231
  sudo                                                            457
  wpa_supplicant                                                  648
  Xorg                                                           1557
  firefox-bin                                                    1992
brandon@x300:~$                                                   (12-03 22:02)

Very troubling.

Question: Should I be rebuilding my ports (xterm, zsh, ksh, etc...)
after updating to make sure that the proper things are happening when
sending these keyboard interrupts? I'm really grasping here :/

-Brandon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinoxX27PAwJMQOCBuGzUhyW7nXRWZt6Q9uFZ6oH>