cygrunsrv + sshd + rsync = 20 times too slow -- throttled?

Takashi Yano takashi.yano@nifty.ne.jp
Tue Aug 31 09:25:00 GMT 2021


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).

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stc.c
Type: text/x-csrc
Size: 1797 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-developers/attachments/20210831/371e8f71/attachment.bin>


More information about the Cygwin-developers mailing list