On 9/21/2020 10:53 AM, Praveen Kumar Chandrakar via Cygwin wrote:
Hello,

We are experiencing some issues with the Cygwin commands (ie. from bash
-login) taking several minutes on three of our Windows 2016 servers.

     ls -al -- 1min 32sec

     find  -- 4min 46sec

When you search for a specific file, such as ls -al ./ABC/XYZ.txt, it is
very quick.

We ran strace on the machines where it is quick and where it slow.

Here is some annotation for not working and working excerpted from the
files:

*=====> Not working Scenario*

Command run: strace -m all -o does-not-work.txt find . -name VNM.OUT

===> Initially it hangs here for 15-25 seconds: samlib.dll

   214  995796 [main] find 7768 symlink_info::check: 0 =
symlink.check(D:\Abc\Xyz\conf.txt, 0x64B818) (0x404022)
--- Process 7768 loaded C:\Windows\SysWOW64\samcli.dll at 73080000
--- Process 7768 loaded C:\Windows\SysWOW64\samlib.dll at 72c90000
  5435  423059 [main] find 7768 pwdgrp::fetch_account_from_windows: line:
<WMW2CAOC01+TempUser Users:S-1-5-21-858922594-1104986591-3574882633-1
000:197608:>

===> Then the rest of the almost 4 minutes, it hangs at FWPUCLNT.DLL

   214  995796 [main] find 7768 symlink_info::check: 0 =
symlink.check(D:\Abc\Xyz\conf.txt, 0x64B818) (0x404022)
--- Process 7768 loaded C:\Windows\SysWOW64\FWPUCLNT.DLL at 73950000
--- Process 7768 thread 4596 exited with status 0x0
--- Process 7768 thread 6568 exited with status 0x0
--- Process 7768 thread 7040 exited with status 0x0
82877524 83873956 [main] find 7768 pwdgrp::fetch_account_from_windows:
line: <sa-ca:*:1050640:1049089:U-TAS\sa-ca,S-1-5-21-3577821319-10804827
17-3061384290-2064:/home/sa-ca:/bin/bash>


===> You see the process threads created, and created again, then they
close after FWPUCLNT.DLL unfreezes (see above)

drwx------    1 CKimball UsersGrp         0 Jul 28 23:13 ..
   303  995341 [main] find 7768 symlink_info::check: 0x0 = NtCreateFile
(\??\D:\Abc\Xyz\conf.txt)
   241  995582 [main] find 7768 symlink_info::check: not a symlink
   214  995796 [main] find 7768 symlink_info::check: 0 =
symlink.check(D:\Abc\Xyz\conf.txt, 0x64B818) (0x404022)
--- Process 7768 loaded C:\Windows\SysWOW64\FWPUCLNT.DLL at 73950000
--- Process 7768 thread 4596 created
--- Process 7768 thread 6568 created
--- Process 7768 loaded D:\Cygwin\bin\cygintl-8.dll at 645e0000
--- Process 7768 loaded D:\Cygwin\bin\cygwin1.dll at 61000000
--- Process 7768 loaded D:\Cygwin\bin\cygiconv-2.dll at 6f150000
     6       6 [main] find (7768)
**********************************************
   505     511 [main] find (7768) Program name: D:\Cygwin\bin\find.exe
(windows pid 7768)
   203     714 [main] find (7768) OS version:   Windows NT-10.0
   183     897 [main] find (7768)
**********************************************
--- Process 7768 loaded C:\Windows\SysWOW64\advapi32.dll at 754e0000
--- Process 7768 loaded C:\Windows\SysWOW64\msvcrt.dll at 753d0000
--- Process 7768 loaded C:\Windows\SysWOW64\sechost.dll at 75490000
   212  996008 [main] find 7768 path_conv::check:
this->path(D:\Abc\Xyz\conf.txt), has_acls(1)
--- Process 7768 thread 7040 created
--- Process 7768 thread 4596 created
--- Process 7768 loaded D:\Cygwin\bin\cyggcc_s-1.dll at 6c100000
--- Process 7768 thread 6568 created
--- Process 7768 loaded D:\Cygwin\bin\cygintl-8.dll at 645e0000
--- Process 7768 loaded D:\Cygwin\bin\cygwin1.dll at 61000000
--- Process 7768 loaded D:\Cygwin\bin\cygiconv-2.dll at 6f150000
     6       6 [main] find (7768)
**********************************************
   505     511 [main] find (7768) Program name: D:\Cygwin\bin\find.exe
(windows pid 7768)
   203     714 [main] find (7768) OS version:   Windows NT-10.0
   183     897 [main] find (7768)
**********************************************
--- Process 7768 loaded C:\Windows\SysWOW64\advapi32.dll at 754e0000


*=====> Working Scenario*

===> Runs straight through to completion, no pauses/freezes

   215  696807 [main] find 9456 build_fh_pc: fh 0x612AFFD0, dev 000000C3
   235  697042 [main] find 9456 stat_worker: (\??\F:\Abc\Xyz\conf.txt,
0x200749F8, 0x612AFFD0), file_attributes 16
--- Process 9456 loaded C:\Windows\SysWOW64\rasadhlp.dll at 73190000
--- Process 9456 loaded C:\Windows\SysWOW64\FWPUCLNT.DLL at 72fa0000
161759  858801 [main] find 9456 pwdgrp::fetch_account_from_windows: line:
<_svcCASpecLAN:*:1319973:1049089:U-TSYS\_svcCASpecLAN,S-1-5-21-21232
42984-354184167-320618023-271397:/home/_svcCASpecLAN:/bin/bash>
  1034  859835 [main] find 9456 fhandler_base::fstat_helper: 0 = fstat
(\??\F:\Abc\Xyz\conf.txt, 0x200749F8) st_size=0, st_mod
e=040775, st_ino=1688849860295204st_atim=5F210CE0.25975E6C
st_ctim=5F210CE0.25975E6C st_mtim=5F210CE0.25975E6C
st_birthtim=5F210CE0.16B102A4
   195  860030 [main] find 9456 stat_worker: 0 =
(\??\F:\Abc\Xyz\conf.txt,0x200749F8)

All our other Windows 2016 servers do not experience any issues.

Do you have any suggestions on finding out what is causing this?

I can't give you a definitive answer, but it looks like you're running 32-bit Cygwin. I suggest switching to 64-bit Cygwin. Here's a quote from https://cygwin.com/ that might be relevant:

-----------------------------------------------------------------------------
32 bit Cygwin

Address space is a very limiting factor for Cygwin. These days, a full 32 bit Cygwin distro is not feasible anymore, and will in all likelihood fail in random places due to an issue with the fork(2) system call.

Therefore we recommend using 32 bit Cygwin only in limited scenarios, with only a minimum of necessary packages installed, and only if there's no way to run 64 bit Cygwin instead.
-----------------------------------------------------------------------------

Ken
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to