On Fri, 24 May 2024 11:50:35 -0700 (PDT)
Jeremy Drake wrote:
> 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.

Thanks for the report. However, I cannot reproduce the issue.
If it always hangs in GetConsoleProcessList (), I doubt it is not a cygwin
bug but a windows bug.

By any chance, is the number of processes that attach to the same pty more
than 32768 in your environment?

-- 
Takashi Yano <takashi.y...@nifty.ne.jp>

-- 
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