From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-06.nifty.com (conssluserg-06.nifty.com [210.131.2.91]) by sourceware.org (Postfix) with ESMTPS id BCAED3858420 for ; Fri, 17 Sep 2021 17:44:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BCAED3858420 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from Express5800-S70 (z221123.dynamic.ppp.asahi-net.or.jp [110.4.221.123]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 18HHhrbV023249 for ; Sat, 18 Sep 2021 02:43:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 18HHhrbV023249 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1631900633; bh=82o2OW1n/HTNlElz1ZN+iiMcoMEkPevIuT9HMgU/Gns=; h=Date:From:To:Subject:In-Reply-To:References:From; b=yQJlbyc8nmRyna2uo3Ypgy1XOWu8jjJUPoZZuoIjZj7OdJt8XOK4hMioGxSo6yfFo ciq6ivwvNh2wXRsCMQ47NyHHo+yIECRCt91dYxK81abfJvK3PVkXGG5LQXuar4Upx3 jxu9FFGiSo7y9LNSW33B4EcO6vzZZ0hzUgEQEY3T2YIih95pVL2GCU93pQdfDu31Yr LN15pNhDF0LzJxwlTIHTewBZ9Oh8qkKA2cyYv3Ww4MWphVOMGhvZWfuzVqOB9FFpdt reyyaVzJVgNy2hrWduG0w2yJuAGJsncmO2biNjNo1DRIOHFQDh0RsKX1ukSMUyLBHe wg3DFpE5O7OPg== X-Nifty-SrcIP: [110.4.221.123] Date: Sat, 18 Sep 2021 02:43:58 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-Id: <20210918024358.a9c2d43d539903c360ce6d6f@nifty.ne.jp> In-Reply-To: References: <20210915205433.014102a9c1204687135e1417@nifty.ne.jp> <20210915220450.a96397d8b8159d9adfbdab07@nifty.ne.jp> <3ca95472-9fb2-3e62-3e28-1bd2f85bc018@cornell.edu> <99e3ac84-bee1-4abd-de9a-4ea2e7b62b61@cornell.edu> <20210916180905.5f857dad0568be96ac36cba5@nifty.ne.jp> <20210916220201.63924a67f337ea876954d7c0@nifty.ne.jp> <20210916232756.fe8c744401b6cf703b1fe993@nifty.ne.jp> <4d9e4a0d-1fb0-5fe6-5e09-27ffde8f3174@cornell.edu> <0d5488da-3238-09be-5713-2f20e374ca21@cornell.edu> <20210917050108.0427cacf58fc473c63013386@nifty.ne.jp> <20210917173130.7e62602a5ef1bb5ae952d3bb@nifty.ne.jp> <7ec3a773-a75e-23ce-e827-850443b7d832@cornell.edu> <20210918012300.3c62456e1d2091d3086d1e69@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2021 17:44:17 -0000 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 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