Date: Mon, 13 Jan 1997 14:19:19 -0800 From: Darryl Okahata <darrylo@hpnmhjw.sr.hp.com> To: fenner@parc.xerox.com Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/2482: 2.2-BETA install doesn't time out in FTP Message-ID: <199701132219.AA225543959@hpnmhjw.sr.hp.com> In-Reply-To: Your message of "Mon, 13 Jan 1997 10:06:02 PST." <199701131806.KAA26247@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
fenner@parc.xerox.com wrote: > Some change somewhere brought to light a race condition in PARC's > FTP proxy, where it can deadlock on a full TCP buffer. The symptom > is that data flows on the data connection but not on the control > connection, and since the FreeBSD install is waiting for the > "150 Opening connection" response on the control connection before > reading from the data connection, we get deadlock. If PARC's ftp proxy uses a SOCKS server to go outside a firewall, I'd like to mention a SOCKS bug that exists in SOCKS V4 & V5. You might be running into this. The SOCKS server handles a firewall connection using a simple select(2)-based "while" loop that reads from one socket (inside the firewall) and writes to another socket (outside the firewall), *AND* vice-versa (to go in the opposite direction). The problem arises from the fact that the socket writes are done using *BLOCKING* calls. The problem occurs when a lot of data is being transferred in one direction, and the (client) program, that is supposed to be reading this large amount of data (from the SOCKS server), isn't bothering to read the data (for whatever reason). Because of this, the SOCKS server eventually hangs while trying to write data to the client (blocking writes are used), which means that the SOCKS server cannot respond to any data transfers going in the opposite direction. [ The bottom line is that network I/O via a SOCKS server really should be half-duplex; a full-duplex connection runs the risk of hanging the server. John Polstra and I first ran into this with CVSUP. ] -- Darryl Okahata Internet: darrylo@sr.hp.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion, or policy of Hewlett-Packard, or of the little green men that have been following him all day.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701132219.AA225543959>