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

Mark Geisert
Tue Sep 21 21:10:30 GMT 2021

Takashi Yano wrote:
> On Tue, 21 Sep 2021 09:26:09 +0000 (UTC)
> Mark Geisert wrote:
>> Sep 21, 2021 1:31:28 AM Takashi Yano <>:
>>> On Mon, 20 Sep 2021 17:39:54 -0400
>>> Ken Brown wrote:
>>>> I'll push it tomorrow unless you find something that needs to be changed before
>>>> then.
>>> * Add name check when cached information is used.
>>> * Confirm Name.Buffer returned by NtQueryObject() is not NULL.
>>> * Add error check for HeapAlloc().
>> Sorry if this is a dumb question, but why HeapAlloc? If the buffer is only needed temporarily wouldn't alloca work? Or malloc?
> This function (temporary_query_hdl()) is called within a  system call,
> so calling another system call from it is not good idea I think.
> For example, errno may be changed by malloc().

I've now had a chance to look at the surrounding code and I have no big issue with 
it.  It's just uncommon to see HeapAlloc/HeapFree used within the Cygwin DLL 
because blocks allocated with it won't be free-able in the child after a fork. 
But for short-term use guaranteed to be localized in-process like what you're 
doing I guess it's OK.  Carry on!


More information about the Cygwin-developers mailing list