From owner-freebsd-net Thu Feb 3 22:17:34 2000 Delivered-To: freebsd-net@freebsd.org Received: from scam.xcf.berkeley.edu (scam.XCF.Berkeley.EDU [128.32.43.201]) by builder.freebsd.org (Postfix) with SMTP id 7721D4411 for ; Thu, 3 Feb 2000 22:17:28 -0800 (PST) Received: (qmail 85977 invoked by uid 8031); 4 Feb 2000 06:17:31 -0000 Message-ID: <20000204061731.85976.qmail@scam.xcf.berkeley.edu> To: freebsd-net@freebsd.org Subject: Non-blocking sockets and network outages X-Common-Yaroslav-Version: 2.0 X-Editor: nvi Date: Thu, 03 Feb 2000 22:17:31 -0800 From: Gene Kan Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I've got an interesting problem involving non-blocking sockets and network outages. In all cases, SO_KEEPALIVE is on, and net.inet.tcp.always_keepalive: 1. The problem manifests itself when there is a net partition, the other endpoint loses power, or something of that sort. Basically, when a connection dies without first notifying with RST or FIN. If I mark a socket for reading, the fd will just never become active, and I have an ESTABLISHED connection (verified with netstat) forever. If I do a non-blocking write, the write will return -1 with errno==EAGAIN. Obviously, since it just looks like the other side isn't slurping up the data because I'm not getting a window update. Finally...I can't figure out why the keepalives aren't taking care of all this for me, and discovering the connections are dead. I waited for hours, which surely should have been more than all timeouts... Thanks for any help. Gene To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message