Date: Wed, 7 Mar 2001 23:38:54 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: Blaz Zupan <blaz@amis.net> Cc: hackers@FreeBSD.ORG, jlemon@FreeBSD.ORG Subject: Re: PATCH: workaround for FreeBSD 4.2-STABLE (fwd) Message-ID: <20010307233854.A18351@fw.wintelcom.net> In-Reply-To: <Pine.BSF.4.33.0103080804200.61740-100000@titanic.medinet.si>; from blaz@amis.net on Thu, Mar 08, 2001 at 08:04:57AM %2B0100 References: <Pine.BSF.4.33.0103080804200.61740-100000@titanic.medinet.si>
index | next in thread | previous in thread | raw e-mail
cc'd J Lemon because I think he's the one that made do the
ECONNABORTED (sp?)
* Blaz Zupan <blaz@amis.net> [010307 23:05] wrote:
> Anybody know which bug Wietse is talking about?
It could be a mistake, but it seems like there might be a problem
if:
client connects to server
client sends data
client closes socket
server tries an accept
It looks like the server won't get the buffered data, only a
notification that a connection aborted when in reality it was just
close()'d by the client before accept() could be called by the
server.
Jonathan, is this possible?
>
> Blaz Zupan, Medinet d.o.o, Linhartova 21, 2000 Maribor, Slovenia
> E-mail: blaz@amis.net, Tel: +386-2-320-6320, Fax: +386-2-320-6325
>
> ---------- Forwarded message ----------
> Date: Wed, 7 Mar 2001 10:49:52 -0500 (EST)
> From: Wietse Venema <wietse@porcupine.org>
> To: Postfix users <postfix-users@postfix.org>
> Subject: PATCH: workaround for FreeBSD 4.2-STABLE
>
> This is an UNTESTED workaround for an incompatible change in FreeBSD
> 4.2-STABLE that causes data to be lost when a client close()s a
> socket before the server has accept()ed the connection. This screws
> up the Postfix flush service, and may make some parts of Postfix
> fail randomly under a heavy system load.
>
> The UNTESTED workaround causes the client to wait until the server
> closes the connection first. This makes Postfix slower than necessary.
>
> The workaround is UNTESTED because I have no time to download and
> install FreeBSD 4.2-STABLE.
>
> To compile this UNTESTED workaround:
>
> [ apply patch ]
> % make makefiles CCARGS=-DBROKEN_FREEBSD_ACCEPT
> % make
> % su
> [ type your root password here ]
> # make install </dev/null
>
> Someone can tell the list if this UNTESTED workaround actually works.
>
> Wietse
>
> *** ./unix_trigger.c- Sun Mar 21 20:42:20 1999
> --- ./unix_trigger.c Wed Mar 7 10:40:29 2001
> ***************
> *** 79,84 ****
> --- 79,90 ----
> if (msg_verbose)
> msg_warn("%s: write to %s: %m", myname, service);
>
> + #ifdef BROKEN_FREEBSD_ACCEPT
> + if (shutdown(fd, 1) < 0)
> + msg_fatal("shutdown: %m");
> + read_wait(fd, -1);
> + #endif
> +
> /*
> * Disconnect.
> */
> *** ./inet_trigger.c- Fri Dec 11 13:55:36 1998
> --- ./inet_trigger.c Wed Mar 7 10:39:53 2001
> ***************
> *** 81,86 ****
> --- 81,92 ----
> if (msg_verbose)
> msg_warn("%s: write to %s: %m", myname, service);
>
> + #ifdef BROKEN_FREEBSD_ACCEPT
> + if (shutdown(fd, 1) < 0)
> + msg_fatal("shutdown: %m");
> + read_wait(fd, -1);
> + #endif
> +
> /*
> * Disconnect.
> */
> *** ./sane_accept.c- Sun Mar 21 20:25:52 1999
> --- ./sane_accept.c Wed Mar 7 10:32:59 2001
> ***************
> *** 53,58 ****
> --- 53,61 ----
> ENETUNREACH,
> ENOTCONN,
> EWOULDBLOCK,
> + #ifdef BROKEN_FREEBSD_ACCEPT
> + ECONNABORTED,
> + #endif
> 0,
> };
> int count;
>
>
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010307233854.A18351>
