Messages in this thread Patch in this message | | | Subject | Re: Sendmail 8.9.0 claims a Linux kernel bug | From | Ben Gertzfield <> | Date | 24 Jun 1998 19:40:18 -0700 |
| |
>>>>> "Andi" == Andi Kleen <ak@muc.de> writes:
(from the Sendmail KNOWN-BUGS file)
>> 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.
Andi> This is no kernel bug, but an intentional change from Andi> BSD/Solaris semantics. Linux accept() returns errors for Andi> failed connection attempts unlike BSD which drops them.
Ah hah!
Andi> It is a documentation bug if the manpage does not state Andi> that.
Then let's document it. Who's the current maintainer of the kernel manpages?
In any case, here's a preliminary patch to sendmail to fix this problem for Linux. Is #ifdef __linux__ the right way to check if we're compiling under Linux?
Are there any errors we should ignore besides ETIMEDOUT and EHOSTUNREACH?
I'm forwarding this to the Sendmail people, as well.
Ben
diff -ruN sendmail-8.9.0.orig/src/daemon.c sendmail-8.9.0/src/daemon.c --- sendmail-8.9.0.orig/src/daemon.c Tue May 19 16:36:06 1998 +++ sendmail-8.9.0/src/daemon.c Wed Jun 24 19:35:13 1998 @@ -293,7 +293,12 @@ lotherend = socksize; t = accept(DaemonSocket, (struct sockaddr *)&RealHostAddr, &lotherend); +#ifdef __linux__ + if (t >= 0 || (errno != EINTR && errno != ETIMEDOUT + && errno != EHOSTUNREACH)) +#else if (t >= 0 || errno != EINTR) +#endif break; } savederrno = errno; -- Brought to you by the letters A and K and the number 14. "Everybody wants prosthetic foreheads on their real heads." -- TMBG Debian GNU/Linux -- where do you want to go tomorrow? http://www.debian.org/ I'm on FurryMUCK as Che, and EFNet and YiffNet IRC as Che_Fox.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |