From owner-freebsd-questions Tue May 26 09:31:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA28505 for freebsd-questions-outgoing; Tue, 26 May 1998 09:31:59 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dan.emsphone.com (dan@dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA28406 for ; Tue, 26 May 1998 09:30:33 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.8.8/8.8.8) id LAA01439; Tue, 26 May 1998 11:30:25 -0500 (CDT) (envelope-from dan) Message-ID: <19980526113025.A1334@emsphone.com> Date: Tue, 26 May 1998 11:30:25 -0500 From: Dan Nelson To: Dean Hollister Cc: FreeBSD Questions Subject: Re: Killing zombie processes References: <19980526104900.A1032@emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.92.4i In-Reply-To: ; from "Dean Hollister" on Wed May 27 00:00:48 GMT 1998 X-OS: FreeBSD 2.2.6-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (May 27), Dean Hollister said: > On Tue, 26 May 1998, Dan Nelson wrote: > > When you say "killing the parent doesn't work", do you mean that > > killing the parent did NOT remove the child's pid, or you couldn't > > even kill the parent at all? What does a 'ps axl' print for the > > processes? > > I could not kill the parent at all. > > bash$ ps -t /dev/ttyv0 > PID TT STAT TIME COMMAND > 4803 v0- IEs+ 0:00.00 (sh) > 4994 v0- Z+ 0:00.00 (tail) > > See? Here, the sh process will not exit, because of the zombie. It is > trying to exit, but can't. It's definitely trying to exit, but the zombie probably isn't stopping it. Zombies are processes that have exited completely, but the parent hasn't checked the returnvalue for them yet. i.e. the tail command has finished, and the only remnant of that process is the slot in the process table (which will be removed once the parent exits or does a wait() ). The only resource a zombie takes up is one process table entry. Do a "ps axl -t v0", and see what's under the "WCHAN" column for pid 4803. That's the kernel event the process is waiting for. If it says "ttywai", it's trying to write something to the console (make sure scroll-lock isn't on). -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message