DCC: accept() returned invalid socket (Result too large), try again

Vernon Schryver vjs@calcite.rhyolite.com
Wed Jul 16 23:13:24 UTC 2003

> From: darkmark <darkmark@filament.org>

> > What is FD_SETSIZE?
> 1024

That sounds bad for a process that might have 2200 open files.

I guess Solaris is not the only system with such preverted notions.
At least Solaris has the System V STREAMS poll() that can be
used on file descriptors larger than FD_SETSIZE.

I guess I'll have to add code to limit the maximum job queue based on
FD_SETSIZE as well as the current RLIMIT_NOFILE cap.

> ...
> > When the problem happens, what do netstat or fstat (or equivalent)
> > say about the number of active SMTP sessions?  Could there be 500
> > stalled mail messages, perhaps due to some sort of "teergruber"?
> I didn't check, but there were only 8 messages delivered with this error,
> before I noticed and (stupidly w/o troubleshooting) restarted dccm, and
> only a single message logged after that.

 From that I doubt that the FD_SETSIZE limit matters except in the
unusual circumstances that are triggering this problem.

It occurs to me that the underlying theory that the problem is
related to the number open files and FD_SETSIZE is worse than
unproven.  It is not select() that is whining but accept(). 
I wonder if somehow the FD that accept is using has been trashed.

Vernon Schryver    vjs@rhyolite.com

More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.