From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by sourceware.org (Postfix) with ESMTPS id 42DFD3858401 for ; Tue, 31 Aug 2021 10:05:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 42DFD3858401 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 (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mc02Z-1mr1wm3weF-00dZGt for ; Tue, 31 Aug 2021 12:05:43 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id EBD3CA80D9A; Tue, 31 Aug 2021 12:05:42 +0200 (CEST) Date: Tue, 31 Aug 2021 12:05:42 +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: <20210830092259.52f7d54fc3fa340738373af4@nifty.ne.jp> <529d7dd7-d876-ca51-cc1f-e414d3c24f71@cornell.edu> <20210831175534.21edae2356d74a0750c686de@nifty.ne.jp> <20210831182500.4c1c67dae13f51ca68964f63@nifty.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210831182500.4c1c67dae13f51ca68964f63@nifty.ne.jp> X-Provags-ID: V03:K1:GbDv4Mw+jxk668bRqFE+BrmK4PCfjPodBXioawS3YWrZ/7raYwd +4ufuCgMwC/z568BuwCjVJlmazAGAy6OKcjTHLthyacIwWXshiwTnKkrAOYxlGaQz5iB9AR xAyiQZ2GA2OfJiP/Lyrc/LvLTDkmV2AsAx9fM2C3KRWMzVBx9q6Jcvhq8JK4c5uFLRxf89U 1CgalZkYBV280M3+DQ9Kg== X-UI-Out-Filterresults: notjunk:1;V03:K0:Q7Y8vAv8wTU=:j49o3pgbTJRhL3Tr/7Chr+ Z0nFN/XEX4fqaPXAvVLoeMbOh0hu7fCtuGiRuZ8Yy5yeaM7pOEcJdbMixtNJHswmv5KsuHni/ ulBAiuZtScJJYqM7OKronDWBU5KXGAM5JNEqGUo7PDck164ffJ3VBIXCoNjrPWl2fNYSs5a7Q bDdTJac8KqahHQs/PtXtQlkLxvneMwSSdfaGoqc9vjLY7rvVFB7e+R7o5bhJ8UE/GU+BBuvJb yeg7eGTBtc9WJ1yf1a34N9/47zK/EgSQeYDdIRc2Kdy1gU2bJhNjGn60HDjkohpgZcTpWTZaO UpGKv2rF6TETw+1t7wdg7JIFhe0mOM2bsCEEfUSqDErpE7pkJP4JRIBOfRVdpyJM4Ibnd56fF KfODlwAJrdi3mBRDZgKDeSc3i6h1lOh5gMLRJvWOxSqb4bvCUu6lgVY/Xq/PKdgRz/z/7VYqr 8bBTcw2CBWdm3HKB5Q/jlcJ7gTvXdkj2YicpF/snT9OiRVmJrVhX+8zLMO2t2WEEujX48THFH rVBnkZ5ba/vCbGrcJetaZUd9+wA995u8IBNcDuJbsiuSJ3HRTYy/CwwsFyHHy0mvfmBz98/oO 0IaKMWp0sJprK8C9rULX/XrzzzCFSeDeMneRByJvx1xU7OazD5sfSVhlnlOfY/jOR+YvdSvHL /4aBi9oAv8YycT5r8zjLqShHMxs7YV0PKHizm0p6lO5Z37aXW06R8prl5UBnGIo19dWdemPOC NbuMbZLIK/+pF5ax0JcWMcnxb6ETQ1qR9VTex86x6fMt0/Rqlq8isvJ75ss= X-Spam-Status: No, score=-100.0 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, 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, 31 Aug 2021 10:05:48 -0000 On Aug 31 18:25, Takashi Yano wrote: > On Tue, 31 Aug 2021 11:08:42 +0200 > Corinna Vinschenwrote: > > On Aug 31 17:55, Takashi Yano wrote: > > > On Mon, 30 Aug 2021 22:14:15 +0200 > > > Corinna Vinschen wrote: > > > > Hi Ken, Hi Takashi, > > > > > > > > On Aug 30 19:00, Corinna Vinschen wrote: > > > > Well, what about keeping a duplicate of the read side handle on the > > > > write side just for calling NtQueryInformationFile? > > > > > > > > Attached is an untested patch, can you have a look if that makes sense? > > > > > > > > Btw., I think I found a bug in the new fhandler_pipe::create. If the > > > > function fails to create the write side fhandler, it deletes the read > > > > side fhandler, but neglects to close the read handle. My patch fixes > > > > that. > > > > > > > > While looking into this I found a problem in fhandler_disk_file in > > > > terms of handle inheritance of the special handle for pread/pwrite. > > > > I already force pushed this onto topic/pipe. > > > > > > I tested your patch attached. Unfortunately, select() does not work > > > as expected for write pipe. Even if the select reports write pipe > > > is available, writing to pipe fails. It seems that your patch fails > > > to detect pipe full. > > > > Bummer. Is that with byte mode pipes or with message mode pipes? If > > the latter, if you try to write more data than available in the buffer, > > it's bound to fail. > > Both message pipe and byte pipe. > > > Did you add debug output to pipe_data_available to see how the > > information looks like? Or do you have a simple, self-contained > > testcase in plain C? > > The test case is attached. If select() works as expected, the program > does not show "r" or "w". However, with your patch, the program prints > many "w" (means write() fails with EAGAIN). Thanks! I found th culprit, but we have another problem. Even if select returns correct info, A write, trying to write more bytes than are available in the buffer, hangs. This shouldn't happen. Still digging... Corinna