Mailing List Archive

scp: write stdout: Broken pipe error (Tru64 UNIX)
I'm working on adding SIA authentication support to OpenSSH for use on
Tru64 UNIX. The authentication bits are working but there's more work to be
done including checking for locked accounts and setting resource limits.

Anyway, most things seem to be working fine except for scp and I'm looking
for a little help. Here's some output:

% scp -v lopan:sl.tar .
Executing: host lopan, user (unspecified), command scp -v -f sl.tar
SSH Version OpenSSH-1.2.3, protocol version 1.5.
Compiled with SSL.
debug: ssh_connect: getuid 4056 geteuid 0 anon 0
debug: Connecting to lopan [165.123.210.223] port 22.
debug: Allocated local port 685.
debug: Connection established.
debug: Remote protocol version 1.5, remote software version OpenSSH-1.2.3
debug: Waiting for server public key.
debug: Received server public key (768 bits) and host key (1024 bits).
debug: Host 'lopan' is known and matches the host key.
debug: Encryption type: 3des
debug: Sent encrypted session key.
debug: Installing crc compensation attack detector.
debug: Received encrypted confirmation.
debug: Doing password authentication.
speno@lopan's password:
debug: Sending command: scp -v -f sl.tar
debug: Entering interactive session.
Cannot find terminal.
Sending file modes: C0600 11530240 sl.tar
sl.tar 4% |*** | 512 KB 00:20 ETAInterrupted system call
11:33am
Write failed flushing stdout buffer.
write stdout: Broken pipe
debug: Transferred: stdin 32, stdout 540758, stderr 27 bytes in 1.3 seconds
debug: Bytes per second: stdin 25.2, stdout 426281.1, stderr 21.3
debug: Exit status -1

I've got a working scp from ssh-1.2.27 around and that still works fine.

Any ideas?

Thanks.
Re: scp: write stdout: Broken pipe error (Tru64 UNIX) [ In reply to ]
On Mon, Mar 27, 2000 at 11:41:08AM -0500, John P Speno wrote:
> I'm working on adding SIA authentication support to OpenSSH for use on
> Tru64 UNIX. The authentication bits are working but there's more work to be
> done including checking for locked accounts and setting resource limits.
>
> Anyway, most things seem to be working fine except for scp and I'm looking
> for a little help. Here's some output:

Just wanted to follow up on this issue because it's gone away. I've no idea
what was happening, so I'll blame user headspace error (my own).

Take care.
Re: scp: write stdout: Broken pipe error (Tru64 UNIX) [ In reply to ]
On Fri, Apr 14, 2000 at 02:06:59PM -0400, John P Speno wrote:
>
> Just wanted to follow up on this issue because it's gone away. I've no idea
> what was happening, so I'll blame user headspace error (my own).

And another followup. I'm able to duplicate this at will now and I've
tracked it down somewhat. I'll continue to work on finding the exact
problem after my headache subsides...

Anyway, here's the problem. On the local side, I'm using Openssh 1.2.3
under Tru64 UNIX 5.0. The remote side is Tru64 UNIX 4.0f running ssh
1.2.27.

$ scp dax:3test .
speno@dax's password:
3test 98% |**************************** | 504 KB 00:00
ETAInterrupted system call
$ Write failed flushing stdout buffer.
write stdout: Broken pipe

And no, my dot files do not produce any output on the remote system.

It works when any of the following are true:

- stderr or stdout are redirected.
- Any descriptor (e.g. FD 6) is redirected to /dev/null.
- scp's -q option is used.
- The file copied is smaller than 512KB in size.
- the scp is run under trace (a truss-like thingy).

So, given the error, and the cases where it works, if you've got some ideas
on how to fix it, please drop me a line. It'll save me some time. Thanks.
Re: scp: write stdout: Broken pipe error (Tru64 UNIX) [ In reply to ]
On Tue, Apr 25, 2000 at 04:10:55PM -0400, John P Speno wrote:
> On Fri, Apr 14, 2000 at 02:06:59PM -0400, John P Speno wrote:
> >
> > Just wanted to follow up on this issue because it's gone away. I've no idea
> > what was happening, so I'll blame user headspace error (my own).
>
> And another followup. I'm able to duplicate this at will now and I've
> tracked it down somewhat. I'll continue to work on finding the exact
> problem after my headache subsides...

I was able to get a system call trace of the problem in action, but I still
haven't been able to fix it. The trace is here:

http://www.isc-net.upenn.edu/~speno/scp.trace.txt

Everything is running just fine until the SIGALRM is raised to let scp know
it's time to update the progess meter while in a call to read(). This can
be seen towards the end of that trace.

I'm mucking around in clientloop.c, trying to handle EINTR in read()s and
write()s, but I haven't been able to fix anything that way yet.

Thanks to Theo de Raadt for sending some suggestions along.