> Dear mailinglist members,
>
> I have an serious issue with bind.
>
> System information:
> Dual P3 1 GHz
> 6.1-RELEASE-p12 FreeBSD
> SMP kernel
>
> I'm running BIND 9.3.2 on this box (the one that is standard delivered with
> 6.1)
> And when the named is running for a copple of hours. Bind doesn't accept TCP
> connections
> and i see this in my /var/log/messages:
>
> Feb 8 06:44:13 gms01 named[417]:
> /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/socket.c:1876:
> unexpected error:
> Feb 8 06:44:13 gms01 named[417]: internal_accept: accept() failed: Invalid
> argument
> Feb 8 06:46:55 gms01 named[417]:
> /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/socket.c:1876:
> unexpected error:
> Feb 8 06:46:55 gms01 named[417]: internal_accept: accept() failed: Invalid
> argument
> Feb 8 06:47:43 gms01 named[417]:
> /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/socket.c:1876:
> unexpected error:
> Feb 8 06:47:43 gms01 named[417]: internal_accept: accept() failed: Invalid
> argument
> Feb 8 07:00:08 gms01 named[417]:
> /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/socket.c:1876:
> unexpected error:
> Feb 8 07:00:08 gms01 named[417]: internal_accept: accept() failed: Invalid
> argument
> Feb 8 07:00:13 gms01 named[417]:
> /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/socket.c:1876:
> unexpected error:
> Feb 8 07:00:13 gms01 named[417]: internal_accept: accept() failed: Invalid
> argument
>
> Does anybody knows what this is ?


addrlen = sizeof(dev->newsocket->address.type);
memset(&dev->newsocket->address.type.sa, 0, addrlen);
fd = accept(sock->fd, &dev->newsocket->address.type.sa,
(void *)&addrlen);

The accept() system call will fail if:

[EBADF] The descriptor is invalid.

[EINTR] The accept() operation was interrupted.

[EMFILE] The per-process descriptor table is full.

[ENFILE] The system file table is full.

[ENOTSOCK] The descriptor references a file, not a socket.

[EINVAL] listen(2) has not been called on the socket descrip-
tor.

[EINVAL] The addrlen argument is negative.

[EFAULT] The addr argument is not in a writable part of the
user address space.

[EWOULDBLOCK] The socket is marked non-blocking and no connections
are present to be accepted.

[ECONNABORTED] A connection arrived, but it was closed while waiting
on the listen queue.


Well it can't be "The addrlen argument is negative." see code
snippet.

Which only leaves "listen(2) has not been called on the
socket descriptor."

Which I also seriously doubt. I suspect you have found a
kernel bug.

Mark

> I have an exact copy this server running next to this one.
> But that server is not SMP and it doesn't have this problems.
>
> Kind regards,
>
> Steven Bens
> CEO Unix-Solutions
> www.Unix-Solutions.be
>
>
>
>

--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: Mark_Andrews@isc.org