Slowness of Cygwin commands on Windows Server 2016

Praveen Kumar Chandrakar praveenkumar.chandrakar@broadcom.com
Mon Sep 21 14:53:03 GMT 2020


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?

Regards,
Praveen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4200 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://cygwin.com/pipermail/cygwin/attachments/20200921/15b69d80/attachment.p7s>


More information about the Cygwin mailing list