Bug: INN 2.2.1, Linux 2.2, getfdcount()

Ray Rocker rocker at datasync.com
Sun Dec 5 06:20:22 UTC 1999

This may more properly be a Linux bug but it has detrimental 
effects on innd.

Platform: Slackware Linux 4.0, kernel 2.2.6, INN 2.2.1 latest 
stable snapshot.

The configure script selects FDCOUNT_STYLE of SYSCONF. This causes
getfdcount (getdtab.c) to use sysconf() to get the max number of
file descriptors. But sysconf returns the wrong value of 256. 
Linux 2.2 actually allows 1024 fds per process.

I have a setup where the number of cycbuffs plus the number of 
uniover files exceeds 256. When a new connection came in to
innd, the fd was over 256. NCcreate creates a CHANNEL with 
garbage data, because the CHANtable has only been initialized
to 256 elements. Boom! SIGSEGV.

getrlimit() seems to be the only method which returns 1024 as
the max number of fds. By changing config/config.data to
use FDCOUNT_STYLE of GETRLIMIT and doing make & make update,
I was able to get innd operational again.


Ray Rocker
rocker at datasync.com

More information about the inn-bugs mailing list