9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Iruata Souza <iru.muzgo@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] dtrace for plan 9
Date: Tue,  3 Nov 2009 13:30:27 -0200	[thread overview]
Message-ID: <d1c554290911030730m64a7d415k23e5622510438b4f@mail.gmail.com> (raw)
In-Reply-To: <20091101184418.GM19125@gradx.cs.jhu.edu>

On Sun, Nov 1, 2009 at 4:44 PM, Nathaniel W Filardo <nwf@cs.jhu.edu> wrote:
> On Sun, Nov 01, 2009 at 11:58:10AM -0500, erik quanstrom wrote:
>> On Sun Nov  1 11:55:47 EST 2009, devon.odell@gmail.com wrote:
>> > Also, D is not compiled in kernel. The dtrace utility compiles the D
>> > script, and the script goes through some sanity checking in the D
>> > compiler. The bytecode is sent to the kernel to execute. There are
>> > some in-kernel safety guarantees -- for instance, a D script causing a
>> > nil ptr deref in kernel obviously shouldn't (and does not) cause the
>> > system to panic.
>>
>> that wasn't my main concern.
>>
>> there are many interrupt routines that depend on
>> the exact sequence of events and probing  is likely
>> to wreck havoc.
>
> D is not able (AFAIK, anyway... the design seems like it oughtn't be) to
> change the externally observable sequence of events to hardare.  It may of
> course change the timing of those events, but that's often less of an issue.
> If you don't disable safety (as root, you can, AIUI) DTrace writes only to
> its own logs, even if it can read almost everything.
>
>> how do you prevent probes from reading read-to-clear
>> registers?
>
> DTrace has a notion of "toxic" regions of memory -- lists provided by
> drivers -- which D is not allowed to access.  It is possible to get these
> wrong, and that's a bug, just like it would be possible to get the driver
> itself wrong.
>
>> how do you know a probe in an irq routine won't set
>> off a latent race?
>
> AIUI since D bytecode is loop-free (it permits only forward branches, making
> it trivially terminating), hooks run in non-preemptable context can safely
> inherit non-preemption from their hooked context.
>
> If you've got a race between CPUs that's tickled by DTrace, it could also be
> tickled by changing your compiler, or dynamic CPU clocking, or a higher
> priority IRQ, or ... take your pick.  That's a bug and it's not DTrace's
> fault.
>
> All that said, DTrace is not perfect and probably has some corner cases that
> may cause trouble.  I'm sure the Solaris developers would love to hear from
> you if you find one.
>

if i remember correctly, in 2006 i took Sun's SA-327-S10 course on dtrace.
after learning some D, i tried the obvious thing: enabling all probes.

something strange has happened after that. here i try to reproduce
from memory the steps i took and the strange thing i found (if anyone
is still able to reproduce the thing, i'm curious)

on a solaris 10 system:
1. log in to a CDE session
2. open two ksh terminal windows (w1 and w2 from now on, respectively)
3. type some commands at random in w1
4. type some commands at random in w2
5. with the up arrow key, check the command history on both windows
6. run dtrace enabling all probes in w2 (the system may become slow)
7. interrupt dtrace
8. check the command history of the windows

i was told dtrace was non-intrusive at the time, but w2 would show the
command history from w1.

iru



  reply	other threads:[~2009-11-03 15:30 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<9ab217670911010852h46cc32a0k2e3ef99323287595@mail.gmail.com>
2009-11-01 16:58 ` erik quanstrom
2009-11-01 18:44   ` Nathaniel W Filardo
2009-11-03 15:30     ` Iruata Souza [this message]
2009-11-03 18:29       ` Lyndon Nerenberg
2009-11-03 18:50         ` Iruata Souza
2009-11-07 10:45       ` Ethan Grammatikidis
2009-11-07 17:44         ` ron minnich
2009-11-08 14:19         ` dave.l
2009-11-09  0:07           ` dave.l
2009-11-09  0:27             ` hiro
2009-11-09  0:56             ` ron minnich
2009-11-10  0:33             ` Nathaniel W Filardo
2009-11-10  0:46               ` ron minnich
2009-11-10  1:00                 ` Roman Shaposhnik
2009-11-10 20:21                   ` dave.l
2009-11-10 23:38                     ` Roman Shaposhnik
2009-11-13 23:47                       ` dave.l
2009-11-10  2:37                 ` erik quanstrom
2009-11-10  3:08                   ` Devon H. O'Dell
2009-11-10  4:20                     ` Roman Shaposhnik
2009-11-10  0:47               ` Roman Shaposhnik
     [not found] <<9ab217670911091908u25e0a23bk838bd67c460492ac@mail.gmail.com>
2009-11-10  3:26 ` erik quanstrom
2009-11-10  4:05   ` Devon H. O'Dell
     [not found] <<13426df10911081656q75a7b5aawd01dc9df71beca08@mail.gmail.com>
2009-11-09 14:28 ` erik quanstrom
2009-11-09 15:45   ` ron minnich
2009-11-09 16:01     ` erik quanstrom
     [not found] <<Pine.BSI.4.64.0911011858540.4700@malasada.lava.net>
2009-11-02  5:03 ` erik quanstrom
2009-11-02 15:59   ` David Leimbach
     [not found] <<4AEDB3DD.2010205@maht0x0r.net>
2009-11-01 16:19 ` erik quanstrom
2009-11-01 16:52   ` Devon H. O'Dell
2009-11-01 17:19     ` ron minnich
     [not found] <<e763acc10910312200k4fe66aa8q557dcfe3a1d73ff3@mail.gmail.com>
2009-11-01 13:25 ` erik quanstrom
2009-11-01 16:14   ` matt
2009-11-02  4:59   ` Tim Newsham
     [not found] <<13426df10910271720t7679d169k84fb7d4b9a9cefc5@mail.gmail.com>
2009-10-28  1:49 ` erik quanstrom
2009-10-28  2:23   ` ron minnich
2009-10-28  2:38     ` Jeff Sickel
2009-11-01  3:01       ` dave.l
2009-11-01  3:26         ` ron minnich
2009-11-01  5:00           ` Roman Shaposhnik
2009-10-28  0:20 ron minnich
2009-10-28  0:52 ` Devon H. O'Dell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d1c554290911030730m64a7d415k23e5622510438b4f@mail.gmail.com \
    --to=iru.muzgo@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).