This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1.7] regression wrt scp?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]