From: Oleg Nesterov <oleg@redhat.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: mmotm 2009-08-24-16-24 uploaded
Date: Thu, 27 Aug 2009 12:08:46 +0200 [thread overview]
Message-ID: <20090827100846.GA6462@redhat.com> (raw)
In-Reply-To: <20090827184303.500ac1f0.kamezawa.hiroyu@jp.fujitsu.com>
On 08/27, KAMEZAWA Hiroyuki wrote:
>
> On Thu, 27 Aug 2009 11:34:41 +0200
> Oleg Nesterov <oleg@redhat.com> wrote:
>
> > On 08/27, KAMEZAWA Hiroyuki wrote:
> > >
> > > On Thu, 27 Aug 2009 14:44:53 +0900
> > > KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > >
> > > >
> > > > In the newest mmotom, my S14nfslock hangs up. (x86-64/Fedora10)
> > > >
> > > > On Mon, 24 Aug 2009 16:28:30 -0700
> > > > akpm@linux-foundation.org wrote:
> > > >
> > > > > ptrace-__ptrace_detach-do-__wake_up_parent-if-we-reap-the-tracee.patch
> > > > > do_wait-wakeup-optimization-shift-security_task_wait-from-eligible_child-to-wait_consider_task.patch
> > > >
> > > > bisected. following 2 patches for filtering SIGCHLD cause hang (for my environ).
> > > >
> > > > > do_wait-wakeup-optimization-change-__wake_up_parent-to-use-filtered-wakeup.patch
> > > > > do_wait-wakeup-optimization-change-__wake_up_parent-to-use-filtered-wakeup-selinux_bprm_committed_creds-use-__wake_up_parent.patch
> >
> > Confused. Which patch causes the hang? They should be applied in reverse order,
> >
> > do_wait-wakeup-optimization-change-__wake_up_parent-to-use-filtered-wakeup-selinux_bprm_committed_creds-use-__wake_up_parent.patch
> > do_wait-wakeup-optimization-change-__wake_up_parent-to-use-filtered-wakeup.patch
> >
> > > removed S14nfslockd from rc5.d and check it by strace
> > > ==
> > > 2712] fstat(6, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> > > [pid 2712] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc6f263c000
> > > [pid 2712] dup(6) = 7
> > > [pid 2712] write(6, "2712\n"..., 5) = 5
> > > [pid 2712] close(6) = 0
> > > [pid 2712] munmap(0x7fc6f263c000, 4096) = 0
> > > [pid 2712] clone(Process 2713 attached
> > > child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fc6f2625780) = 2713
> > > [pid 2712] wait4(2713, Process 2712 suspended
> > > <unfinished ...>
> > > ==
> > > When process 2713 exits, process 2712 don't wake up.
> >
> > Hmm, very strange. How can I reproduce?
> >
> Sorry, I don't know.
>
> But exited process's, but not caught, p->exit_signal was -1. (confirmed by printk)
> (details in another mail)
Ah, I didn't notice "Process 2713 attached" above, I guess you did strace -f.
The child was reaped by strace, because
> Name: rpc.statd
> State: S (sleeping)
> ...
> SigIgn: 0000000000011000
indeed, SIGCHLD is ignored.
OK, I seem to understand what happens. Could you try the patch below?
Oleg.
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1564,9 +1564,6 @@ static int child_wait_callback(wait_queu
child_wait);
struct task_struct *p = key;
- if (!eligible_child(wo, p))
- return 0;
-
if ((wo->wo_flags & __WNOTHREAD) && wait->private != p->parent)
return 0;
next prev parent reply other threads:[~2009-08-27 10:12 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 23:28 mmotm 2009-08-24-16-24 uploaded akpm
2009-08-25 10:02 ` KAMEZAWA Hiroyuki
2009-08-26 4:52 ` Amerigo Wang
2009-08-26 6:54 ` KAMEZAWA Hiroyuki
2009-08-26 3:15 ` KAMEZAWA Hiroyuki
2009-08-26 3:36 ` Andrew Morton
2009-08-26 3:44 ` KAMEZAWA Hiroyuki
2009-08-27 5:44 ` KAMEZAWA Hiroyuki
2009-08-27 6:17 ` Hiroshi Shimamoto
2009-08-27 6:31 ` KAMEZAWA Hiroyuki
2009-08-27 7:05 ` KAMEZAWA Hiroyuki
2009-08-27 9:34 ` Oleg Nesterov
2009-08-27 9:43 ` KAMEZAWA Hiroyuki
2009-08-27 10:08 ` Oleg Nesterov [this message]
2009-08-27 10:31 ` KAMEZAWA Hiroyuki
2009-08-27 10:52 ` Oleg Nesterov
2009-08-28 17:17 ` eligible_child() && __WCLONE && task_detached() (Was: mmotm 2009-08-24-16-24 uploaded) Oleg Nesterov
2009-08-28 19:16 ` Roland McGrath
2009-09-01 12:22 ` [PATCH -mm 0/2] fix do_wait(!__WALL) hang " Oleg Nesterov
2009-09-01 12:23 ` [PATCH -mm 1/2] do_wait-wakeup-optimization: fix child_wait_callback()->eligible_child() usage Oleg Nesterov
2009-09-10 0:36 ` KAMEZAWA Hiroyuki
2009-09-01 12:24 ` [PATCH -mm 2/2] do_wait-wakeup-optimization: simplify task_pid_type() Oleg Nesterov
2009-08-27 10:17 ` mmotm 2009-08-24-16-24 uploaded KAMEZAWA Hiroyuki
2009-08-27 9:37 ` KAMEZAWA Hiroyuki
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=20090827100846.GA6462@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.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).