From: Oleg Nesterov <oleg@redhat.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Roland McGrath <roland@redhat.com>
Subject: Re: Zombie process when ptracing
Date: Mon, 23 Nov 2009 16:16:12 +0100 [thread overview]
Message-ID: <20091123151612.GC4495@redhat.com> (raw)
In-Reply-To: <20091123083623.GD5602@wotan.suse.de>
On 11/23, Nick Piggin wrote:
>
> On Fri, Nov 20, 2009 at 02:29:30AM +0100, Oleg Nesterov wrote:
> > Hi,
> >
> > On 11/19, Nick Piggin wrote:
> > >
> > > Running recent git kernel, I have a process stuck in Z state
> > >
> > > bash ? 0000000000000000 0 3188 3187 0x00000000
> > > ffff88012e24fec8 0000000000000046 0000000000000000 0000000000000012
> > > ffff88012e24fec8 ffff88012e24e000 ffff88012e24ffd8 ffff88012e24e000
> > > 000000000000efc8 ffff88012e24e000 ffff88012ea82090 ffff88012ff78640
> > > Call Trace:
> > > [<ffffffff8124baee>] ? proc_clear_tty+0x5e/0x70
> > > [<ffffffff810587a8>] ? exit_ptrace+0xb8/0x140
> > > [<ffffffff8105126a>] do_exit+0x58a/0x7c0
> > > [<ffffffff810514dd>] do_group_exit+0x3d/0xb0
> > > [<ffffffff81051562>] sys_exit_group+0x12/0x20
> > > [<ffffffff8100b3eb>] system_call_fastpath+0x16/0x1b
> > >
> > > This was after stracing a few test programs.
> > >
> > > It also seems to have lost job control (^C) at the same time.
> >
> > This can happen if the tracer (strace) itself hangs, zombies
> > should go away once the tracer is killed. Or its ->real_parent
> > is stopped or hangs...
> >
> > (I assume you didn't strace /sbin/init)
>
> No, I straced something else, and all straces seemed to be
> killed but bash remained. I was running a script that in
> turn launched another process, so I ran it via
> strace -ff bash ./script.sh
OK, thanks.
Hmm. Just noticed the state above == '?'. Looks like sched_show_task()
is buggy, it should check ->exit_state for "ZX" from TASK_STATE_TO_CHAR_STR.
But this is off-topic.
> > If you see a zombie again, could you look at its /ptoc/pid/status?
>
> OK, any other hints if I see it again?
Well, also the contents of /proc/PPid/status and /proc/TracerPid/status
may help. And sysrq-t ouput. Otherwise, currently I have no idea where
to start.
Oleg.
prev parent reply other threads:[~2009-11-23 15:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-19 10:25 Zombie process when ptracing Nick Piggin
2009-11-20 1:29 ` Oleg Nesterov
2009-11-23 8:36 ` Nick Piggin
2009-11-23 15:16 ` Oleg Nesterov [this message]
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=20091123151612.GC4495@redhat.com \
--to=oleg@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=roland@redhat.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