On 5/24/2024 3:17 PM, Takashi Yano via Cygwin wrote:
On Fri, 24 May 2024 14:46:40 -0700 (PDT)
Jeremy Drake wrote:
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?
I doubt it, I was running a shell with this command:
find /usr/bin -name \*.dll -printf '%p:\n' -exec ldd '{}' \;
Thanks for the details. I could reproduce the issue.
It seems that ldh.exe (which is called from ldd?) falls into infinite loop.
However, gdb cannot attach to ldh.exe...
I could reproduce this too, even to not being able to attach gdb. If you
exit that gdb session, I think you'll find the target process still
stuck. You might be able to attach gdb again and it'll work. Here's what
I found:
~ gdb -q /usr/bin/ldd
Reading symbols from /usr/bin/ldd...
Reading symbols from /usr/lib/debug//usr/bin/ldd.exe.dbg...
(gdb) att 6807
Attaching to program: /usr/bin/ldd, process 9732
[New Thread 9732.0x36a4]
[New Thread 9732.0x2bac]
(gdb) i thr
Id Target Id Frame
1 Thread 9732.0x31a8 "ldd" 0x00007ff8524f0b04 in
ntdll!ZwWaitForDebugEvent
() from /c/Windows/SYSTEM32/ntdll.dll
2 Thread 9732.0x36a4 "sig" 0x00007ff8524ed174 in ntdll!ZwReadFile ()
from /c/Windows/SYSTEM32/ntdll.dll
* 3 Thread 9732.0x2bac 0x00007ff8524f0be1 in ntdll!DbgBreakPoint ()
from /c/Windows/SYSTEM32/ntdll.dll
(gdb) thr 1
[Switching to thread 1 (Thread 9732.0x31a8)]
#0 0x00007ff8524f0b04 in ntdll!ZwWaitForDebugEvent ()
from /c/Windows/SYSTEM32/ntdll.dll
(gdb) bt
#0 0x00007ff8524f0b04 in ntdll!ZwWaitForDebugEvent ()
from /c/Windows/SYSTEM32/ntdll.dll
#1 0x00007ff850165796 in WaitForDebugEventEx ()
from /c/Windows/System32/KERNELBASE.dll
#2 0x0000000100401ba1 in report (
in_fn=0x800009200 "/usr/bin/cygdialog-14.dll",
multiple=multiple@entry=false)
at /usr/src/debug/cygwin-3.5.3-1/winsup/utils/ldd.cc:325
#3 0x00000001004026de in main (argc=<optimized out>, argv=0xa000004d0)
at /usr/src/debug/cygwin-3.5.3-1/winsup/utils/ldd.cc:439
(gdb) f 2
#2 0x0000000100401ba1 in report (
in_fn=0x800009200 "/usr/bin/cygdialog-14.dll",
multiple=multiple@entry=false)
at /usr/src/debug/cygwin-3.5.3-1/winsup/utils/ldd.cc:325
325 if (!WaitForDebugEvent (&ev, INFINITE))
(gdb) list
320
321 while (1)
322 {
323 bool exitnow = false;
324 DWORD cont = DBG_CONTINUE;
325 if (!WaitForDebugEvent (&ev, INFINITE))
326 break;
327 switch (ev.dwDebugEventCode)
328 {
329 case CREATE_PROCESS_DEBUG_EVENT:
(gdb)
..mark
--
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