Re: disappearing zombie thread (not process)
From: David Schwartz (davids_at_webmaster.com)
Date: 07/18/03
- Next message: Grant Edwards: "Re: Memory Mapped I/O"
- Previous message: Bernd Falk: "Memory Mapped I/O"
- In reply to: Rainer Birkenmaier: "Re: disappearing zombie thread (not process)"
- Next in thread: Kaz Kylheku: "Re: disappearing zombie thread (not process)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 18 Jul 2003 12:01:53 -0700
"Rainer Birkenmaier" <rbrk@bigfoot.de> wrote in message
news:bf8j63$s5e$1@news.mch.sbs.de...
> David Schwartz <davids@webmaster.com> wrote:
> > What is a "zombie thread"?
> More or less the same than a zombie process just that it's a thread. ps
> gives this (when the program that I posted has just been started):
> # ps auxw | grep zom
> root 5353 76.5 0.0 3556 380 pts/4 R 11:49 0:01
./zombie_threads
> root 5354 0.0 0.0 3556 380 pts/4 S 11:49 0:00
./zombie_threads
> root 5355 0.0 0.0 0 0 pts/4 Z 11:49 0:00
[zombie_threads] <defunct>
What you're seeing is not really a zombie thread. It's a zombie KSE
(kernel scheduling entity).
> > You seem to think that pthread_join maps to wait.
> Yep, that's more or less what I thought but from your answer I
> understand it's not like that!
> What keeps me busy is, that the zombie only disapears after something
> like 2 or 3 seconds (on my Laptop, a PIII 650Mhz). If the
> controll-thread takes care of it I'd expect it to disappear immediately
I doubt it's considered a high-priority task by the manager thread.
> ... and still: Is there a chance to have the zombie stay there (other than
that
> the controll-thread is malfunctioning) ... since I have this with
> a large application that I'm looking at?
So long as you either create your threads detached, detach them later,
or join them, you should not leak resources created internally for a thread,
that includes KSEs.
DS
- Next message: Grant Edwards: "Re: Memory Mapped I/O"
- Previous message: Bernd Falk: "Memory Mapped I/O"
- In reply to: Rainer Birkenmaier: "Re: disappearing zombie thread (not process)"
- Next in thread: Kaz Kylheku: "Re: disappearing zombie thread (not process)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]