Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2002 11:00:18 -0500
From:      Robert van Engelen <engelen@cs.fsu.edu>
To:        freebsd-arch@freebsd.org
Subject:   Mac OS X BSD SO_NOSIGPIPE bug
Message-ID:  <7BF5285B-07A1-11D7-8EA1-000393C3075E@cs.fsu.edu>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7BF5285B-07A1-11D7-8EA1-000393C3075E>