From owner-freebsd-arch Wed Dec 4 8: 0:40 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E28D37B401 for ; Wed, 4 Dec 2002 08:00:39 -0800 (PST) Received: from mail.cs.fsu.edu (mail.cs.fsu.edu [128.186.121.245]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FEF743EC2 for ; Wed, 4 Dec 2002 08:00:38 -0800 (PST) (envelope-from engelen@cs.fsu.edu) Received: from cs.fsu.edu (engelen.csit.fsu.edu [144.174.137.110]) by mail.cs.fsu.edu (8.11.6/8.11.6) with ESMTP id gB4G0bx21483 for ; Wed, 4 Dec 2002 11:00:37 -0500 Date: Wed, 4 Dec 2002 11:00:18 -0500 Mime-Version: 1.0 (Apple Message framework v548) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: Mac OS X BSD SO_NOSIGPIPE bug From: Robert van Engelen To: freebsd-arch@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <7BF5285B-07A1-11D7-8EA1-000393C3075E@cs.fsu.edu> X-Mailer: Apple Mail (2.548) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I recently ran into a nasty problem with BSD-based Mac OS X Darwin and sockets with SO_NOSIGPIPE and SO_KEEPALIVE both enabled (setsockopt). The problem is with bind(), accept() followed by multiple send() and recv() calls. Eventually, the send() and/or recv() will stall for several minutes, even though data is available. Monitoring the TCP/IP traffic I found that the send() and/or recv() loops while attempting to get more data or send data in 5 second intervals. Eventually this succeeds after several minutes delay. The problem does not occur when I use my own SIGPIPE signal handler, nor does it occur on Linux or other UNIX platforms. I also removed the handler and all works fine in that case as well. So even when the connections are not prematurely terminated, the SO_NOSIGPIPE option causes this problem. Does anyone have an idea? Has this behavior been observed before? Is this normal behavior? - Dr. Robert van Engelen, Florida State University To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message