On Tue, Jun 13, 2000 at 08:55:50AM -0500, Dave Dykstra wrote:
> (I am adding the rsync mailing list to the Cc)
>
> > Wout van Albada <[EMAIL PROTECTED]> wrote on the ssh mailing list:
...
> > > There are two machines, server and client. Both machines run Solaris.
> > > The client makes an ssh connection to the server to download a file:
> > >
> > > server% ls -l /tmp/DATA
> > > -rw-r--r-- 1 wout staff 200000 Mar 23 11:20 DATA
> > >
> > > client% ssh server cat /tmp/DATA > /tmp/DATA
> > > client% ls -l /tmp/DATA
> > > -rw-r--r-- 1 wout staff 194560 Mar 24 17:10 /tmp/DATA
> > >
> > > This would copy a file '/tmp/DATA' from server to /tmp/DATA on client.
> > > In this particular case file DATA was 200000 bytes. The size has
> > > to be larger then the buffers used inside sshd.
...
> > > --- serverloop.c.ORIG Sun Mar 26 13:20:14 2000
> > > +++ serverloop.c Sun Mar 26 13:25:15 2000
> > > @@ -429,14 +429,14 @@
> > > if (cleanup_context)
> > > pty_cleanup_proc(cleanup_context);
> > >
> > > - if (fdout != -1)
> > > + if (fdout != -1 && fdout_eof) {
> > > close(fdout);
> > > - fdout = -1;
> > > - fdout_eof = 1;
> > > - if (fderr != -1)
> > > + fdout = -1;
> > > + }
> > > + if (fderr != -1 && fderr_eof) {
> > > close(fderr);
> > > - fderr = -1;
> > > - fderr_eof = 1;
> > > + fderr = -1;
> > > + }
> > > if (fdin != -1)
> > > close(fdin);
> > > fdin = -1;
I just tried to reproduce this and have unfortunately found it to make no
difference for me. My server was solaris 5.6 and client was solaris 5.8.
I was starting with ssh-1.2.27 on both sides that was modified to use
socketpairs instead of the default pipes. First, I wasn't able to get it
to hang with the above "DATA" file test of 200000 bytes or even of 1MB.
Next, I tried a modified rsync 2.4.3 that calls "set_blocking(STDOUT_FILENO)"
in util.c right after it calls "set_blocking(STDIN_FILENO)" so that
non-blocking mode would not be turned on at all. Using ssh with the above
patch and without made no difference: both hang at a pretty reproducible
place in a decent sized transfer of files from client to server.
- Dave Dykstra