From: Mike Coleman <mcoleman2@kc.rr.com>
To: Mark Kettenis <kettenis@wins.uva.nl>
Cc: Peter Berger <peterb@telerama.com>,
linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: Pthreads, linux, gdb, oh my! (and ptrace must die!)
Date: 13 Dec 2000 17:16:52 -0600 [thread overview]
Message-ID: <87zohzoqsb.fsf_-_@subterfugue.org> (raw)
In-Reply-To: <Pine.BSI.4.02.10012081445290.26743-100000@frogger.telerama.com> <s3ilmtka14t.fsf@debye.wins.uva.nl>
In-Reply-To: Mark Kettenis's message of "13 Dec 2000 14:42:26 +0100"
Mark Kettenis <kettenis@wins.uva.nl> writes:
> However, the "zombie problem" is caused by the way ptrace() interacts
> with clone()/exit()/wait(), which I consider to be a kernel bug.
[insightful analysis omitted]
I think you've hit the nail on the head, and I'm a bit frustrated that I never
noticed this problem even though I've spent quite a bit of time poring over
the code that makes ptrace work.
My limited mental abilities notwithstanding, I think this is one more reason
to ditch ptrace for a better method of process tracing/control. It's served
up to this point, but ptrace has a fundamental flaw, which is that it tries to
do a lot of interprocess signalling and interlocking in an in-band way, doing
process reparenting to try to take advantage of existing code. In the end
this seems to be resulting in an inscrutable, flaky mess.
What would a better process tracing facility be like? One key feature is
utter transparency. That is, it should be impossible for traced processes or
other processes that interact with them to be aware of whether or not tracing
is going on. This means that there should be no difference between the way a
process behaves under tracing versus how it would behave if it weren't being
traced, which is a key to faithful tracing/debugging and avoiding the
Heisenbug effect. (There does need to be some interface via which information
about tracing itself can be observed, but it should be hidden from the target
processes.)
It would also be nice to have something accessible via devices in the proc
filesystem. Maybe something like Solaris' "proc" debugging interface would be
a starting point:
http://docs.sun.com:80/ab2/coll.40.6/REFMAN4/@Ab2PageView/42351?DwebQuery=proc&Ab2Lang=C&Ab2Enc=iso-8859-1
--Mike
--
[O]ne of the features of the Internet [...] is that small groups of people can
greatly disturb large organizations. --Charles C. Mann
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next parent reply other threads:[~2000-12-13 23:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.BSI.4.02.10012081445290.26743-100000@frogger.telerama.com>
[not found] ` <s3ilmtka14t.fsf@debye.wins.uva.nl>
2000-12-13 23:16 ` Mike Coleman [this message]
2000-12-14 2:14 ` Pthreads, linux, gdb, oh my! (and ptrace must die!) David Wagner
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=87zohzoqsb.fsf_-_@subterfugue.org \
--to=mcoleman2@kc.rr.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=kettenis@wins.uva.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=peterb@telerama.com \
/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