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

Takashi Yano takashi.yano@nifty.ne.jp
Fri Sep 17 17:43:58 GMT 2021


On Fri, 17 Sep 2021 13:08:35 -0400
Ken Brown wrote:
> On 9/17/2021 12:23 PM, Takashi Yano wrote:
> > 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.
> 
> Are we just missing AM_LDFLAGS containing "-static" in 
> winsup/utils/mingw/Makefile.am?  But why is this just affecting some tools, and 
> why the difference between 32 bit and 64 bit?

Adding 
AM_LDFLAGS = -static
in winsup/utils/mingw/Makefile.am
and rerun winsup/autogen.sh resolves the issue.

Just compiling the hello.cc:
#include <cstdio>
int main()
{
        printf("Hello\n");
        return 0;
}
causes same behaiviour.

With 32bit mingw compiler,
        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

With 64bit mingw compiler,
        ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffc56330000)
        KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffc54460000)
        KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll (0x7ffc53a50000)
        msvcrt.dll => /cygdrive/c/WINDOWS/System32/msvcrt.dll (0x7ffc54800000)

I also confirmed that mingw compiler (v10.3.0) from MSYS2
have such difference between 32bit and 64bit compiler.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin-developers mailing list