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

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Sep 14 14:15:09 GMT 2021


On Sep 14 08:38, Ken Brown wrote:
> On 9/14/2021 4:47 AM, Corinna Vinschen wrote:
> > On Sep 14 17:07, Takashi Yano wrote:
> > > On Mon, 13 Sep 2021 22:15:25 +0200
> > > Corinna Vinschen wrote:
> > > > That should depend on the O_CLOEXEC setting, but identically for
> > > > all handles in the fhandler.
> > > 
> > > I found the cause. set_close_on_exec() in fhandler_pipe is missing.
> > > set_no_inheritance() calls for all adjunct handles are necessary.
> > > 
> > > > I pushed two more patches to topic/pipe in terms of inheritence,
> > > > maybe that gives a clue?
> > > 
> > > I attached two additional patch for this issue.
> > 
> > Uh oh!  This patch to fhandler_base::dup made me check other fhandlers
> > and, yeah, we have more unconditional inheritence ignoring O_CLOEXEC
> > (fhandler_tape for instance).  We should fix that at one point, but that
> > requires your patch to go to master first.  Let's just keep that in mind
> > for now.
> 
> I think the change to fhandler_base::dup was unnecessary (technically),
> because dtable::dup_worker takes care of that with
> 
>   newfh->set_close_on_exec (!!(flags & O_CLOEXEC));

Right...  and that reminds me we have to check all fhandlers for
set_close_on_exec being correct, too :}

> But the code is certainly more clear after the change, and I agree that it
> should be changed in the other fhandlers also.

:+1:


Corinna


More information about the Cygwin-developers mailing list