delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/30/17:23:44

X-Spam-Check-By: sourceware.org
Message-Id: <1135981415.32640.250806707@webmail.messagingengine.com>
From: "Brett Serkez" <techie AT serkez DOT net>
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Subject: rsync over ssh hang issue understood
Date: Fri, 30 Dec 2005 17:23:35 -0500
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

After running into the hang trying to use rsync over ssh on Cygwin,
reported on this mailing list, but with no resolution other than use of
daemon mode, I tracked down the problem.  I have rsync working over ssh
on Cygwin.

The hang is occuring when rsync is attempting to exchange protocol
version numbers, it writes its version and then hangs waiting endlessly
for a reply.  The ssh process is detached, and apparently not diretly
connected to rsync, as it is an orphan, owned by process 1.  The ssh
process never even gets as far as attempting network access and rsync
never does anything of value.

Not defining HAVE_SOCKETPAIR in the make configuration is enough to use
pipe() vs. socketpair(), which is enough for rsync to run using ssh,
just as it does on UNIX.  While I've not done extensive testing, I've
used it enough to believe it is working as designed/intended.

The source file that is effected by the above change (primarily) is
util.c in function: fd_pair():

#ifdef HAVE_SOCKETPAIR
	ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
#else
	ret = pipe(fd);
#endif

While use of socketpair() may be a better method, use of pipe() does
work and I'd request that the rsync package maintainer please rebuild
the package with this build option change and reissue the package so all
can benefit.  Perhaps socketpair() can be used with a future release of
Cygwin?

Thank you,

Brett
----------------------------------------------------------------
Brett C. Serkez, Techie



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019