delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/06/23/20:20:46

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 168883857C43
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1687566004;
bh=M8+lq8LOlcOTthPPkgo5iFNC1AymzkK1lGhjnW7TqCM=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=exDwUEFo7z/86JjLlZKxtbdqYx/+xOd0/CZDtRoPzS0TBPwesvr0zxUNN5PyhY8li
hJQDv5SWQVRxvf+eSxbKjCmPZZdmltzEjX6UM+07craIhIbCeFsKnmeUlWta1BjpbY
D7fnclX3Eh8oEecSbEuZorwXA2mGiVVuqzARNnrE=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3FE923858C3A
X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn
Message-ID: <754ed51d-ba50-5268-9150-1c6b5c86b5ca@house.org>
Date: Fri, 23 Jun 2023 17:19:14 -0700
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Subject: Re: scp and ssh 'cat' stalls at 64k bytes
To: cygwin AT cygwin DOT com
References: <1b9482bd-2119-732f-cc49-a3930bd3328d AT house DOT org>
<947c6b09-c2c0-03db-a4ac-769c4f1b3783 AT Shaw DOT ca>
<7fd038be-e163-a5d3-5e28-d79eef977ee5 AT house DOT org>
<MW4PR84MB1684932344B153F3E4F4415AFE23A AT MW4PR84MB1684 DOT NAMPRD84 DOT PROD DOT OUTLOOK DOT COM>
<bced83bb-58c5-f2a8-bc03-578d6d9fd749 AT house DOT org>
<MW4PR84MB1684E6210C73D34ED2223319FE23A AT MW4PR84MB1684 DOT NAMPRD84 DOT PROD DOT OUTLOOK DOT COM>
In-Reply-To: <MW4PR84MB1684E6210C73D34ED2223319FE23A@MW4PR84MB1684.NAMPRD84.PROD.OUTLOOK.COM>
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, BODY_8BITS,
KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Chris Roehrig via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Chris Roehrig <croehrig AT house DOT org>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 35O0KS4O021325

No worries; I imagine most people don't run sshd on cygwin.  It looks to 
me like the issue involves i/o between sshd and its sub-processes on cygwin.

Is anyone else able to successfully scp large files (>64KB) to cygwin as 
the remote receiving end (with the latest cygwin)?


On 2023-06-23 16:27, Voris, Ben wrote:
> I did not and cannot. Sorry.
>
> Fwiw, pushing from Cygwin to the remote also worked.
>
>> -----Original Message-----
>> From: Chris Roehrig <croehrig AT house DOT org>
>> Sent: 23 June 2023 17:23
>> To: Voris, Ben <ben DOT voris AT hpe DOT com>
>> Subject: Re: scp and ssh 'cat' stalls at 64k bytes
>>
>> Did you execute the scp on the remote (e.g. Linux) host?     It only
>> fails when cygwin is the remote and target end (i.e. "pushing" to a
>> cygwin host);  "pulling" works fine.
>>
>>
>> On 2023-06-23 16:07, Voris, Ben wrote:
>>> Using scp from OpenSSH_9.3p1, 30 May 2023, copied a 8317351936 byte file from
>> a remote to Cygwin. sha1sum says it arrived correctly.
>>> Windows Firewall is running.
>>>
>>>> -----Original Message-----
>>>> From: Chris Roehrig <croehrig AT house DOT org>
>>>> Sent: 23 June 2023 13:42
>>>> To: cygwin AT cygwin DOT com
>>>> Subject: Re: scp and ssh 'cat' stalls at 64k bytes
>>>>
>>>>
>>>> On 2023-06-23 08:28, Brian Inglis wrote:
>>>>> On 2023-06-23 00:26, Chris Roehrig via Cygwin wrote:
>>>>>> I've upgraded cygwin recently (from a much older version) and am
>>>>>> encountering a new problem on all my Win10/WIn11 machines.
>>>>>>
>>>>>> With openssh and pv installed on cygwin (3.4.7-1):
>>>>>>
>>>>>> dd if=/dev/zero bs=1 count=65536 | ssh localhost 'cat > /dev/null'
>>>>>> # works
>>>>>> dd if=/dev/zero bs=1 count=65537 | ssh localhost 'cat > /dev/null'
>>>>>> # stalls (and anything larger)
>>>>>> dd if=/dev/zero bs=1 count=65537 | ssh localhost 'pv > /dev/null'
>>>>>> # replace 'cat' with 'pv' and it works
>>>>>>
>>>>>> This happens with or without Windows Firewall enabled, with any input
>>>>>>> 64k, and also remotely from Linux.
>>>>>> It also seems to affect scp to cygwin which stalls if the file is >= 64k
>>>>> In case equivalent Windows services are running, I check for, shut
>>>>> down, and disable the following Windows services I have seen, or seen
>>>>> warnings about, before trying to start Cygwin services:
>>>>>
>>>>>       ssh ssh-agent sshbroker sshproxy sshd sshdbroker sshdproxy
>>>>>
>>>>> Do you take similar precautions on the Windows systems with issues?
>>>> The only service listed is ssh-agent which is disabled and stopped.
>>>> TaskManager did show many zombie/stuck cat.exe  and scp.exe which I
>>>> terminated, but that did not help.   Nor did rebooting.
>>>>
>>>> I use ssh, rsync, slogin frequently on these machines to/from windows
>>>> and linux and rsync (over ssh) gigabytes of stuff daily to/from Linux
>>>> and other windows machines with no issues.   It is only this case of
>>>> reading more than 64K from stdin over ssh (and scp) that is hanging.
>>>>
>>>>> Please show at least the output of `uname -srvmo`,
>>>> CYGWIN_NT-10.0-19045 3.4.7-1.x86_64 2023-06-16 14:04 UTC x86_64 Cygwin
>>>>
>>>>> and if possible provide a text attachment of the output log from
>>>>> running `cygcheck -hrsv > cygcheck.out`, as suggested under the
>>>>> Problem reports link below.
>>>> I've attached the file.
>>>>
>>>>
>>>> I take it then you can't replicate this?    Can you confirm whether this
>>>> command works successfully (i.e. exits without hanging):
>>>>
>>>> dd if=/dev/zero bs=1 count=65537 | ssh localhost 'cat > /dev/null'
>>>>
>>>> Are you able to 'scp' large files to cygwin?
>>>>
>>>>
>>>> It also hangs if I replace 'cat' with 'sed {}' or 'awk {print}', but not
>>>> with 'pv'.   Those all passthrough stdin>stdout and should behave the
>>>> same as cat.  (pv is basically cat with a progress bar which is omitted
>>>> if there's  no controlling terminal like in this case).
>>>>
>>>>
>>>> The curious fact that 'pv' works makes me think it is a Cygwin library
>>>> problem and not anything related to firewall/network/Windows.
>>>>
>>>> I've verified that cat, pv, and sshd all have the same ACLs.  e.g.
>>>> aquila[77]% icacls pv.exe
>>>> pv.exe AQUILA\croehrig:(F)
>>>>            BUILTIN\Administrators:(RX)
>>>>           Everyone:(RX)


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019