Call for testing: OpenSSH 6.8

Damien Miller djm at
Tue Feb 24 04:26:37 AEDT 2015

On Mon, 23 Feb 2015, Corinna Vinschen wrote:

> leaves the ports 3301/3302 in TIME_WAIT state (as is 4242 from some
> earlier test).  Here are the relevant excerpts from ps -e and (Windows)
> netstat output.  The first group is the output prior to the above test:


> This may well be a problem local to Windows.  Btw., the large number of
> AF_INET sockets is a result of the way how Cygwin implements AF_LOCAL
> sockets:  They are emulated by local AF_INET sockets since WIndows
> doesn't know the concept of AF_LOCAL sockets.

Does CYGWIN implement setsockopt(s, SOL_SOCKET, SO_REUSEADDR, ...)?
We set this for (AFAIK) all forwarding listeners to prevent TIME_WAIT

> Note that there are still sleep processes running.  So on a hunch I just
> added a `sleep 30' between the two tests and, lo and behold, the
> test completes successfully every time:

IMO it's probably a simple race condition rather than a TCP thing, and
the test before the "transfer over chained unix domain socket" one does
look like it fails to wait for the backgrounded ssh to finish (the wait
doesn't wait for the background ssh, but the one following it).

Does the following help?

RCS file: /cvs/src/regress/usr.bin/ssh/,v
retrieving revision 1.13
diff -u -p -r1.13
---	21 Feb 2015 20:51:02 -0000	1.13
+++	23 Feb 2015 17:25:40 -0000
@@ -8,6 +8,9 @@ start_sshd
+rm -f $CTL
 for j in 0 1 2; do
 	for i in 0 1 2; do
@@ -107,7 +110,7 @@ echo "LocalForward ${base}01$
 echo "RemoteForward ${base}02${base}01" >> $OBJ/ssh_config
 for p in 1 2; do
 	trace "config file: start forwarding, fork to background"
-	${SSH} -$p -F $OBJ/ssh_config -f somehost sleep 10
+	${SSH} -S $CTL -M -$p -F $OBJ/ssh_config -f somehost sleep 10
 	trace "config file: transfer over forwarded channels and check result"
 	${SSH} -F $OBJ/ssh_config -p${base}02 -o 'ConnectionAttempts=4' \
@@ -115,7 +118,7 @@ for p in 1 2; do
 	test -s ${COPY}		|| fail "failed copy of ${DATA}"
 	cmp ${DATA} ${COPY}	|| fail "corrupted copy of ${DATA}"
-	wait
+	${SSH} -S $CTL -O exit somehost
 for p in 2; do

More information about the openssh-unix-dev mailing list