Re: sendmail 8.9.0

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Wed, 27 May 1998 10:32:15 +0200 (MET DST)


Ben Castricum wrote:
>
> Hi,
>
> Has anyony paid some attention to sendmail 8.9.0's claim to have found a bug
> in the linux kernel? I quote a part of
> ftp://ftp.sendmail.org/pub/sendmail/KNOWNBUGS :
>
> * accept() problem on Linux.
> Apparently, the accept() in sendmail daemon loop can return ETIMEDOUT
> and cause sendmail to sleep for 5 seconds during which time no new
> connections will be accepted. An error is reported to syslog:
> Jun 9 17:14:12 hostname sendmail[207]: NOQUEUE: SYSERR(root):
> getrequests: accept: Connection timed out
> "Connection timed out" is not documented as a valid return from
> accept(2) and this is believed to be a bug in the Linux kernel.
>
> Just wondering..

The question is: what's wrong. The docs or the implementation?
I'd say the docs:

old version:

> ERRORS
> EBADF The descriptor is invalid.
>
> ENOTSOCK
> The descriptor references a file, not a socket.
>
> EOPNOTSUPP
> The referenced socket is not of type SOCK_STREAM.
>
> EFAULT The addr parameter is not in a writable part of the
> user address space.
>
> EWOULDBLOCK
> The socket is marked non-blocking and no connec-
> tions are present to be accepted.

new suggested addition:

EINVAL Some parameter is invalid. (e.g. socket state not appropriate)

ENOSR Out of system resources.

ETIMEDOUT
The initial connection setup timed out.

I couldn't find the ETIMEDOUT in the source. My fault probably.

2.1.102/net/ipv4/tcp.c says:

/* FIXME: need to check here if newsk has already
* an soft_err or err set.
* We have two options here then: reply (this behaviour matches
* Solaris) or return the error to the application (old Linux)
*/

This is what happened (Old linux): the error got returned to the
application. Maybe this issue is moot on newer linux kernels.

The manual page should certainly be updated. If your source-code
inspection shows other possible return values, or if you don't agree
with my additions, please reply. I'll send a patch to Andries Brouwer
in a few days.

Roger.

-- 
If it's there and you can see it, it's REAL      |___R.E.Wolff@BitWizard.nl  |
If it's there and you can't see it, it's TRANSPARENT |  Tel: +31-15-2137555  |
If it's not there and you can see it, it's VIRTUAL   |__FAX:_+31-15-2138217  |
If it's not there and you can't see it, it's GONE! -- Roy Wilks, 1983  |_____|

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu