dhcpd-4.2.2 maxsocks problem

Bruce Hudson Bruce.Hudson at Dal.Ca
Fri Jan 13 19:11:19 UTC 2012


> at ../../../../lib/isc/unix/socket.c:959
>	in wakeup_socket (manager=0x28458000, fd=1024, msg=-3)

> ../../../../lib/isc/unix/socket.c:959:
>	INSIST(fd >= 0 && fd < (int)manager->maxsocks) failed

    I am perhaps a bit late coming into this discussion and previous
messages have quotes 4-5 levels deep so it is hard to see who said
what. Your problem is that the "INSIST" assertation above is not true.
The currect value of fd (1024 per the call to wakeup_socket) is not
strictly less than "maxsocks"; probably also 1024.

    As I think somebody has already posted, "maxsocks" comes from the
macro "ISC_SOCKET_MAXSOCKETS"; which probably comes from "FD_SETSIZE",
a system wide parameter. Normally FD_SETSIZE should not be less than 
NR_OPEN, the maximum number of file descriptors allowed. It would seem
that either your system has increased NR_OPEN without increasing 
FD_SETSIZE to match or this code was compiled on another system that
had a lower limit. 

    If you read the comments in the code, it may be possible to manually
set ISC_SOCKET_MAXSOCKETS higher than FD_SETSIZE and have things to work
but you are in dragon territory if you are not comfortable with kernel
internals; with apologies, far more comfortable than you have given 
evidence of in this thread.

    As as aside, recompiling the DHCP server will not fix this. The code
in question is part of "libbind", part of the BIND package and often
packaged as part of your OS. 
--
Bruce A. Hudson				| Bruce.Hudson at Dal.CA
ITS, Networks and Systems		|
Dalhousie University			|
Halifax, Nova Scotia, Canada		| (902) 494-3405



More information about the dhcp-users mailing list