public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: [1.7] regression wrt scp?
Date: Mon, 26 Jan 2009 15:46:00 -0000	[thread overview]
Message-ID: <20090126142815.GD16129@calimero.vinschen.de> (raw)
In-Reply-To: <20090126074307.GA32214@ednor.casa.cgf.cx>

On Jan 26 02:43, Christopher Faylor wrote:
> I finally managed to duplicate this.
> [...]
> >It's already on my list to investigate.  When I saw "broken pipe" I
> >thought it could be something in the new pipe code.
> 
> But, if it is, I can't see it yet.
> 
> The strace snippet below seems to show that the ssh process which scp
> forks is expecting for the socket to become writable but that never happens.
> 
> At time 10048910 you can see 16384 bytes received.  Then select() is
> called to inspect the socket handler for readability/writability.  But
> select claims that the socket handle is never ready.

It's probably right about that.  The peek_socket function is called in a
loop by the thread_socket function (via select) with a non INFINITE
timeout.  The "Broken pipe" message already occured at the time the
peek_socket function is repeated ad infinitum.  This message in the
strace does not mean that SSH hangs for that reason, it just doesn't get
any data from the remote side.  SSH maintains a select loop over all
open descriptors and every poll from the thread_socket function
generates this debug message.  SSH seems to be waiting for data from the
local pipe to the local scp actually.

What strucks me as weird is, why does SSH hang in select() at all?  The
"Broken pipe" message should have resulted in exiting the application
but for some reason only scp noticed the broken pipe, not SSH.  That's
the only reason I can think of that the select loop in SSH didn't finish.

FWIW, I reverted the pipe-related changes from 2008-12-20 and 2008-12-23
for testing and the problem goes away for me.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

  reply	other threads:[~2009-01-26 14:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07  8:19 Charles Wilson
2009-01-08 11:29 ` Corinna Vinschen
2009-01-08 16:36   ` Christopher Faylor
2009-01-08 16:41     ` Corinna Vinschen
2009-01-26 10:52     ` Christopher Faylor
2009-01-26 15:46       ` Corinna Vinschen [this message]
2009-01-26 17:17         ` Christopher Faylor
2009-01-26 18:59           ` Corinna Vinschen
2009-01-26 21:35             ` Christopher Faylor
2009-01-26 19:46           ` Corinna Vinschen
2009-01-27 19:33           ` Christopher Faylor
2009-01-28  3:01             ` Charles Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090126142815.GD16129@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).