https://bugs.winehq.org/show_bug.cgi?id=54511
--- Comment #10 from Joel Holdsworth joel@airwebreathe.org.uk --- GetProcAddress (ntdll, "RtlGetCurrentDirectory_U") is called here: https://github.com/openunix/cygwin/blob/master/winsup/cygwin/path.cc#L4167
...which is called from find_fast_cwd(): https://github.com/openunix/cygwin/blob/master/winsup/cygwin/path.cc#L4260
...which also contains the noisy "Cygwin WARNING:", and the fallback path.
It seems to fail right after this:
015c:Call KERNEL32.GetProcAddress(6fffffdd0000,6ffffe3f870d "RtlGetCurrentDirectory_U") ret=6ffffe1ef3a5 015c:Ret KERNEL32.GetProcAddress() retval=6fffffe1f9a1 ret=6ffffe1ef3a5 015c:Call KERNEL32.GetProcAddress(6fffffdd0000,6ffffe3f8726 "RtlEnterCriticalSection") ret=6ffffe1ef3b7 015c:Ret KERNEL32.GetProcAddress() retval=6fffffe418ea ret=6ffffe1ef3b7
...and immediately afterward gets stuck in a loop doing this:
015c:Call KERNEL32.VirtualQuery(700003c63f9d,7ffffb860,00000030) ret=6ffffe1bf5a7 015c:Ret KERNEL32.VirtualQuery() retval=00000030 ret=6ffffe1bf5a7 015c:Call KERNEL32.IsDebuggerPresent() ret=6ffffe1bf2d0 015c:Ret KERNEL32.IsDebuggerPresent() retval=00000000 ret=6ffffe1bf2d0 015c:Call KERNEL32.WaitForSingleObject(000000a0,ffffffff) ret=6ffffe2c9599 015c:Ret KERNEL32.WaitForSingleObject() retval=00000000 ret=6ffffe2c9599 015c:Call KERNEL32.ReleaseMutex(000000a0) ret=6ffffe219f9b 015c:Ret KERNEL32.ReleaseMutex() retval=00000001 ret=6ffffe219f9b 015c:Call KERNEL32.WriteFile(00000094,7ffffb720,000000b0,7ffffb70c,00000000) ret=6ffffe219e9c 015c:Ret KERNEL32.WriteFile() retval=00000001 ret=6ffffe219e9c 015c:Call KERNEL32.WaitForSingleObject(00000104,0000ea60) ret=6ffffe21a0f2 0168:Ret KERNEL32.ReadFile() retval=00000001 ret=6ffffe2193da 0168:Call KERNEL32.SetEvent(00000098) ret=6ffffe219088 0168:Ret KERNEL32.SetEvent() retval=00000001 ret=6ffffe219088 0168:Call KERNEL32.SetEvent(00000104) ret=6ffffe21900d 015c:Ret KERNEL32.WaitForSingleObject() retval=00000000 ret=6ffffe21a0f2 0168:Ret KERNEL32.SetEvent() retval=00000001 ret=6ffffe21900d 015c:Call KERNEL32.CloseHandle(00000104) ret=6ffffe21a100 0168:Call KERNEL32.ReadFile(00000090,00afcae0,000000b0,00afcacc,00000000) ret=6ffffe2193da 015c:Ret KERNEL32.CloseHandle() retval=00000001 ret=6ffffe21a100
Is this the loop of the crash handler trying to wait for a debugger to connect?: https://github.com/openunix/cygwin/blob/master/winsup/cygwin/exceptions.cc#L...
Both the cygwin and msys2 projects should be urged to remove this FAST_CWD stuff. It causes no end of problems.