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

Jon Turney jon.turney@dronecode.org.uk
Fri Sep 17 17:39:44 GMT 2021


On 17/09/2021 18:08, Ken Brown wrote:
> On 9/17/2021 12:23 PM, Takashi Yano wrote:
>> On Fri, 17 Sep 2021 07:16:03 -0400
>> Ken Brown wrote:
>>> Sorry, I was unclear.  The pop-up wasn't saying that mintty needs
>>> libgcc_s_sjlj-1.dll; it was saying that strace needs it.  Even 
>>> 'strace -h'
>>> causes that pop-up to appear.  In order to get strace to run, I have 
>>> to copy
>>> libgcc_s_sjlj-1.dll and libwinpthread-1.dll to my CWD.  Then I run 
>>> strace on
>>> mintty and it starts up instantly, and the strace output shows both 
>>> of those
>>> libs being loaded.
>>>
>>> One other thing I should mention is that for my testing, I did a 
>>> complete
>>> install of the cygwin package (as produced by cygport), not just 
>>> cygwin1.dll.
>>> My cygport file is attached.
>>>
>>> I have a feeling that something is wrong with my 32-bit installation, 
>>> perhaps as
>>> a result of prior testing.  I'm going to start fresh with a new 32-bit
>>> installation and see what happens.
>>
>> I can reproduce your problem by replacing cygwin-console-helper.exe
>> to newly build one.
>>
>> With cygwin-console-helper.exe of cygwin 3.2.0,
>> ldd /bin/cygwin-console-helper.exe shows
>>          ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x77460000)
>>          KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL 
>> (0x76ef0000)
>>          KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll 
>> (0x75f10000)
>>          msvcrt.dll => /cygdrive/c/WINDOWS/System32/msvcrt.dll 
>> (0x75640000)
>>
>> However, with newlib-built one,
>> ldd /bin/cygwin-console-helper.exe shows
>>          ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x77460000)
>>          KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL 
>> (0x76ef0000)
>>          KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll 
>> (0x75f10000)
>>          msvcrt.dll => /cygdrive/c/WINDOWS/System32/msvcrt.dll 
>> (0x75640000)
>>          libgcc_s_sjlj-1.dll => not found
>>
>> It seems to depend on libgcc_s_sjlj-1.dll and libwinpthread-1.dll.
>>
>> It seems that the tools under winsup/utils/mingw get dynamically linked
>> while old ones are statically linked.
> 
> This even happens on 64 bit for at least one tool...
> 
> $ ldd /bin/cygcheck.exe
>          ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ff8046b0000)
>          KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ff802e60000)
>          KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll 
> (0x7ff801f30000)
>          ADVAPI32.dll => /c/WINDOWS/System32/ADVAPI32.dll (0x7ff802d80000)
>          msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7ff803a90000)
>          sechost.dll => /c/WINDOWS/System32/sechost.dll (0x7ff803e20000)
>          RPCRT4.dll => /c/WINDOWS/System32/RPCRT4.dll (0x7ff803b30000)
>          PSAPI.DLL => /c/WINDOWS/System32/PSAPI.DLL (0x7ff803a70000)
>          USER32.dll => /c/WINDOWS/System32/USER32.dll (0x7ff8030c0000)
>          win32u.dll => /c/WINDOWS/System32/win32u.dll (0x7ff802540000)
>          GDI32.dll => /c/WINDOWS/System32/GDI32.dll (0x7ff803030000)
>          gdi32full.dll => /c/WINDOWS/System32/gdi32full.dll 
> (0x7ff802400000)
>          msvcp_win.dll => /c/WINDOWS/System32/msvcp_win.dll 
> (0x7ff802200000)
>          ucrtbase.dll => /c/WINDOWS/System32/ucrtbase.dll (0x7ff802600000)
>          WININET.dll => /c/WINDOWS/SYSTEM32/WININET.dll (0x7fffea2e0000)
>          zlib1.dll => not found
> 
> ...but not for all...
> 
> $ ldd cygwin-console-helper.exe
>          ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ff8046b0000)
>          KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ff802e60000)
>          KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll 
> (0x7ff801f30000)
>          msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7ff803a90000)
> 
> Are we just missing AM_LDFLAGS containing "-static" in 
> winsup/utils/mingw/Makefile.am?  But why is this just affecting some 

Yes, it seems I missed that when doing the automake conversion.

Apologies for the inconvenience.

> tools, and why the difference between 32 bit and 64 bit?

I believe that on 64-bit, SEH exception handling is being used, which 
doesn't have a personality DLL.


More information about the Cygwin-developers mailing list