From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-03.nifty.com (conssluserg-03.nifty.com [210.131.2.82]) by sourceware.org (Postfix) with ESMTPS id 2AC8A3858413 for ; Mon, 6 Sep 2021 23:39:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2AC8A3858413 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from Express5800-S70 (z221123.dynamic.ppp.asahi-net.or.jp [110.4.221.123]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 186NdMoi008180 for ; Tue, 7 Sep 2021 08:39:22 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 186NdMoi008180 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1630971562; bh=mNoD3R18lGVtiU49HgqXel3Utqwph4o6DuW7/227xQ0=; h=Date:From:To:Subject:In-Reply-To:References:From; b=DK061D7ExFv4LfX39eQVWqlyIrTQGqO/kpuOuz1vt3/bMwjBL/YCevTfYudUv2aHI KZhpo5mG/vpE0tw0m7aXiLsPnPICPF9yfOlruzJ+v4ZxAZDWWxoHpf9uq/C+rMn6ZH GEt41noc3KXu1WEN/LsEhU6EZ3LOohLIE++LiR0ddxOV74RRhlqx/UxnVIX8lM2Okb puJelUbeZ53QHsgeYtld8Oi5LvMBth7ZGnVxnvMXsXI8EBFqKab9PyFzg0wRW74lNr PlG2uigcN947uSjiU88t21y2QGluOueXM/jkBM1xPHdXpbkKnehr8liqkfPChBxm0+ vNsWyovU/sgqg== X-Nifty-SrcIP: [110.4.221.123] Date: Tue, 7 Sep 2021 08:39:29 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-Id: <20210907083929.71ae792a4375825295d0c251@nifty.ne.jp> In-Reply-To: References: <51cb0cef-c3fd-1320-c2dd-a868bf1ffaae@cornell.edu> <20210905081523.0db04d9402abf87635066eb7@nifty.ne.jp> <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> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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: Mon, 06 Sep 2021 23:39:58 -0000 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. diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler_pipe.cc index 76ce895e2..83efb8296 100644 --- a/winsup/cygwin/fhandler_pipe.cc +++ b/winsup/cygwin/fhandler_pipe.cc @@ -292,7 +292,7 @@ fhandler_pipe::raw_read (void *ptr, size_t& len) len1, NULL, NULL); if (evt && status == STATUS_PENDING) { - waitret = cygwait (evt, INFINITE, cw_cancel | cw_sig); + waitret = cygwait (evt, INFINITE, cw_cancel | cw_sig_restart); if (waitret == WAIT_OBJECT_0) status = io.Status; } @@ -442,7 +442,7 @@ fhandler_pipe_fifo::raw_write (const void *ptr, size_t len) } if (evt && status == STATUS_PENDING) { - waitret = cygwait (evt, INFINITE, cw_cancel | cw_sig); + waitret = cygwait (evt, INFINITE, cw_cancel | cw_sig_restart); if (waitret == WAIT_OBJECT_0) status = io.Status; } -- Takashi Yano