Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Dec 1997 10:59:10 -0500 (EST)
From:      "David E. Cross" <dec@phoenix.its.rpi.edu>
To:        "J. Weatherbee - Senior Systems Architect" <jamil@acroal.com>
Cc:        Andrew Atrens <atrens@nortel.ca>, hackers@FreeBSD.ORG
Subject:   Re: dealing with zombies
Message-ID:  <Pine.BSF.3.96.971209105628.402A-100000@phoenix.its.rpi.edu>
In-Reply-To: <Pine.BSF.3.96.971208124226.4982A-100000@acroal.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Dec 1997, J. Weatherbee - Senior Systems Architect wrote:

> 
> As I recall under linux setting up a signal handler that excutes waitpid()
> is not necessary if you are set (by default) to ignore SIGCHLD.
I believe that is true under POSIX.

> On 8 Dec 1997, Andrew Atrens wrote:
> 
> > Hi All,
> > 
> > I'm eval'ing Wordperfect-7.0-for-Linux on `FreeBSD 3.0-971012-SNAP'  and am
> > seeing lots of zombies:
> > 
> >  1446  ??  Z      0:00.00  (xwpthes)
> >  1460  ??  Z      0:00.00  (xwpgmk5)
> >  1461  ??  Z      0:00.00  (xwpspell)
> >  1462  ??  Z      0:00.00  (xwpspell)
> >  1467  ??  Z      0:00.00  (wpp7)
> >  1471  ??  Z      0:00.00  (xwpspell)
> >  1472  ??  Z      0:00.00  (xwpspell)
> >  1473  ??  Z      0:00.00  (xwpspell)
> >  1513  ??  Z      0:00.00  (xwpthes)
> >  1514  ??  Z      0:00.00  (xwpthes)
> >  1531  ??  Z      0:00.00  (xwpthes)
> >  1532  ??  Z      0:00.00  (xwpthes)
> >  1533  ??  Z      0:00.00  (xwpthes)
> >  1543  ??  Z      0:00.00  (xwpthes)
> >  1551  ??  Z      0:00.00  (xwpthes)
> >  
> > As I understand, the root cause is that (xwp) is failing to reap dead children. 
> > However, the children *do* get reaped when I exit xwp... it seems that
> > as long as xwp is running, no reaping is done, and the zombies accumulate...:(
> > 
> > What I'm wondering is:
> > 
> > i.   Is this a fault/feature of the app (xwp), the linux emulation code, or
> >      the kernel (in a larger sense), and
> > ii.  are there any *good* workarounds. ( I seem to recall some discussion about
> >      a tunable kernel parm for auto-reap or some such thing? )

What actually happens is when xwp exists the 'parent' process dies, this
causes the PPID of the children to be set to '1' (init).  init is always
in a loop that reaps the exit code of all of its children.  Since the
orphaned xwp processes have been 'adopted' by init, all those procs go
away.

(Sorry if this has already been said... my net connection has been down
since 1:00am.)

--
David Cross





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971209105628.402A-100000>