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

Ken Brown
Fri Sep 17 11:16:03 GMT 2021

On 9/17/2021 4:31 AM, Takashi Yano wrote:
> On Thu, 16 Sep 2021 22:25:33 -0400
> Ken Brown wrote:
>> On 9/16/2021 4:01 PM, Takashi Yano wrote:
>>> On Thu, 16 Sep 2021 15:48:58 -0400
>>> Ken Brown wrote:
>>>> I just noticed something very surprising.  Up to now, all my tests have been on
>>>> 64-bit.  But I just tested the current git head on 32-bit Cygwin, and found that
>>>> mintty is very slow to start.  If I click on the Cygwin Terminal shortcut,
>>>> there's a long delay (about 10 seconds on my system) before the window appears.
>>>>     Moreover, the window doesn't have focus when it does appear.
>>>> Can anyone else reproduce this?
>>> I cannot reproduce that.
>>> Proberbly 'strace -o mintty.log mintty' may help to find
>>> what is wrong.
>> This is getting stranger and stranger.  When I try to run strace, I get a pop-up
>> complaining that libgcc_s_sjlj-1.dll was not found.
>> I'll have to try to sort it out tomorrow.
> 32bit mintty seems to require only the following files.
> bash.exe
> cyggcc_s-1.dll
> cygiconv-2.dll
> cygintl-8.dll
> cygncursesw-10.dll
> cygreadline7.dll
> cygwin1.dll
> cygwin-console-helper.exe
> mintty.exe
> None of them depends on libgcc_s_sjlj-1.dll.
> What happes if you put them into a new directory and run
> mintty in it?
> 'strace mintty' also should work with these minimum files.

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.

-------------- next part --------------

# Release
# Test
inherit git

inherit toolchain

# From .appveyor.yml in Cygwin git repo
gcc-core \
gcc-g++ \
autoconf \
automake \
make \
perl \
patch \
cocom \
gettext-devel \
libiconv-devel \
zlib-devel \
mingw64-${ARCH}-gcc-core \
mingw64-${ARCH}-gcc-g++ \
mingw64-${ARCH}-zlib \
dejagnu \
dblatex \
docbook2X \
docbook-xml45 \
docbook-xsl \
texlive-collection-latexrecommended \
texlive-collection-fontsrecommended \
texlive-collection-pictures \
xmlto \
python38-lxml \

PKG_NAMES="cygwin cygwin-devel cygwin-doc"

# cygwin base package

cygwin_SUMMARY="The UNIX emulation engine"
cygwin_DESCRIPTION="The UNIX emulation engine"

# cygwin-devel package

cygwin_devel_SUMMARY="Core development files"
cygwin_devel_DESCRIPTION="Core development files required to build Cygwin packages"
cygwin_devel_CONTENTS="usr/include/ usr/lib/"

# cygwin doc package

cygwin_doc_SUMMARY="Cygwin-specific documentation, including man pages"
cygwin_doc_DESCRIPTION="Documentation for Cygwin and newlib, including man
pages and texinfo files."
cygwin_doc_CONTENTS="usr/share/man/ usr/share/info/ usr/share/doc/cygwin-doc/ usr/share/doc/newlib/ etc/postinstall/ etc/preremove/"


DIFF_EXCLUDES=" parser.out"

# This is needed since we otherwise end up with two dirs in usr/share/doc
# which only differ by case, "cygwin" and "Cygwin".  That's not feasible for
# the distro.  Therefore we suppress generation of the default docs and create
# our own cygwin-${PV} dir for the docs in src_install.

src_compile() {
  cd ${S}
  cd ${B}
  # cygport compiles with _FORTIFY_SOURCE=2 -fstack-protector by default.
  # This doesn't work for the lib itself
  CFLAGS+=" -Wp,-U_FORTIFY_SOURCE -fno-stack-protector"
  CXXFLAGS+=" -Wp,-U_FORTIFY_SOURCE -fno-stack-protector"

  # make newlib info and manpage documentation
  cd ${B}/${CHOST}/newlib
  cygmake info man

src_install() {
  cd ${B}
  # tooldir and gcc_tooldir must be set to install correctly even when
  # building on a non-Cygwin build machine.
  cyginstall -j1 tooldir=/usr gcc_tooldir=/usr

  # Workaround the problem that the Cygwin DLL is already stripped and
  # a cygwin1.dbg file exists.
  insinto /usr/lib/debug/usr/bin
  doins ${B}/${ARCH}-pc-cygwin/winsup/cygwin/cygwin1.dbg
  dosym ../lib/debug/usr/bin/cygwin1.dbg /usr/bin/cygwin1.dbg

  # install newlib info and manpage documentation
  cd ${B}/${CHOST}/newlib
  cygmake DESTDIR=${D} install-info install-man

  # cygwin-doc postinstall
  cd ${I}
  cd ${B}/${CHOST}/winsup/doc
  cygmake DESTDIR=${D} install-etc

  cd ${S}
  docinto /cygwin-doc

  docinto /newlib
  dodoc COPYING.NEWLIB newlib/HOWTO newlib/NEWS newlib/README

  cd ${D}
  rm -rf usr/include/iconv.h usr/include/unctrl.h usr/include/rpc \
	 usr/lib/libiberty.a usr/share/locale \
	 usr/share/info/ usr/share/info/


More information about the Cygwin-developers mailing list