home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 22963 < prev    next >
Encoding:
Text File  |  1993-01-06  |  2.3 KB  |  53 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!agate!boulder!ophelia!drew
  3. From: drew@ophelia.cs.colorado.edu (Drew Eckhardt)
  4. Subject: Re: What causes these Zombie processes?
  5. Message-ID: <1993Jan6.221108.15082@colorado.edu>
  6. Sender: news@colorado.edu (The Daily Planet)
  7. Nntp-Posting-Host: ophelia.cs.colorado.edu
  8. Organization: University of Colorado at Boulder
  9. References: <1798@emoryu1.cc.emory.edu>
  10. Date: Wed, 6 Jan 1993 22:11:08 GMT
  11. Lines: 40
  12.  
  13. In article <1798@emoryu1.cc.emory.edu> splee@pd.org (Seng-Poh Lee, Speedy) writes:
  14. >After running for a few days, my Linux system ends up with quite a
  15. >few 'Zombie' processes. I can't kill them off, even with kill -9 and
  16.  
  17. Of course not.  They're already dead.
  18.  
  19. >the only way to get rid of them is with a reboot. This is a typical 
  20. >'ps -aux' screen after a few days.
  21. >
  22. >USER       PID %CPU %MEM SIZE  RSS TT STAT START   TIME COMMAND
  23. >root       318  0.0  0.0   96    0 ?  Z    08:21   0:00 <defunct>
  24. >root       319  0.0  0.0   96    0 ?  Z    08:44   0:00 <defunct>
  25. >root       341  0.0  0.0   96    0 ?  Z    08:58   0:00 <defunct>
  26. >
  27. >Notice that the processes are all 96k in size. The process number still
  28. >shows up in the /proc partition, but I don't know how to get any info
  29. >from that. I'm open to suggestions and advice. 
  30.  
  31. When a process terminates, its process table entry lingers around so 
  32. that its parent can find the exit code or signal that terminated 
  33. the process, and weather or not a core-dump was generated.  To find 
  34. out the exit status, the parent process must do some sort of wait()
  35. system call, after which that process table entry is deallocated. 
  36. If the parent fails to do this, you have zombie processes.
  37.  
  38. Note that the process's memory is deallocted (ie, RSS (resident set size)
  39. is zero), although you may still crash things when you run out of process
  40. table entries.
  41.  
  42. Like I said, you can't kill these processes since they are already 
  43. dead.  However, if you kill the parent (do a ps -l and look at the 
  44. PPID (parent process id) field), they will be inherited by init (process
  45. 1), which will wait for them, and they will disappear.  
  46.  
  47. After killing their parent, you can restart it.
  48.  
  49. -- 
  50. Boycott AT&T for their absurd anti-BSDI lawsuit. | Drew Eckhardt
  51. Condemn Colorado for Amendment Two.         | drew@cs.colorado.edu
  52. Use Linux, the fast, flexible, and free 386 unix |  
  53.