From owner-freebsd-stable@FreeBSD.ORG Wed Jan 31 21:40:09 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CCBE16A405 for ; Wed, 31 Jan 2007 21:40:08 +0000 (UTC) (envelope-from freebsd@j-davis.com) Received: from servata.com (ip-216-152-249-241.servata.com [216.152.249.241]) by mx1.freebsd.org (Postfix) with ESMTP id D7D4413C478 for ; Wed, 31 Jan 2007 21:40:06 +0000 (UTC) (envelope-from freebsd@j-davis.com) Received: from [209.162.219.253] (helo=dogma.v10.wvs) by servata.com with esmtpsa (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.50) id 1HCNBS-00039C-Ti; Wed, 31 Jan 2007 13:40:03 -0800 From: Jeff Davis To: Garrett Wollman In-Reply-To: <200701312004.l0VK4vXC066309@khavrinen.csail.mit.edu> References: <200701312004.l0VK4vXC066309@khavrinen.csail.mit.edu> Content-Type: text/plain Date: Wed, 31 Jan 2007 13:40:04 -0800 Message-Id: <1170279604.22436.81.camel@dogma.v10.wvs> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-7) Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, freebsd-stable@freebsd.org Subject: Re: send() returns error even though data is sent, TCP connection still alive X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 21:40:09 -0000 On Wed, 2007-01-31 at 15:04 -0500, Garrett Wollman wrote: > In article <1170269163.22436.71.camel@dogma.v10.wvs>, > Jeff Davis wrote: > > >You should see something like "write failed: host is down" and the > >session will terminate. Of course, when ssh exits, the TCP connection > >closes. The only way to see that it's still open and active is by > >writing (or using) an application that ignores EHOSTDOWN errors from > >write(). > > I agree that it's a bug. The only time write() on a stream socket > should return the asynchronous error[1] is when the connection has > been (or is in the process of being) torn down as a result of a > subsequent timeout. POSIX says "may fail" for these errors write() > and send() on sockets > As far as I'm concerned, a fix for this bug is critical. We have had to move production apps off some of our freebsd servers. Regards, Jeff Davis