X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:cc:subject:message-id:references
	:mime-version:content-type:in-reply-to; q=dns; s=default; b=KGGz
	oRNbYd4CV7abtrj6F0BMUKgUAx9vkYB3Lyi/sMJ1XRkkO1IZ8w+O3cA0x1gLauJQ
	c2UKLT3DeL1aUfETT8BMpCKjNlVQmw3fjeTbfe/qMEpZFhf5s7yKtzfSofK766Pv
	zW9WWbkcrR+TkgMoKvxPOUhngfgi3abHu/1vpBE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:cc:subject:message-id:references
	:mime-version:content-type:in-reply-to; s=default; bh=OmKtyTTgR2
	Fdj/0YystRXE/YHho=; b=O9YAZDZOCd1CuXkb0RUZiYhLJ/jdWvkMfvx2hdqbJl
	3eeAZ9PkpXsia3YJN8ViUgCcbeAfjuHv42PjzgqWcc0fhUGJzIEzH1osXxfDtNLq
	Q3HD0lclNVbt9gabdLzVIoaIk3s1lszupNwrXunii+pXRfRMIIZ05YCqsJ50yr9U
	A=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_20,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: plunk.org
Date: Thu, 10 Oct 2013 03:29:36 -0400
From: Don Hatch <hatch@plunk.org>
To: cygwin@cygwin.com
Cc: Don Hatch <hatch@plunk.org>
Subject: Re: ssh takes forever to interrupt-- known problem?
Message-ID: <20131010072936.GA29937@plunk.org>
References: <20131009221915.GA6345@plunk.org> <5255DAD2.5000707@cygwin.com> <20131009225852.GA8151@plunk.org> <20131009232140.GA9487@plunk.org> <5255E722.40008@cygwin.com> <20131010004449.GA13071@plunk.org> <5256164E.2010606@cygwin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5256164E.2010606@cygwin.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-IsSubscribed: yes

On Wed, Oct 09, 2013 at 10:51:58PM -0400, Larry Hall (Cygwin) wrote:
> OK, I'm going to assume that 'sshd' was actually started when
> you tried the latest rounds of tests.  If this wasn't the case, you have
> another (probably non-Cygwin) SSH server running which is causing the
> problem.  You'll need to shut that service down and start the Cygwin
> one before trying again.

Right, if I want to connect to sshd on the windows machine,
I start the cygwin sshd manually if I haven't already.
However I can reproduce the problem with no cygwin sshd running at all,
by ssh'ing from the cygwin/windows machine to a linux machine.

> 
> Beyond that, you could try invoking invoking 'yes' through 'strace' and
> see if the output there gives you any clues.

Tried that, on the linux machine I was ssh'ed into.
What I found was:
    - if I ctrl-c approximately 1/8 to 1/4 second after starting "yes",
      the program receives it and is killed 2.5 seconds later,
      but the output (about 62558 bytes of "y\n"s)
      takes 30 seconds more to finish spewing.
    - if I ctrl-c approximately 1 second after starting "yes",
      the program receives it and is killed 5.25 seconds later,
      but the output (about 119278 bytes of "y\n"s)
      takes 57 seconds more to finish spewing.

So I'm thinking there's a buffer somewhere in all this
that is (too) capable of quickly recieving and buffering a whole lot of data,
but there's a bottleneck somewhere after that buffer
that makes it take a long time for the data to dribble out to the terminal.
I wonder where that buffer is, and if there's a way to decrease
the buffer size so that output-bound programs will block sooner,
for decreased throughput and increased interactivity,
which would be what I want, I think.
      
> You could also try cutting
> down your path to eliminate potential interactions.

I straced ssh when ssh'ing into the linux box...
no programs were run other than c:\cygwin\bin\ssh.exe
so that eliminates that possibility, right?

> try adding "detect_bloda" to your Cygwin environment variable to see if
> it points to some conflicting program/service:
> 
> <http://cygwin.com/cygwin-ug-net/using-cygwinenv.html#cygwinenv-implemented-options>

Tried setting env CYGWIN=detect_bloda
and ran ssh again, didn't see anything different (although I'm not sure exactly
what I should expect to see if it detects something fishy).

> 
> If those don't provide any clues, I'm out of ideas. :-(
> 
Hope not :-)  I appreciate your eyes on this.

--
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

