delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/08/00:20:04

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Date: Mon, 8 Mar 2010 05:19:51 +0000
From: Jamie Lokier <jamie AT shareable DOT org>
To: Wayne Davison <wayned AT samba DOT org>
Cc: Eliot Moss <moss AT cs DOT umass DOT edu>, rsync AT lists DOT samba DOT org,
cygwin <cygwin AT cygwin DOT com>
Subject: Re: cygwin + rsync issue under Windows 7 x64
Message-ID: <20100308051951.GB24024@shareable.org>
References: <4B8440BF DOT 8050403 AT cs DOT umass DOT edu> <733654e31003060921mca36c77j154e5af4440c568a AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <733654e31003060921mca36c77j154e5af4440c568a@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

Wayne Davison wrote:
>    I'd imagine that both ssh and rsync start using a lot of CPU because
>    the socketpair must be indicating that it is ready for a write (or
>    read) but the actual write() (or read()) fails to return any bytes (as
>    long as errno is something like EAGAIN, EINTR, or EWOULDBLOCK, rsync
>    will try again). Â If you want to test that theory, you could add some
>    prints to rsync's io.c file near the 3 uses of EWOULDBLOCK and have it
>    output what errno it gets. Â If you get that fixed, the programs that
>    interface with a socketpair should go back to normal.

It would not be the first time Cygwin did something like that.

11.5 years ago, Cygwin32 b19.1, I found it returning EAGAIN
continuously when reading from pipes to a child process and from the
master side of a pty to a child process, while select() indicated
"ready for exception" (at least from the pty master; I don't remember
if it was that or "ready for read" from a pipe).

How interesting that sockpair() now looks like having a similar problem.

Perhaps the sockpair problem might be related to the getting stuck
people occasionally report with rsync + ssh + Cygwin ?  I.e. maybe
disabling socketpair() will fix the stuck problem too?

Maybe the next time someone encounters it, they'll google this thread,
try it and let us know how it went, thanks :)

-- Jamie

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

- Raw text -


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