From: Daniel Jacobowitz <dan@debian.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Dave McCracken <dmccr@us.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] O(1) sys_exit(), threading, scalable-exit-2.5.31-A6
Date: Tue, 27 Aug 2002 11:39:57 -0400 [thread overview]
Message-ID: <20020827153957.GA9953@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0208201634410.22388-100000@localhost.localdomain>
On Tue, Aug 20, 2002 at 04:36:19PM +0200, Ingo Molnar wrote:
>
> the attached patch ontop of BK-curr fixes the ptrace wait4() anomaly that
> can be observed in any previous Linux kernel i could get my hands at. So
> in fact ->ptrace_children, besides being a speedup, also fixed a bug that
> couldnt be fixed in any satisfactory way before.
>
> Ingo
>
> --- linux/kernel/exit.c.orig Tue Aug 20 16:28:57 2002
> +++ linux/kernel/exit.c Tue Aug 20 16:30:13 2002
> @@ -731,7 +731,7 @@
> tsk = next_thread(tsk);
> } while (tsk != current);
> read_unlock(&tasklist_lock);
> - if (flag) {
> + if (flag || !list_empty(¤t->ptrace_children)) {
> retval = 0;
> if (options & WNOHANG)
> goto end_wait4;
Ingo,
At this point your ptrace changes have completely broken both
_TRACEME/exec and _ATTACH debugging. If an attached process finishes
while a debugger is attached, its parent no longer gets the proper wait
result for it:
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG|WUNTRACED, NULL) = 478
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG|WUNTRACED, NULL) = 478
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG|WUNTRACED, NULL) = 478
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG|WUNTRACED, NULL) = 478
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG|WUNTRACED, NULL) = 478
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG|WUNTRACED, NULL) = 478
etc. It is never removed from the list. _TRACEME/exec debugging
appears to have the same problem but it's harder to tell, since one can
not strace GDB in 2.5 without the patch I posted here two weeks ago.
If you don't have a chance to look at this I'll investigate later
today.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-08-27 15:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-19 12:16 [patch] O(1) sys_exit(), threading, scalable-exit-2.5.31-A6 Ingo Molnar
2002-08-19 16:15 ` [patch] O(1) sys_exit(), threading, scalable-exit-2.5.31-B4 Ingo Molnar
2002-08-19 17:42 ` [patch] O(1) sys_exit(), threading, scalable-exit-2.5.31-A6 Linus Torvalds
2002-08-19 17:44 ` Larry McVoy
2002-08-19 18:08 ` Ingo Molnar
2002-08-19 18:31 ` Dave McCracken
2002-08-19 18:36 ` Ingo Molnar
2002-08-19 18:51 ` Dave McCracken
2002-08-19 19:37 ` Ingo Molnar
2002-08-19 20:59 ` Ingo Molnar
2002-08-19 21:01 ` Dave McCracken
2002-08-19 21:29 ` Linus Torvalds
2002-08-19 21:42 ` Dave McCracken
2002-08-19 22:36 ` Ingo Molnar
2002-08-20 14:32 ` Dave McCracken
2002-08-20 14:36 ` Ingo Molnar
2002-08-27 15:39 ` Daniel Jacobowitz [this message]
2002-08-28 2:53 ` Daniel Jacobowitz
2002-08-20 3:21 ` Daniel Jacobowitz
2002-08-19 19:10 ` Linus Torvalds
2002-08-19 18:55 ` george anzinger
2002-08-19 19:15 ` Ingo Molnar
2002-08-19 20:03 ` george anzinger
2002-08-20 10:36 ` Richard Zidlicky
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=20020827153957.GA9953@nevyn.them.org \
--to=dan@debian.org \
--cc=dmccr@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@transmeta.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