scp not shutting down in 2.1.1p4

Lutz Jaenicke Lutz.Jaenicke at aet.TU-Cottbus.DE
Fri Jul 21 20:40:36 EST 2000


On Thu, Jul 20, 2000 at 05:19:02PM +0200, Kevin Steves wrote:
> Here are some trace (tusc) and stacks traces from HP-UX 11.0.
...
 
> stack trace of server blocked sshd:
..
> #1  0xc01f8fa8 in select () from /usr/lib/libc.2
> #2  0x1b90c in wait_until_can_do_something (readset=0x7bff0ea8, writeset=0x7bff0fa8, 
>     max_time_milliseconds=0) at serverloop.c:232
...

> stack trace "hung" scp process:
...
> #0  0xc01ed230 in _read_sys () from /usr/lib/libc.2
> #1  0xc01f85e4 in read () from /usr/lib/libc.2
...

Ok, I have by now "finally" analyzed the problem. The protocol seems to
be as follows:
* Once the scp is done, the calling scp will close its output channel
  causing an EOF condition in the sshd. The sshd will then close its
  channel to the scp process (hanging in the read scp.c:702).
  The scp recognizes the close, kindly exits and the sshd will finish.
* On HP-UX 10.20 (seems also to affect HP-UX 11, don't know about other
  platforms), the shutdown() in serverloop.c:320 does not yield the
  necessary effect, the scp-child does not see the EOF.
  I have now recompiled with USE_PIPES (see includes.h) and the full close()
  of the fdin descriptor yields the desired effect.

Best regards,
	Lutz
-- 
Lutz Jaenicke                             Lutz.Jaenicke at aet.TU-Cottbus.DE
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153





More information about the openssh-unix-dev mailing list