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: scp exits often with -1


On Fri, Nov 19, 2004 at 11:48:37AM -0500, Bob Byrnes wrote:
> I spent a little time looking at these straces and scp -v output.
> I still don't understand what's going on, but it seems to be unrelated to
> the recent pipe changes.  I say that because those changes only affected
> select for writes on pipes, and the problem seems to be on the read side.
> It looks like scp and ssh are sending only single bytes across the pipe
> when the failure occurs, so the pipe is almost empty, and (correctly)
> always selects writable anyway.  Something is making the pipe disappear,
> causing PeekNamedPipe to fail for the ssh process in the select for read
> on pipes code (which has not been changed).
> 
> Either something is going catastrophically wrong with the pipe at
> a very low level, or the scp process is closing it in a way that ssh
> does not expect.  So far, I can't tell which is happening, but I did
> note one significant difference in the scp -v output: only the "good"
> invocation has ...
> 
> debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
> 
> An examination of the ssh sources to see what this means might be
> enlightening, but I don't have time to do that right now.

I agree with that. The I/Os (open, dup, close, sizes of reads and writes)
are identical in the good and bad trace, except that the final read from
the remote is 120 bytes in the good case, vs. 64 in the bad trace.
That difference drives the change in debug output noted above.

Pierre

  



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