linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* unkillable zombies from using gdb and kernel 2.4.15 and higher?
@ 2001-12-10 14:11 Kevin Hendricks
  2001-12-10 19:39 ` Michel Dänzer
  2001-12-10 20:31 ` Daniel Jacobowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Kevin Hendricks @ 2001-12-10 14:11 UTC (permalink / raw)
  To: linuxppc-dev


Hi,

I have been debugging a glibc-2.2.4 issue that involves forking and
reaping and threads using gdb.  Unfortunately, every time I run things
under gdb I create an "unkillable" zombie process that (even after gdb
has gone away) is impossible to remove.

ps -Af | grep idlc
kbhend   25532     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   25529     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   25541     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   25543     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   25540     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   25552     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   25554     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   25551     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   14796 10716  0 09:11 pts/4    00:00:00 grep idlc

[root@localhost program]# kill -9 25530 25532 25529
[root@localhost program]# ps -Af | grep idlc
....
kbhend   25530     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   25532     1  0 Dec08 ?        00:00:00 [idlc]
kbhend   25529     1  0 Dec08 ?        00:00:00 [idlc]

So these zombies are ignoring kill -9  signals which I thought was a big
no-no?

Did something change in signal handling lately that allows this to
happen?

Thanks,

Kevin

----
Kevin B. Hendricks
Associate Professor of Operations and Information Technology
Richard Ivey School of Business, University of Western Ontario
London Ontario, CANADA  N6A 3K7
khendricks@ivey.uwo.ca

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: unkillable zombies from using gdb and kernel 2.4.15 and higher?
  2001-12-10 14:11 unkillable zombies from using gdb and kernel 2.4.15 and higher? Kevin Hendricks
@ 2001-12-10 19:39 ` Michel Dänzer
  2001-12-10 20:20   ` Gabriel Paubert
  2001-12-10 20:24   ` Roman Zippel
  2001-12-10 20:31 ` Daniel Jacobowitz
  1 sibling, 2 replies; 7+ messages in thread
From: Michel Dänzer @ 2001-12-10 19:39 UTC (permalink / raw)
  To: Kevin Hendricks; +Cc: linuxppc-dev


On Mon, 2001-12-10 at 15:11, Kevin Hendricks wrote:

> So these zombies are ignoring kill -9  signals which I thought was a big
> no-no?

Zombies are dead, they don't get more dead if you kill them. ;)

AFAIR zombies have died but are waiting for their return value to be
read out of the process table. I'd like to know myself how that can
happen when their parents are gone...


--
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: unkillable zombies from using gdb and kernel 2.4.15 and higher?
  2001-12-10 19:39 ` Michel Dänzer
@ 2001-12-10 20:20   ` Gabriel Paubert
  2001-12-10 20:55     ` Michel Dänzer
  2001-12-10 20:24   ` Roman Zippel
  1 sibling, 1 reply; 7+ messages in thread
From: Gabriel Paubert @ 2001-12-10 20:20 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: Kevin Hendricks, linuxppc-dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN, Size: 630 bytes --]


On 10 Dec 2001, Michel [ISO-8859-1] Dänzer wrote:

>
> On Mon, 2001-12-10 at 15:11, Kevin Hendricks wrote:
>
> > So these zombies are ignoring kill -9  signals which I thought was a big
> > no-no?
>
> Zombies are dead, they don't get more dead if you kill them. ;)
>
> AFAIR zombies have died but are waiting for their return value to be
> read out of the process table. I'd like to know myself how that can
> happen when their parents are gone...

They are reparented to init. One of init tasks is to reap all
processes who lose their parents.

	Gabriel.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: unkillable zombies from using gdb and kernel 2.4.15 and higher?
  2001-12-10 19:39 ` Michel Dänzer
  2001-12-10 20:20   ` Gabriel Paubert
@ 2001-12-10 20:24   ` Roman Zippel
  1 sibling, 0 replies; 7+ messages in thread
From: Roman Zippel @ 2001-12-10 20:24 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: Kevin Hendricks, linuxppc-dev


Hi,

"Michel Dänzer" wrote:

> AFAIR zombies have died but are waiting for their return value to be
> read out of the process table. I'd like to know myself how that can
> happen when their parents are gone...

They are reparented to init, which should take care of them.

bye, Roman

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: unkillable zombies from using gdb and kernel 2.4.15 and higher?
  2001-12-10 14:11 unkillable zombies from using gdb and kernel 2.4.15 and higher? Kevin Hendricks
  2001-12-10 19:39 ` Michel Dänzer
@ 2001-12-10 20:31 ` Daniel Jacobowitz
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2001-12-10 20:31 UTC (permalink / raw)
  To: Kevin Hendricks; +Cc: linuxppc-dev


On Mon, Dec 10, 2001 at 09:11:30AM -0500, Kevin Hendricks wrote:
>
> Hi,
>
> I have been debugging a glibc-2.2.4 issue that involves forking and
> reaping and threads using gdb.  Unfortunately, every time I run things
> under gdb I create an "unkillable" zombie process that (even after gdb
> has gone away) is impossible to remove.

This should never happen.

There is a known bug in the kernel, for which Mark Kettenis has sent
patches several times but they keep slipping through cracks, which
makes exited threads live until the GDB controlling them exits.  I can
send you the patch if you need it.

> ps -Af | grep idlc
> kbhend   25532     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   25529     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   25541     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   25543     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   25540     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   25552     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   25554     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   25551     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   14796 10716  0 09:11 pts/4    00:00:00 grep idlc

Have you tried rebooting and repeating?  Could your init be fried?  It
ought to reap them.

Also check /proc/pid/status on a zombie.  What does it say?


> [root@localhost program]# kill -9 25530 25532 25529
> [root@localhost program]# ps -Af | grep idlc
> ....
> kbhend   25530     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   25532     1  0 Dec08 ?        00:00:00 [idlc]
> kbhend   25529     1  0 Dec08 ?        00:00:00 [idlc]
>
> So these zombies are ignoring kill -9  signals which I thought was a big
> no-no?
>
> Did something change in signal handling lately that allows this to
> happen?

You're not sending them signals.  They're already dead :P

--
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: unkillable zombies from using gdb and kernel 2.4.15 and higher?
  2001-12-10 20:20   ` Gabriel Paubert
@ 2001-12-10 20:55     ` Michel Dänzer
  2001-12-10 23:35       ` Gabriel Paubert
  0 siblings, 1 reply; 7+ messages in thread
From: Michel Dänzer @ 2001-12-10 20:55 UTC (permalink / raw)
  To: Gabriel Paubert; +Cc: Kevin Hendricks, linuxppc-dev


On Mon, 2001-12-10 at 21:20, Gabriel Paubert wrote:
>
>
> On 10 Dec 2001, Michel [ISO-8859-1] Dänzer wrote:
>
> >
> > On Mon, 2001-12-10 at 15:11, Kevin Hendricks wrote:
> >
> > > So these zombies are ignoring kill -9  signals which I thought was a big
> > > no-no?
> >
> > Zombies are dead, they don't get more dead if you kill them. ;)
> >
> > AFAIR zombies have died but are waiting for their return value to be
> > read out of the process table. I'd like to know myself how that can
> > happen when their parents are gone...
>
> They are reparented to init. One of init tasks is to reap all
> processes who lose their parents.

So how often does it do that? Can it be beaten into submission? :)


--
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: unkillable zombies from using gdb and kernel 2.4.15 and higher?
  2001-12-10 20:55     ` Michel Dänzer
@ 2001-12-10 23:35       ` Gabriel Paubert
  0 siblings, 0 replies; 7+ messages in thread
From: Gabriel Paubert @ 2001-12-10 23:35 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: Kevin Hendricks, linuxppc-dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN, Size: 1170 bytes --]


On 10 Dec 2001, Michel [ISO-8859-1] Dänzer wrote:

> On Mon, 2001-12-10 at 21:20, Gabriel Paubert wrote:
> >
> >
> > On 10 Dec 2001, Michel [ISO-8859-1] Dänzer wrote:
> >
> > >
> > > On Mon, 2001-12-10 at 15:11, Kevin Hendricks wrote:
> > >
> > > > So these zombies are ignoring kill -9  signals which I thought was a big
> > > > no-no?
> > >
> > > Zombies are dead, they don't get more dead if you kill them. ;)
> > >
> > > AFAIR zombies have died but are waiting for their return value to be
> > > read out of the process table. I'd like to know myself how that can
> > > happen when their parents are gone...
> >
> > They are reparented to init. One of init tasks is to reap all
> > processes who lose their parents.
>
> So how often does it do that? Can it be beaten into submission? :)

I believe init is more or less looping constantly reaping orphaned
processes, respawning the tty controlling ones (per inittab), and waiting
for signals for runlevel changes (once system startup is over). But check
the source...

It sounds more like a debugging related (ptrace ?) kernel bug.

	Gabriel.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-12-10 23:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-10 14:11 unkillable zombies from using gdb and kernel 2.4.15 and higher? Kevin Hendricks
2001-12-10 19:39 ` Michel Dänzer
2001-12-10 20:20   ` Gabriel Paubert
2001-12-10 20:55     ` Michel Dänzer
2001-12-10 23:35       ` Gabriel Paubert
2001-12-10 20:24   ` Roman Zippel
2001-12-10 20:31 ` Daniel Jacobowitz

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).