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 <croeh...@house.org> > Sent: 23 June 2023 13:42 > To: cygwin@cygwin.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