[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parent router leaks file descriptors



On Fri, 2002-10-04 at 18:56, Matti Aarnio wrote:
> On Fri, Oct 04, 2002 at 04:14:51PM +0300, Matti Aarnio wrote:
> > > I was bitten by a problem: when child routers die (with segfault, I am
> > > attaching a message that triggers this) the parent preocess forks a new
> > > child but in process of that, it eventually runs out of file descriptors
> > > and fails to start any more children.  Then it starts to just busyloop
> > > on pipe() call (if memory serves; anyway on some call that fails with
> > > indication of no more descriptors).
> > 
> >   Hmm.. seg-faults should not happen, neither leaks...
> >   I have things to debug, thanks for the experiment case.
> 
>   The leakage has been arrested (easy to simulate with  kill -9
>   at Solaris, and look what  lsof  tells of the parent process..)

The problem was observed on Linux.
Now, daemonsub.c does not compile (on Linux):

/usr/local/src/zmailer/zmailer/router/daemonsub.c: In function
`sig_chld':
/usr/local/src/zmailer/zmailer/router/daemonsub.c:320: warning: implicit
declaration of function `wait3'
/usr/local/src/zmailer/zmailer/router/daemonsub.c:320: `WNOHANG'
undeclared (first use in this function)
/usr/local/src/zmailer/zmailer/router/daemonsub.c:320: (Each undeclared
identifier is reported only once
/usr/local/src/zmailer/zmailer/router/daemonsub.c:320: for each function
it appears in.)
/usr/local/src/zmailer/zmailer/router/daemonsub.c: In function
`reader_getc':
/usr/local/src/zmailer/zmailer/router/daemonsub.c:373: warning: implicit
declaration of function `WIFSIGNALED'
/usr/local/src/zmailer/zmailer/router/daemonsub.c:374: warning: implicit
declaration of function `WSIGNALSTATUS'
/usr/local/src/zmailer/zmailer/router/daemonsub.c:375: warning: implicit
declaration of function `WIFEXITED'
/usr/local/src/zmailer/zmailer/router/daemonsub.c:376: warning: implicit
declaration of function `WEXITSTATUS'
make: *** [daemonsub.o] Error 1


-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi