From: Oleg Nesterov <oleg@tv-sign.ru>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Davide Libenzi <davidel@xmailserver.org>,
Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Roland McGrath <roland@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] will_become_orphaned_pgrp: we have threads
Date: Sun, 9 Dec 2007 19:43:11 +0300 [thread overview]
Message-ID: <20071209164311.GA416@tv-sign.ru> (raw)
In-Reply-To: <m14perooqx.fsf@ebiederm.dsl.xmission.com>
On 12/09, Eric W. Biederman wrote:
>
> Equally messed up is a our status in /proc at that point. Which
> says our sleeping process is a zombie.
Yes, this is annoying.
> I'm thinking we need to do at least some of the thread group leadership
> transfer in do_exit, instead of de_thread. Then p->group_leader->exit_state
> would be sufficient to see if the entire thread group was alive,
> as the group_leader would be whoever was left alive. The original
> group_leader might still need to be kept around for it's pid...
>
> I think that would solve most of the problems you have with a dead
> thread group leader and sending SIG_STOP as well.
Yes I was thinking about that too, but I am not brave enough to even
try to to think to the end ;)
As a minimal change, I tried to add "task_struct *leader_proxy" to
signal_struct, which points to the next live thread, and changed by
exit_notify(). eligible_child() checks it instead of ->exit_signal.
But this is so messy...
And in fact, if we are talking about group stop, it is a group operation,
why do_wait() uses per-thread ->exit_code but not ->group_exit_code ?
But yes, [PATCH 3/3] adds a visible difference, and I don't know if
this difference is good or bad.
$ sleep 1000
[1]+ Stopped sleep 1000
$ strace -p `pidof sleep`
Process 432 attached - interrupt to quit
Now strace "hangs" in do_wait() because ->exit_code was eaten by the
shell. We need SIGCONT.
With the "[PATCH 3/3]" strace proceeds happily.
Oleg.
next prev parent reply other threads:[~2007-12-09 16:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-08 18:38 [PATCH 1/3] will_become_orphaned_pgrp: we have threads Oleg Nesterov
2007-12-08 23:50 ` Eric W. Biederman
2007-12-09 14:21 ` Oleg Nesterov
2007-12-09 15:45 ` Eric W. Biederman
2007-12-09 16:43 ` Oleg Nesterov [this message]
2007-12-09 23:56 ` Eric W. Biederman
2007-12-10 18:37 ` Oleg Nesterov
2007-12-11 1:36 ` Eric W. Biederman
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=20071209164311.GA416@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.