linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: Alan Cox <alan@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: PATCH: ptrace support for fork/vfork/clone events [1/3]
Date: Tue, 29 Oct 2002 23:33:43 -0500	[thread overview]
Message-ID: <20021030043343.GA1922@nevyn.them.org> (raw)
In-Reply-To: <20021027190311.GA28506@nevyn.them.org>

On Sun, Oct 27, 2002 at 02:03:11PM -0500, Daniel Jacobowitz wrote:
> On Sun, Oct 27, 2002 at 01:53:17PM -0500, Alan Cox wrote:
> > > I've submitted this a couple of times and gotten no feedback, but I'm a
> > > sucker for pain, so here it is again - I'd really like to see this patch in
> > > 2.6.
> > 
> > I've been ignoring this because it doesn't appear to agree with what other
> > people tell me. For example why can't you do the fork trace by building
> > a trampoline ?
> 
> This is what strace used to do.  You'll notice that Red Hat's doesn't
> any more - not sure if that's in a release yet, Roland was working on
> it.  I'm not sure exactly how it works now, but the gist of the problem
> was that it's unreliable.  I believe the exact problem he was addressing
> was that while strace held the process stopped and figured out the
> child's PID, the child got a signal.  It leaves the trampoline and goes
> off to handle the signal; strace loses track of it, and it either exits
> (confusing the tracer) or longjmps (completely escaping the tracer).
> 
> The trampolines are platform-specific, too, which is a real nuisance. 
> Some of them are still wrong in the strace source.
> 
> Another advantage of ptrace reporting this is that we can stop on these
> events without having to manage breakpoints on the syscall points in
> libc, which is good when people inline-asm a clone() for some reason;
> which does still happen.  GDB can't use PTRACE_SYSCALL to find forks,
> it's a substantial slowdown for minimal benefit.
> 
> I can probably come up with some more reasons if you want :)

Alan, did I manage to convince you this was necessary?

Meanwhile, updated patches to tonight's BK tree are at:
  http://crack.them.org/~drow/forks/
and
  bk://nevyn.them.org:5000

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

  reply	other threads:[~2002-10-30  4:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-27 18:50 PATCH: ptrace support for fork/vfork/clone events [1/3] Daniel Jacobowitz
2002-10-27 18:52 ` PATCH: ptrace support for fork/vfork/clone events [2/3] Daniel Jacobowitz
2002-10-27 18:53 ` PATCH: ptrace support for fork/vfork/clone events [3/3] Daniel Jacobowitz
2002-10-27 18:53 ` PATCH: ptrace support for fork/vfork/clone events [1/3] Alan Cox
2002-10-27 19:03   ` Daniel Jacobowitz
2002-10-30  4:33     ` Daniel Jacobowitz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-31 20:00 Daniel Jacobowitz
2002-10-31 20:02 ` Daniel Jacobowitz
2002-10-31 20:02   ` Daniel Jacobowitz

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=20021030043343.GA1922@nevyn.them.org \
    --to=dan@debian.org \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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).