From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by sourceware.org (Postfix) with ESMTPS id EA0283858415 for ; Tue, 7 Sep 2021 09:14:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EA0283858415 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MQ5jC-1maoq541tQ-00M2Nk for ; Tue, 07 Sep 2021 11:14:30 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id A9AB8A80D89; Tue, 7 Sep 2021 11:14:28 +0200 (CEST) Date: Tue, 7 Sep 2021 11:14:28 +0200 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-ID: Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <20210905224059.cfdc8f23d3eeaa1ea16ecf2e@nifty.ne.jp> <20210905225037.c625ee0bcd479181848763f8@nifty.ne.jp> <20210906050950.56b397be7c5eb3da848691e9@nifty.ne.jp> <20210906201643.2e84c0d3a7ac7c8878548408@nifty.ne.jp> <20210906221649.8001d3cb554011d02309b407@nifty.ne.jp> <20210907083929.71ae792a4375825295d0c251@nifty.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210907083929.71ae792a4375825295d0c251@nifty.ne.jp> X-Provags-ID: V03:K1:rIEeJNDS1KQou0bo1zZRF3bYvDwJN02zFOG/DyRMAcGbF+njfgy UTTiFN9SLdWlQLqjRrWwKSAj7DTuiLWUG8ZU3imvfQGUmUGplVqRBGFCEwgCkkTwtUCxkh8 8eojczl4ES1qyBWshJzfoceK0V+0QaWfLsyxe1yxcFm9KHVOwjDeviNVsavF4OXtYmYaCEJ dIV21pbiBydO7r1/c2szw== X-UI-Out-Filterresults: notjunk:1;V03:K0:kIO7ON+++tE=:i9xrH3sO0Ybg5s83PPLcff jRqYNLZ4r+E8xNtMndW+DcJky+fD9BTfYujC2dBFiXICtfzhaTFp76AHZ33jG2y5Sa95tkRQ/ s7TsTVjQgLe9EAJaT0aX0qgIanCbQ93Pf4161cKpBV6r7STyP3vFvGKJNyqmbKtGPdt27d8ax zvHACTDYwN3epVJlBlF6+V4IkFomx5EjCwMIJ8XhW6ZVc0Na119GsoOykcAyybd4XPNjIUWm5 3HPAiwrIN4nx4NbTWEC5I9beXFZht7hvaju5ImKkAk21SiCBiNgFDsvVzj2obsz2erfuAQnJO UN/fRQWbHAhEHy2BUmUcwXltTVaPt7mIgUcLs+tvY2ATI17N0rA6PdPLdjk3KGaGwUGgtR7E4 Gxwy2hq3Ay7ifENpM6fDqylKbszGuBkrwk+77/lotlkKpA30R7xLnOo6kJJ7xArDUB/Hjr8B3 Drhvh/idcso4x114fS/1qe3/jBgqAdkSvIUTqpXzXCSvPPP5NWOdxpW0BUnIzPiQMPyOuKgfG rti4MpUfGz1L8TwRZZeRCIj6Iy/LdknTW/K2v5Avdld2Jy8Pw7kutbQKX8uB27J6LsxpP06om PD7Js25tMyEiW5EoiRxyuvADj3XkVUKceolIJqAcvs98ykjiR1+XTd41wnXk4ejlDsnO5EfJg QApGosaGV5a+/PXkspZZtGW0+bhP9iBBLwmMUVlOGHOsV6XlTGGpsDkexRZtEQ3SXd0rpdSbv 3LtgArISpyk2AvIyjlZDPPyWZ8yVa/pK5V8OKUWDXXF2ZdQtwH4ZIeQTtOo= X-Spam-Status: No, score=-99.7 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2021 09:14:34 -0000 On Sep 7 08:39, Takashi Yano wrote: > On Mon, 6 Sep 2021 18:08:54 +0200 > Corinna Vinschen wrote: > > On Sep 6 22:16, Takashi Yano wrote: > > > Current git head seems to have some bug. With and without my patch, > > > sftp get for large file causes error: > > > > > > [yano@Express5800-S70 ~]$ sftp 192.168.0.133 > > > yano@192.168.0.133's password: > > > Connected to 192.168.0.133. > > > sftp> get test.dat > > > Fetching /home/yano/test.dat to test.dat > > > test.dat 13% 66MB 66.4MB/s 00:06 ETAReceived message too long 1728053256 > > > Ensure the remote shell produces no output for non-interactive sessions. > > > [yano@Express5800-S70 ~]$ sftp 192.168.0.133 > > > yano@192.168.0.133's password: > > > Connected to 192.168.0.133. > > > sftp> get test.dat > > > Fetching /home/yano/test.dat to test.dat > > > test.dat 22% 111MB 110.6MB/s 00:03 ETAdo_download: parse: incomplete message > > > [yano@Express5800-S70 ~]$ > > > > I bisected this down to commit 296bd3e78b52, but I'm at a loss in > > terms of the cause of the problem, ATM. > > Thanks for bisecting this. > > I am not sure this is the correct thing, however, found the following > patch solves the issue. Thanks for the patch! It's not correct as such, because it enables SA_RESTART behaviour unconditionally, but it gave me the right hint. The underlying problem is that in case of a signal, the CancelIo call was missing. The signal was processed, but the IO was still ongoing and so data was read or written without the application's knowledge. Actually we can always call CancelIo. It doesn't break the information in the IO_STATUS_BLOCK if the IO was already finished. It just sets io.Status to STATUS_CANCELLED and io.Information to the number of bytes processed if it really canceled the ongoing IO. I pushed a matching patch. Thanks again! Corinna