Solaris Hangs tcp SACK

Ryan Madison rmadison at
Fri May 23 02:17:57 EST 2003

	Recently on an Ultra 10 running Solaris 8:
SunOS toasty 5.8 Generic_108528-20 sun4u sparc SUNW,Ultra-5_10,
using a pre-compiled package of rsync 2.5.6 from
bash-2.03$ rsync --version
rsync  version 2.5.6  protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
Capabilities: 64-bit files, socketpairs, hard links, symlinks,
              no IPv6, 64-bit system inums, 64-bit internal inums

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.
	The rsync process hung when using this machine as a client to a machine
running rsync in daemon mode on port 873. Similar errors occurred when
using SSH as the transport mechanism and pulling from another machine. 
	I had intermittent success by limiting the bandwidth with the
--bwlimit=5 parameter. - But rsync still choked when trying to transfer
larger files > 300 bytes. 
	What ended up fixing the issue is tweaking the /dev/tcp module, and
disabling selective acknowledgment (SACK). I ran the following command,
and rsync worked fine with no special parameters between both hosts,
using different transport mechanisms.
bash-2.03# ndd -get /dev/tcp tcp_sack_permitted
bash-2.03# ndd -set /dev/tcp tcp_sack_permitted 0
bash-2.03# ndd -get /dev/tcp tcp_sack_permitted
	After reading the man page (below) I set the parameter to 1, so that
Solaris would accept connections using SACK, but not initiate
connections using it. - This also worked for my two cases.

Following is from the tcp(7P) man page. - It indicates that default for
tcp_sack_permitted is 1. 
 Turn on  SACK capabilities in the following way:

        o  Use  ndd  to  modify   the   configuration   parameter
           tcp_sack_permitted. If tcp_sack_permitted is set to 0,
           TCP will not accept  SACK or send out   SACK  informa-
           tion.  If   tcp_sack_permitted  is set to  1, TCP will
           not initiate a connection with SACK  permitted  option
           in  the   SYN  segment,  but  will  respond with  SACK
           permitted option in the  SYN|ACK segment if  an incom-
           ing   connection  request  has  the   SACK   permitted
           option.   This means that  TCP will only accept   SACK
           information  if  the other side of the connection also
           accepts  SACK information.  If  tcp_sack_permitted  is
           set to 2, it will both initiate and accept connections
           with    SACK    information.     The    default    for
           tcp_sack_permitted is 1.

In a previous e-mail Dave Dykstra mentioned the /dev/tcp patch as a
potential fix for Solaris hang issues:
109472-04: SunOS 5.8: /kernel/drv/tcp patch   (2.8)
	This patch is obsoleted by 108528-13 which is a kernel patch. (I have
108528-20 on this host, and still experienced the problem.) 

-Thought you all might like to know.

Ryan Hamilton Madison
Simonson Technology Services Inc.
1311 North McCarran Blvd, Suite 104
Sparks, NV 89431
e:rmadison at

More information about the rsync mailing list