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

Re: Scheduler dumps core; problem with sfio?



On 8/18/06, Matti Aarnio <mea@nic.funet.fi> wrote:
> On Fri, Aug 18, 2006 at 06:02:19PM +0100, Darryl Miles wrote:
> > Linux FD_SET/select implementation can only deal with 1024 fds by default.
> >
> > Even if you raise the limit you need to audit all your dependant
> > libraries for FD_SET usage as well, and fix them use poll().
> >
> > A quick grep of scheduler/*.c shows select() is used in there.
> >
> > One possible reason for the crash is that calling FD_SET(1025,
> > &fdsetfoobar)  will compile without warning and appear to execute
> > without crashing on that line, but it actually scribbles over memory,
> > exacly 1 byte over the end of the 'fd_set fdsetfoobar' structure.
>
> Good point..   I have been modifying code to use  poll() -- which
> in this case would be The Solution.

Since in the CVSHEAD only router(8) uses zmpoll, I tried porting
zmpoll to scheduler(8) also.  As far as I can tell, the code is running
quite well in my environment (I'm running with about ~5000 acrtive
transport agents), but this may be beginner's luck.

Mailq-related parts of the transport.c still use select(2) which I guess
is BAD, but scheduler seems to be working nonetheless.  I am unsure
if I did notifysocket and qquerysocket the right way.  And since it
is always good to release early, release often I hereby await your
consuell and support.

   Regards,
       Dawid

zmailer-scheduler-poll.patch