ISC BIND 9.3.5-P2 is now available
Gary Mills
mills at cc.umanitoba.ca
Wed Aug 6 01:07:16 UTC 2008
In <g7arrk$27u0$1 at sf1.isc.org> The Doctor <doctor at doctor.nl2k.ab.ca> writes:
>On Sun, Aug 03, 2008 at 12:24:28AM -0700, JINMEI Tatuya / ?$B?@L at C#:H wrote:
>> At Sat, 2 Aug 2008 11:21:47 -0600,
>> The Doctor <doctor at doctor.nl2k.ab.ca> wrote:
>> >
>> > I do not see this in the P1, but is plaguing the P2s:
>>
>> > Aug 2 11:15:25 doctor named[14742]: socket.c:485: unexpected error:
>> > Aug 2 11:15:25 doctor named[14742]: fcntl(512, F_SETFL, -1): Bad file descriptor
>>
>> Try specifying a small value such as 32 for the reserved-sockets
>> option:
>Interesting. Here is what I have found:
>doctor.nl2k.ab.ca//usr/source/selecttest$ ./selecttest
>selecttest: nsocks = 4093, TEST_FDSETSIZE = -1, FD_SETSIZE = 1024, sizeof fd_set
> = 128
>opening 62th socket failed: Too many open files
>doctor.nl2k.ab.ca//usr/source/selecttest$ ./selecttest -r
>selecttest: nsocks = 4093, TEST_FDSETSIZE = -1, FD_SETSIZE = 1024, sizeof fd_set
> = 128
>created 4093 sockets, maxfd = 4095
>FD_CLR test...OK
>FD_SET test...OK
>select test...OK
Here's what I get on Solaris 9, first as an ordinary user...
<mills at hadar:237>$ ./selecttest
selecttest: nsocks = 4093, TEST_FDSETSIZE = -1, FD_SETSIZE = 1024, sizeof fd_set = 128
opening 254th socket failed: Too many open files
<mills at hadar:238>$ ./selecttest -r
selecttest: nsocks = 4093, TEST_FDSETSIZE = -1, FD_SETSIZE = 1024, sizeof fd_set = 128
set resource limit: Not owner
<mills at hadar:241>$ ./selecttest 250
selecttest: nsocks = 4093, TEST_FDSETSIZE = -1, FD_SETSIZE = 1024, sizeof fd_set = 128
created 250 sockets, maxfd = 252
FD_CLR test...OK
FD_SET test...OK
select test...OK
Now, as root...
# ./selecttest -r
selecttest: nsocks = 4093, TEST_FDSETSIZE = -1, FD_SETSIZE = 1024, sizeof fd_set = 128
created 4093 sockets, maxfd = 4095
FD_CLR test...OK
FD_SET test...OK
select: Invalid argument
select test...
# ./selecttest -r 1022
selecttest: nsocks = 4093, TEST_FDSETSIZE = -1, FD_SETSIZE = 1024, sizeof fd_set = 128
created 1022 sockets, maxfd = 1024
FD_CLR test...OK
FD_SET test...OK
select: Invalid argument
select test...
# ./selecttest -r 1020
selecttest: nsocks = 4093, TEST_FDSETSIZE = -1, FD_SETSIZE = 1024, sizeof fd_set = 128
created 1020 sockets, maxfd = 1022
FD_CLR test...OK
FD_SET test...OK
select test...OK
Here's the explanation, from the select man page:
EINVAL The nfds argument is less than 0 or greater than
FD_SETSIZE.
It also contains this statement:
The poll(2) function is preferred over this function. It
must be used when the number of file descriptors exceeds
FD_SETSIZE.
sendmail uses poll for Solaris.
Now, bind-9.3.5-P2 works nicely under Solaris 9, at least on a
quiet server. The number of file descriptors used for sockets is
low, in the 10 to 30 range. Here's an example:
# pfiles 4013 | grep S_IFSOCK | wc -l
13
CPU usage is generally also reasonable.
select() works correctly because bind always sets `files = FD_SETSIZE'
and then reserves 512 of them.
I'm about to start bind-9.3.5-P2 on a busier server, replacing
bind-9.3.2-P2. I don't expect any problems.
--
-Gary Mills- -Unix Support- -U of M Academic Computing and Networking-
More information about the bind-users
mailing list