NetBSD Problem Report #45200
From www@NetBSD.org Mon Aug 1 11:21:22 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 11F2063CBD8
for <gnats-bugs@gnats.NetBSD.org>; Mon, 1 Aug 2011 11:21:22 +0000 (UTC)
Message-Id: <20110801112121.3CE2663BEF4@www.NetBSD.org>
Date: Mon, 1 Aug 2011 11:21:21 +0000 (UTC)
From: hannken@eis.cs.tu-bs.de
Reply-To: hannken@eis.cs.tu-bs.de
To: gnats-bugs@NetBSD.org
Subject: Scp hangs after sending
X-Send-Pr-Version: www-1.0
>Number: 45200
>Category: bin
>Synopsis: Scp hangs after sending
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 01 11:25:00 +0000 2011
>Closed-Date: Tue Aug 02 06:01:33 +0000 2011
>Last-Modified: Tue Aug 02 06:01:33 +0000 2011
>Originator: J. Hannken-Illjes
>Release: NetBSD 5.99.55
>Organization:
>Environment:
NetBSD 5.99.55 (work.i386) #38: Mon Aug 1 10:38:23 MEST 2011
>Description:
Resent to replace bad pending/45199!
Running scp hangs after the data is transferred. Output from
scp: debug2: channel 0: written 263 to efd 8
debug2: tcpwinsz: 33580 for connection: 5
debug2: tcpwinsz: 33580 for connection: 5
debug2: tcpwinsz: 33580 for connection: 5
Sending file modes: C0644 200 x0x
debug2: tcpwinsz: 33580 for connection: 5
debug2: tcpwinsz: 33580 for connection: 5
debug2: channel 0: rcvd ext data 20
debug2: tcpwinsz: 33580 for connection: 5
Sink: C0644 200 x0x
debug2: channel 0: written 20 to efd 8
debug2: tcpwinsz: 33580 for connection: 5
debug2: tcpwinsz: 33580 for connection: 5
x0x 100% 200 0.2KB/s 0.2KB/s 00:00
debug2: tcpwinsz: 33580 for connection: 5
debug2: tcpwinsz: 33580 for connection: 5
sshd: debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req exec
debug2: fd 3 setting TCP_NODELAY
debug3: packet_set_tos: set IP_TOS 0x08
debug2: fd 10 setting O_NONBLOCK
debug2: fd 9 setting O_NONBLOCK
debug2: fd 12 setting O_NONBLOCK
debug2: tcpwinsz: 33580 for connection: 3
debug2: channel 0: read 263 from efd 12
debug2: channel 0: rwin 2097152 elen 263 euse 1
debug2: channel 0: sent ext data 263
debug2: channel 0: read 20 from efd 12
debug2: channel 0: rwin 2096888 elen 20 euse 1
debug2: channel 0: sent ext data 20
>How-To-Repeat:
Use scp.
>Fix:
>Release-Note:
>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: bin/45200: Scp hangs after sending
Date: Mon, 1 Aug 2011 14:12:41 +0200
On Mon, Aug 01, 2011 at 11:25:00AM +0000, hannken@eis.cs.tu-bs.de wrote:
> Running scp hangs after the data is transferred. Output from
>
> scp: debug2: channel 0: written 263 to efd 8
> debug2: tcpwinsz: 33580 for connection: 5
> debug2: tcpwinsz: 33580 for connection: 5
> debug2: tcpwinsz: 33580 for connection: 5
> Sending file modes: C0644 200 x0x
> debug2: tcpwinsz: 33580 for connection: 5
> debug2: tcpwinsz: 33580 for connection: 5
> debug2: channel 0: rcvd ext data 20
> debug2: tcpwinsz: 33580 for connection: 5
> Sink: C0644 200 x0x
> debug2: channel 0: written 20 to efd 8
> debug2: tcpwinsz: 33580 for connection: 5
> debug2: tcpwinsz: 33580 for connection: 5
> x0x 100% 200 0.2KB/s 0.2KB/s 00:00
> debug2: tcpwinsz: 33580 for connection: 5
> debug2: tcpwinsz: 33580 for connection: 5
>
> sshd: debug1: session_by_channel: session 0 channel 0
> debug1: session_input_channel_req: session 0 req exec
> debug2: fd 3 setting TCP_NODELAY
> debug3: packet_set_tos: set IP_TOS 0x08
> debug2: fd 10 setting O_NONBLOCK
> debug2: fd 9 setting O_NONBLOCK
> debug2: fd 12 setting O_NONBLOCK
> debug2: tcpwinsz: 33580 for connection: 3
> debug2: channel 0: read 263 from efd 12
> debug2: channel 0: rwin 2097152 elen 263 euse 1
> debug2: channel 0: sent ext data 263
> debug2: channel 0: read 20 from efd 12
> debug2: channel 0: rwin 2096888 elen 20 euse 1
> debug2: channel 0: sent ext data 20
Can you check with ps -l and ktrace on what syscall/channel it hangs ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
From: "J. Hannken-Illjes" <hannken@eis.cs.tu-bs.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/45200: Scp hangs after sending
Date: Mon, 1 Aug 2011 14:23:52 +0200
sshd is in select(). scp seems to be in read().
--
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)
On Aug 1, 2011, at 2:15 PM, Manuel Bouyer wrote:
> Can you check with ps -l and ktrace on what syscall/channel it hangs ?
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org, hannken@eis.cs.tu-bs.de
Subject: Re: bin/45200: Scp hangs after sending
Date: Mon, 1 Aug 2011 14:55:38 +0200
On Mon, Aug 01, 2011 at 12:25:02PM +0000, J. Hannken-Illjes wrote:
> The following reply was made to PR bin/45200; it has been noted by GNATS.
>
> From: "J. Hannken-Illjes" <hannken@eis.cs.tu-bs.de>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: bin/45200: Scp hangs after sending
> Date: Mon, 1 Aug 2011 14:23:52 +0200
>
> sshd is in select(). scp seems to be in read().
Could you see if the workaround in kern/45187 (#define NO_DIRECT_SELECT in
sys/kern/sys_select.c) would fix it ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
From: "J. Hannken-Illjes" <hannken@eis.cs.tu-bs.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/45200: Scp hangs after sending
Date: Mon, 1 Aug 2011 15:05:29 +0200
On Aug 1, 2011, at 3:00 PM, Manuel Bouyer wrote:
> On Mon, Aug 01, 2011 at 12:25:02PM +0000, J. Hannken-Illjes wrote:
>> The following reply was made to PR bin/45200; it has been noted by GNATS.
>>
>> From: "J. Hannken-Illjes" <hannken@eis.cs.tu-bs.de>
>> To: gnats-bugs@NetBSD.org
>> Cc:
>> Subject: Re: bin/45200: Scp hangs after sending
>> Date: Mon, 1 Aug 2011 14:23:52 +0200
>>
>> sshd is in select(). scp seems to be in read().
>
> Could you see if the workaround in kern/45187 (#define NO_DIRECT_SELECT in
> sys/kern/sys_select.c) would fix it ?
No difference -- looks more related to the latest OpenSSH update by christos:
http://mail-index.netbsd.org/source-changes/2011/07/25/msg025035.html
--
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)
From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, hannken@eis.cs.tu-bs.de
Subject: Re: bin/45200: Scp hangs after sending
Date: Mon, 1 Aug 2011 16:00:45 +0200
At 13:25 Uhr +0000 01.08.2011, J. Hannken-Illjes wrote:
> > Could you see if the workaround in kern/45187 (#define NO_DIRECT_SELECT in
> > sys/kern/sys_select.c) would fix it ?
>
> No difference -- looks more related to the latest OpenSSH update by christos:
>
> http://mail-index.netbsd.org/source-changes/2011/07/25/msg025035.html
>
Seconded. I am currently tracking -current closely on sparc, and I see the
same issue after the openssh upgrade.
hauke
--
The ASCII Ribbon Campaign Hauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
Respect for open standards Ruf +49-6151-16-3281
From: "J. Hannken-Illjes" <hannken@eis.cs.tu-bs.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/45200: Scp hangs after sending
Date: Mon, 1 Aug 2011 16:55:51 +0200
Looks related to being compiled with ssp. With this diff it works for me:
RCS file: /cvsroot/src/crypto/external/bsd/openssh/dist/atomicio.c,v
--- atomicio.c 25 Jul 2011 03:03:10 -0000 1.3
+++ atomicio.c 1 Aug 2011 14:47:46 -0000
@@ -53,5 +53,5 @@ atomicio6(ssize_t (*f) (int, void *, siz
pfd.fd = fd;
- pfd.events = f == read ? POLLIN : POLLOUT;
+ pfd.events = f != vwrite ? POLLIN : POLLOUT;
while (n > pos) {
res = (f) (fd, s + pos, n - pos);
Looks like sometimes `read' gets renamed to `_ssp_protected_read' and here
it looks like `f != read' when called as `atomicio6(read, ...'.
--
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)
From: christos@zoulas.com (Christos Zoulas)
To: Hauke Fath <hf@spg.tu-darmstadt.de>, gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, hannken@eis.cs.tu-bs.de
Subject: Re: bin/45200: Scp hangs after sending
Date: Mon, 1 Aug 2011 11:50:41 -0400
On Aug 1, 4:00pm, hf@spg.tu-darmstadt.de (Hauke Fath) wrote:
-- Subject: Re: bin/45200: Scp hangs after sending
| At 13:25 Uhr +0000 01.08.2011, J. Hannken-Illjes wrote:
| > > Could you see if the workaround in kern/45187 (#define NO_DIRECT_SELECT in
| > > sys/kern/sys_select.c) would fix it ?
| >
| > No difference -- looks more related to the latest OpenSSH update by christos:
| >
| > http://mail-index.netbsd.org/source-changes/2011/07/25/msg025035.html
| >
|
| Seconded. I am currently tracking -current closely on sparc, and I see the
| same issue after the openssh upgrade.
I had a different one last weekend where ssh -v cvs.netbsd.org would hang just
after:
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
I could not reproduce this when I switched from my verizon dsl to twc cable...
christos
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45200 CVS commit: src/crypto/external/bsd/openssh/dist
Date: Mon, 1 Aug 2011 11:55:01 -0400
Module Name: src
Committed By: christos
Date: Mon Aug 1 15:55:00 UTC 2011
Modified Files:
src/crypto/external/bsd/openssh/dist: atomicio.c
Log Message:
PR/45200: : J. Hannken-Illjes: Scp hangs after sending:
- check for vwrite() instead of read() to avoid read() being renamed by SSP
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssh/dist/atomicio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 02 Aug 2011 02:48:53 +0000
State-Changed-Why:
Did that fix it?
State-Changed-From-To: feedback->closed
State-Changed-By: hannken@NetBSD.org
State-Changed-When: Tue, 02 Aug 2011 06:01:33 +0000
State-Changed-Why:
Fixed in tree with rev 1.4 of src/crypto/external/bsd/openssh/dist/atomicio.c
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.