date command hangs sometimes (coreutils 8.26-2) on cygwin 3.1.4 x86-64

Gruff Hacker gruffhacker-cyg@yahoo.com
Thu Jun 25 00:57:45 GMT 2020


This happens more frequently for me now.
Another example of thread stacks below:
Thread 1:
ntoskrnl.exe!KiSwapContext+0x76
ntoskrnl.exe!KiSwapThread+0xbfd
ntoskrnl.exe!KiCommitThreadWait+0x144
ntoskrnl.exe!KeWaitForSingleObject+0x255
ntoskrnl.exe!KiSchedulerApc+0x397
ntoskrnl.exe!KiDeliverApc+0x2e8
ntoskrnl.exe!KiSwapThread+0xc98
ntoskrnl.exe!KiCommitThreadWait+0x144
ntoskrnl.exe!KeWaitForSingleObject+0x255
ntoskrnl.exe!NtWaitForSingleObject+0x10b
ntoskrnl.exe!KiSystemServiceCopyEnd+0x28
ntdll.dll!NtWaitForSingleObject+0x14
KERNELBASE.dll!WaitForSingleObjectEx+0x93
cygwin1.dll!strtosigno+0x4b7
cygwin1.dll!setprogname+0x11fd
cygwin1.dll!secure_getenv+0x171a
cygwin1.dll!dirname+0x1063
cygwin1.dll!cygwin_dll_init+0x34f
cygwin1.dll!setprogname+0x3d53
cygwin1.dll!setprogname+0x3e04




Thread 2:
ntoskrnl.exe!KiSwapContext+0x76
ntoskrnl.exe!KiSwapThread+0xbfd
ntoskrnl.exe!KiCommitThreadWait+0x144
ntoskrnl.exe!KeWaitForSingleObject+0x255
ntoskrnl.exe!KiSchedulerApc+0x397
ntoskrnl.exe!KiDeliverApc+0x2e8
ntoskrnl.exe!KiCheckForKernelApcDelivery+0x2b
ntoskrnl.exe!KeLeaveCriticalRegion+0x37
ntoskrnl.exe!IopReleaseFileObjectLock+0x45
ntoskrnl.exe!IopSynchronousServiceTail+0x271
ntoskrnl.exe!NtReadFile+0x59f
ntoskrnl.exe!KiSystemServiceCopyEnd+0x28
ntdll.dll!NtReadFile+0x14
KERNELBASE.dll!ReadFile+0x77
cygwin1.dll!sigfillset+0x29e1
cygwin1.dll!setprogname+0x2d63
cygwin1.dll!setprogname+0x3326
cygwin1.dll!setprogname+0x3d53
cygwin1.dll!setprogname+0x3e04
KERNEL32.DLL!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21


Thread 3:
ntoskrnl.exe!KiSwapContext+0x76
ntoskrnl.exe!KiSwapThread+0xbfd
ntoskrnl.exe!KiCommitThreadWait+0x144
ntoskrnl.exe!KeWaitForSingleObject+0x255
ntoskrnl.exe!KiSchedulerApc+0x397
ntoskrnl.exe!KiDeliverApc+0x2e8
ntoskrnl.exe!KiApcInterrupt+0x2f0
ntdll.dll!SbSelectProcedure+0xc4
KERNELBASE.dll!CloseHandle+0x2b
cygwin1.dll!sigfillset+0x358c
cygwin1.dll!secure_getenv+0x488d
ntdll.dll!RtlpExecuteHandlerForException+0xf
ntdll.dll!RtlDispatchException+0x219
ntdll.dll!KiUserExceptionDispatch+0x2e
cygwin1.dll!setprogname+0x1293
cygwin1.dll!setprogname+0x1e9a
cygwin1.dll!alloca+0x169ee
cygwin1.dll!dlfork+0x110c
cygwin1.dll!dlfork+0x223a
cygwin1.dll!feinitialise+0x1c9cf
cygwin1.dll!feinitialise+0x1da54
cygwin1.dll!setprogname+0x3d53
cygwin1.dll!setprogname+0x3e04
KERNEL32.DLL!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21








 On Friday, May 1, 2020, 10:21:07 PM EDT, Gruff Hacker wrote: 





Hi,

I have an issue where the "date" command (from coreutils 8.26-2) hangs.  This is running it with no arguments from a bash script.
It has only happened maybe 6 times over several years.  This is on Windows 10 64-bit with cygwin 3.1.4 x86-64.

No idea how to reproduce.  Workaround or other tips appreciated.  It hangs forever (or at least for a few hours) and must be killed (Ctrl+C in shell doesn't work).
I've attached a redacted cygcheck output.  

Here are the stacks of the 3 threads within the date.exe process while it is hung:
Thread 1:
ntoskrnl.exe!KiSwapContext+0x76
ntoskrnl.exe!KiSwapThread+0xbfd
ntoskrnl.exe!KiCommitThreadWait+0x144
ntoskrnl.exe!KeWaitForSingleObject+0x255
ntoskrnl.exe!KiSchedulerApc+0x397
ntoskrnl.exe!KiDeliverApc+0x2e8
ntoskrnl.exe!KiSwapThread+0xc98
ntoskrnl.exe!KiCommitThreadWait+0x144
ntoskrnl.exe!KeWaitForSingleObject+0x255
ntoskrnl.exe!NtWaitForSingleObject+0x10b
ntoskrnl.exe!KiSystemServiceCopyEnd+0x28
ntdll.dll!NtWaitForSingleObject+0x14
KERNELBASE.dll!WaitForSingleObjectEx+0x93
cygwin1.dll!feinitialise+0x1df98
cygwin1.dll!feinitialise+0x1e050
cygwin1.dll!feinitialise+0x4edb
cygwin1.dll!strtosigno+0x513a
cygwin1.dll!_main+0x253
cygwin1.dll!secure_getenv+0x44e6
cygwin1.dll!setcontext+0x59d
cygwin1.dll!sigfillset+0x35c7
cygwin1.dll!secure_getenv+0x488d
ntdll.dll!RtlpExecuteHandlerForException+0xf
ntdll.dll!RtlDispatchException+0x219
ntdll.dll!KiUserExceptionDispatch+0x2e
cygwin1.dll!dlerror+0x820
cygwin1.dll!dlerror+0x1101
cygwin1.dll!dlerror+0x113d
cygwin1.dll!cygwin_dll_init+0x4ae
cygwin1.dll!setprogname+0x3d53
cygwin1.dll!setprogname+0x3e04

Thread 2:
ntoskrnl.exe!KiSwapContext+0x76
ntoskrnl.exe!KiSwapThread+0xbfd
ntoskrnl.exe!KiCommitThreadWait+0x144
ntoskrnl.exe!KeWaitForSingleObject+0x255
ntoskrnl.exe!KiSchedulerApc+0x397
ntoskrnl.exe!KiDeliverApc+0x2e8
ntoskrnl.exe!KiSwapThread+0xc98
ntoskrnl.exe!KiCommitThreadWait+0x144
ntoskrnl.exe!KeWaitForSingleObject+0x255
ntoskrnl.exe!NtWaitForSingleObject+0x10b
ntoskrnl.exe!KiSystemServiceCopyEnd+0x28
ntdll.dll!NtWaitForSingleObject+0x14
KERNELBASE.dll!WaitForSingleObjectEx+0x93
cygwin1.dll!strtosigno+0x4b7
cygwin1.dll!secure_getenv+0x4410
cygwin1.dll!setcontext+0x59d
cygwin1.dll!sigfillset+0x35c7
cygwin1.dll!secure_getenv+0x488d
ntdll.dll!RtlpExecuteHandlerForException+0xf
ntdll.dll!RtlDispatchException+0x219
ntdll.dll!KiUserExceptionDispatch+0x2e
cygwin1.dll!setprogname+0x1293
cygwin1.dll!setprogname+0x1e9a
cygwin1.dll!alloca+0x169ee
cygwin1.dll!dlfork+0x110c
cygwin1.dll!dlfork+0x223a
cygwin1.dll!feinitialise+0x1c9cf
cygwin1.dll!feinitialise+0x1da54
cygwin1.dll!setprogname+0x3d53
cygwin1.dll!setprogname+0x3e04
KERNEL32.DLL!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21

Thread 3:
ntoskrnl.exe!KiSwapContext+0x76
ntoskrnl.exe!KiSwapThread+0xbfd
ntoskrnl.exe!KiCommitThreadWait+0x144
ntoskrnl.exe!KeWaitForSingleObject+0x255
ntoskrnl.exe!IopSynchronousServiceTail+0x24a
ntoskrnl.exe!NtReadFile+0x59f
ntoskrnl.exe!KiSystemServiceCopyEnd+0x28
ntdll.dll!NtReadFile+0x14
KERNELBASE.dll!ReadFile+0x77
cygwin1.dll!sigfillset+0x29e1
cygwin1.dll!setprogname+0x2d63
cygwin1.dll!setprogname+0x3326
cygwin1.dll!setprogname+0x3d53
cygwin1.dll!setprogname+0x3e04
KERNEL32.DLL!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21

Thanks


More information about the Cygwin mailing list