frequent hangs running ldd

Jeremy Drake cygwin@jdrake.com
Fri May 24 18:50:35 GMT 2024


Seen on msys2, but doesn't seem specific to it.

Frequently, when running ldd in a loop, it will hang.  I managed to get a
backtrace from gdb with symbols:

(gdb) bt
#0  0x00007ffecea0fa34 in ntdll!ZwDeviceIoControlFile ()
   from /c/Windows/SYSTEM32/ntdll.dll
#1  0x00007ffecbead7a9 in KERNELBASE!GetConsoleScreenBufferInfoEx ()
   from /c/Windows/System32/KERNELBASE.dll
#2  0x00007ffecbef58dc in KERNELBASE!GetConsoleTitleW ()
   from /c/Windows/System32/KERNELBASE.dll
#3  0x00007ffecbfb8195 in KERNELBASE!GetConsoleProcessList ()
   from /c/Windows/System32/KERNELBASE.dll
#4  0x000000018015851f in fhandler_pty_common::get_console_process_id (
    pid=19348, match=match@entry=true, cygwin=cygwin@entry=false,
    stub_only=stub_only@entry=false, nat=nat@entry=false)
    at /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler/pty.cc:95
#5  0x0000000180101e3b in fhandler_console::attach_console (
    owner=<optimized out>, err=err@entry=0x0)
    at /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler/console.cc:76
#6  0x0000000180102d40 in fhandler_console::set_output_mode (m=tty::native,
    t=0x1a0030028, p=0x800021d68)
    at /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler/console.cc:853
#7  0x000000018010d6cc in fhandler_console::set_console_mode_to_native ()
    at /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler/console.cc:4189
#8  0x000000018010d71d in ContinueDebugEvent_Hooked (p=26628, t=26656, s=65538)
    at /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler/console.cc:4238
#9  0x0000000100401bd7 in ?? ()
#10 0x000000010040279f in ?? ()
#11 0x00000001800483a7 in dll_crt0_1 ()
    at /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/dcrt0.cc:1015
#12 0x0000000180045f63 in _cygtls::call2 (this=0x7ffffce00,
    func=0x180047240 <dll_crt0_1(void*)>, arg=0x0,
buf=buf@entry=0x7ffffcdf0)
    at /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/cygtls.cc:41
#13 0x0000000180046014 in _cygtls::call (func=<optimized out>,
    arg=<optimized out>)
    at /C/_/msys2-runtime/src/msys2-runtime/winsup/cygwin/cygtls.cc:28
#14 0x0000000000000000 in ?? ()

Other attempts without symbols showed the same Windows APIs at least.


More information about the Cygwin mailing list