Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* clearing out zombie processes
@ 1997-07-31  4:00 Robert Moniot
  1997-08-01  4:00 ` Alan Hughes
       [not found] ` <33E78839.59E2@zk3.dec.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Moniot @ 1997-07-31  4:00 UTC (permalink / raw)



Hi.

Lately some of our users have been generating zombie processes.  These
are processes that ps calls "defunct", i.e.  a process that has exited
but whose parent process has not waited for it.  The parent process is
either 1 (init) or another defunct process whose parent is 1.  Trying
to kill these defunct processes gives the message "no such process",
but they continue to tie up tty's.  (These particular ones are on LAT
tty's, of which we have defined a limited number.)  Is there any way
to clear these zombies out of the process table other than rebooting?

We are running OSF1 V4.0 on an AlphaStation 1000.

Thanks,


Bob Moniot
Fordham University                  email:  moniot@dsm.fordham.edu
Fordham College at Lincoln Center   URL:    http://www.dsm.fordham.edu/~moniot/
New York, NY  10023                 phone:  (212) 636-6311



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

* Re: clearing out zombie processes
  1997-07-31  4:00 clearing out zombie processes Robert Moniot
@ 1997-08-01  4:00 ` Alan Hughes
  1997-08-04  4:00   ` Robert Moniot
       [not found] ` <33E78839.59E2@zk3.dec.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Alan Hughes @ 1997-08-01  4:00 UTC (permalink / raw)



Robert Moniot wrote:
> 
> Lately some of our users have been generating zombie processes.  These
> are processes that ps calls "defunct", i.e.  a process that has exited
> but whose parent process has not waited for it.  The parent process is
> either 1 (init) or another defunct process whose parent is 1.  Trying
> to kill these defunct processes gives the message "no such process",
> but they continue to tie up tty's.  (These particular ones are on LAT
> tty's, of which we have defined a limited number.)  Is there any way
> to clear these zombies out of the process table other than rebooting?
> 
> We are running OSF1 V4.0 on an AlphaStation 1000.

Terminate the parent processes; once they are gone the zombies will be
cleaned up by the init process (PID = 0).

This is an inherent feature of Unix in general (*not* just DU). It shows
that someone has not designed an application well!

Alan Hughes
Consultant
VEGA Group PLC



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

* Re: clearing out zombie processes
  1997-08-01  4:00 ` Alan Hughes
@ 1997-08-04  4:00   ` Robert Moniot
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Moniot @ 1997-08-04  4:00 UTC (permalink / raw)



Alan Hughes <alan.hughes@vegauk.co.uk> writes:

> 
> Robert Moniot wrote:
> > 
> > Lately some of our users have been generating zombie processes.  These
> > are processes that ps calls "defunct", i.e.  a process that has exited
> > but whose parent process has not waited for it.  The parent process is
> > either 1 (init) or another defunct process whose parent is 1.  Trying
> > to kill these defunct processes gives the message "no such process",
> > but they continue to tie up tty's.  (These particular ones are on LAT
> > tty's, of which we have defined a limited number.)  Is there any way
> > to clear these zombies out of the process table other than rebooting?
> > 
> > We are running OSF1 V4.0 on an AlphaStation 1000.
> 
> Terminate the parent processes; once they are gone the zombies will be
> cleaned up by the init process (PID = 0).
> 

Thanks, but this doesn't work.  The zombies have init (PID=1, not 0)
as their parent process.  Is there a way to kill init without
rebooting?  I have tried killing init with the -1 signal but this
doesn't clear out the zombies.  What happens if I kill it with -9?
Can it be killed and restarted without causing all kinds of havoc?

> This is an inherent feature of Unix in general (*not* just DU). It shows
> that someone has not designed an application well!
> 

I guess that means Digital hasn't designed getty well!

-- 

Bob Moniot
Fordham University                  email:  moniot@dsm.fordham.edu
Fordham College at Lincoln Center   URL:    http://www.dsm.fordham.edu/~moniot/
New York, NY  10023                 phone:  (212) 636-6311



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

* Re: clearing out zombie processes
       [not found] ` <33E78839.59E2@zk3.dec.com>
@ 1997-08-05  4:00   ` Mark Fisher
  1997-08-08  4:00   ` Robert Moniot
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Fisher @ 1997-08-05  4:00 UTC (permalink / raw)



Jeff,

	Do you have any documentation, or can point me to some, that
describes the dbx commands you provided? Are there any books on
troubleshooting system problems like this using dbx or kdbx?

	Thanks in advance,

	Mark

Jeff Denham wrote:
> 
> Can I see some ps output that shows these zombies with process
> 1 (init) as the parent?
> 
> Then do this for me, as root:
> 
> # dbx -k /vmunix
> (dbx) p utsname
> (dbx) set $pid=PID-OF-ZOMBIE-WITH-INIT-AS-PARENT
> (dbx) tstack
> (dbx) p ((thread_t)$tid).stack.uthread.utask.uu_comm
> 
> And post or send me the output.
> 
> Thanks.
> 
> --
> Jeff Denham, Unix Software Group, Digital Equipment Corporation
> email: denham@zk3.dec.com, voice: (603) 881-0057



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

* Re: clearing out zombie processes
       [not found] ` <33E78839.59E2@zk3.dec.com>
  1997-08-05  4:00   ` Mark Fisher
@ 1997-08-08  4:00   ` Robert Moniot
  1 sibling, 0 replies; 5+ messages in thread
From: Robert Moniot @ 1997-08-08  4:00 UTC (permalink / raw)



Jeff Denham <denham@zk3.dec.com> writes:

> 
> Can I see some ps output that shows these zombies with process
> 1 (init) as the parent?
> 
> Then do this for me, as root:
> 
> # dbx -k /vmunix
> (dbx) p utsname
> (dbx) set $pid=PID-OF-ZOMBIE-WITH-INIT-AS-PARENT
> (dbx) tstack
> (dbx) p ((thread_t)$tid).stack.uthread.utask.uu_comm
> 

Here it is:
Script started on Fri Aug  8 13:03:51 1997
# who
 [other users trimmed for security purposes]
reyes       tty06       Jul 29 00:56
reyes       tty07       Jul 23 23:34
reyes       tty0g       Jul 29 00:09
moniot      ttyp3       Aug  8 12:50
# ps -lu reyes
       F S      UID   PID  PPID    C PRI  NI   ADDR   SZ WCHAN    TTY             TIME CMD
80008401   <    393   567     1  0.0   0 -44      -   0K -        ??           0:00.00 <defunct>
80808441   <    393  7332   567  0.0   0 -44      -   0K -        ??           0:00.00 <defunct>
80008401   <    393 19638     1  0.0   0 -44      -   0K -        ??           0:00.00 <defunct>
80808441   <    393 21079 19638  0.0   0 -44      -   0K -        ??           0:00.00 <defunct>
80008401   <    393 21766     1  0.0   0 -44      -   0K -        ??           0:00.00 <defunct>
80808441   <    393 23116 21766  0.0   0 -44      -   0K -        ??           0:00.00 <defunct>
#  dbx -k /vmunix
dbx version 3.11.10
Type 'help' for help.

stopped at  [thread_block:2025 ,0xfffffc00002a8270]	 Source not available

warning: Files compiled -g3: parameter values probably wrong
(dbx) p utsname
struct {
    sysname = "OSF1"
    nodename = "erdos"
    release = "V4.0"
    version = "386"
    machine = "alpha"
}
(dbx) set $pid=21766
warning: thread 0xfffffc000fa61600 appears to be swapped out
(dbx) tstack

Thread 0xfffffc000fa61600:
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
>  0 thread_block() ["../../../../src/kernel/kern/sched_prim.c":2022, 0xfffffc00002a826c]
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
   1 mpsleep(0x0, 0xffffffff90eaf540, 0x0, 0x0, 0x0) ["../../../../src/kernel/bsd/kern_synch.c":539, 0xfffffc00002733d4]
   2 streams_mpsleep(0xfffffc000228ea00, 0x0, 0x0, 0x0, 0xfffffc000c6850f8) ["../../../../src/kernel/streams/str_env.c":574, 0xfffffc0000441b68]
   3 latsclose(0xfffffc000044fe5c, 0x0, 0xfffffc000066b5b0, 0xfffffc000044fe10, 0xffffffff90eaf620) ["../../../../src/kernel/lat/streams/latclose.c":168, 0xffffffff90d4dee0]
   4 close_wrapper(0xfffffc000066b5b0, 0xfffffc000044fe10, 0xffffffff90eaf620, 0x0, 0xfffffc0000451444) ["../../../../src/kernel/streams/str_subr.c":317, 0xfffffc000044fe58]
   5 csq_protect(q1 = 0xfffffc000398e600, q2 = 0xfffffc000398e6e8, func = 0xfffffc000044fe10, arg = 0xffffffff90eaf620, sq = 0xfffffc000c6850f8, which = 0) ["../../../../src/kernel/streams/str_synch.c":770, 0xfffffc0000451440]
   6 osr_pop_subr(0x0, 0xfffffc000c6850f8, 0xfffffc000398e600, 0x400, 0xfffffc000c685000) ["../../../../src/kernel/streams/str_osr.c":1682, 0xfffffc0000446e78]
More (n if no)?
   7 osr_close_subr(osrq = 0xffffffff90eaf6f8) ["../../../../src/kernel/streams/str_scalls.c":1339, 0xfffffc000044cde4]
   8 pse_close(dev = 6180456, flag = 6180456, mode = 6180456, cred = (nil), private = warning: thread 0xfffffc000fa61600 appears to be swapped out
(nil)) ["../../../../src/kernel/streams/str_scalls.c":1190, 0xfffffc000044ca0c]
   9 speclose(0x2000, 0xfffffc000bf7a900, 0x2, 0x0, 0xffffffffffffffff) ["../../../../src/kernel/vfs/spec_vnops.c":2449, 0xfffffc000048d54c]
  10 clearalias(0x0, 0xffffffff80808401, 0xfffffc00001fbfe8, 0xfffffc000c685000, 0xfffffc0000000002) ["../../../../src/kernel/vfs/spec_vnops.c":1157, 0xfffffc000048b2c8]
  11 exit(0xfffffc0000659040, 0xfffffc000f6d0000, 0x100, 0xfffffc000fcb2ca0, 0xfffffc0000000001) ["../../../../src/kernel/bsd/kern_exit.c":1008, 0xfffffc000025d1f8]
  12 rexit(0x100, 0xfffffc000fcb2ca0, 0xfffffc0000000001, 0xfffffc000fa61600, 0xfffffc00004eeb94) ["../../../../src/kernel/bsd/kern_exit.c":755, 0xfffffc000025cb68]
  13 syscall(0x0, 0x11fffccf0, 0x6661133dd78e4, 0x120014800, 0x1) ["../../../../src/kernel/arch/alpha/syscall_trap.c":540, 0xfffffc00004eeb90]
  14 _Xsyscall(0x8, 0x3ff800d5f98, 0x3ffc00931b0, 0x1, 0x0) ["../../../../src/kernel/arch/alpha/locore.s":1173, 0xfffffc00004e5dc4]
(dbx) p ((thread_t)$tid).stack.uthread.utask.uu_comm
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
warning: thread 0xfffffc000fa61600 appears to be swapped out
"tcsh"
More (n if no)?
(dbx) quit
# exit

script done on Fri Aug  8 13:04:52 1997


--

Bob Moniot
Fordham University                  email:  moniot@dsm.fordham.edu
Fordham College at Lincoln Center   URL:    http://www.dsm.fordham.edu/~moniot/
New York, NY  10023                 phone:  (212) 636-6311



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

end of thread, other threads:[~1997-08-08  4:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-07-31  4:00 clearing out zombie processes Robert Moniot
1997-08-01  4:00 ` Alan Hughes
1997-08-04  4:00   ` Robert Moniot
     [not found] ` <33E78839.59E2@zk3.dec.com>
1997-08-05  4:00   ` Mark Fisher
1997-08-08  4:00   ` Robert Moniot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox