From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Roland McGrath <roland@redhat.com>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
Matt Wilson <msw@redhat.com>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] revert zap_other_threads breakage, disallow CLONE_THREAD without CLONE_DETACHED
Date: Wed, 13 Aug 2003 00:11:00 -0700 [thread overview]
Message-ID: <1060758660.18727.17.camel@ixodes.goop.org> (raw)
In-Reply-To: <200308120752.h7C7qQT20085@magilla.sf.frob.com>
On Tue, 2003-08-12 at 00:52, Roland McGrath wrote:
> Please apply this patch to get us back out of this useless quagmire and
> disallow the problematic case that noone wants to try to use any more.
It seems to me there's a couple of problems with this patch:
One is that it prevents any single piece of code using
clone(CLONE_THREAD) from working on both 2.4 and 2.6. While clone() is
mostly hidden under libpthread.so, there are some applications which use
it directly for various good reasons. I've implemented two versions of
my clone/wait stuff in Valgrind to cope with this, but not everyone will
have yet. Perhaps I'm the only person in the world to use CLONE_THREAD,
but it seems unlikely. After all, clone() is a public interface.
The other reason is that this seems to be covering over an actual
conceptual problem rather than fixing it. I can't say I really
understand this piece of the kernel (which isn't too surprising that it
is very complicated because it represents 30 years of Unix history
packed into a dense mass), but one niggling concern I have is that even
when you're using CLONE_DETACHED, if you've attached with ptrace(), you
effectively become a parent who can wait on the detached clone. If you
can wait via ptrace, then doesn't it mean that all the wait-related
problems are still visible? I've tried to reproduce some of the
problems I've been seeing with non-detached threads in the case where
they are detached traced threads, but so far it seems OK. But that may
be because I haven't hit it properly yet.
I guess my concern is that I'm not convinced we really understand what's
going wrong here, and so I'm not convinced that this patch really fixes
things.
J
next prev parent reply other threads:[~2003-08-13 7:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-09 19:17 [PATCH] zap_other_threads() detaches thread group leader Matt Wilson
2003-08-12 7:40 ` Roland McGrath
2003-08-12 7:52 ` [PATCH] revert zap_other_threads breakage, disallow CLONE_THREAD without CLONE_DETACHED Roland McGrath
2003-08-13 7:11 ` Jeremy Fitzhardinge [this message]
2003-08-13 9:37 ` Roland McGrath
2003-08-14 17:32 ` Linus Torvalds
2003-08-14 17:53 ` Jamie Lokier
2003-08-14 18:03 ` Linus Torvalds
2003-08-14 18:27 ` Jamie Lokier
2003-08-14 18:33 ` Linus Torvalds
2003-08-14 18:38 ` Jamie Lokier
2003-08-14 20:56 ` Roland McGrath
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=1060758660.18727.17.camel@ixodes.goop.org \
--to=jeremy@goop.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=msw@redhat.com \
--cc=roland@redhat.com \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®