delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/05/24/18:25:37

DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 44OMPabJ3486752
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=GTwqPxy9
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDBA3385E45C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1716589536;
bh=4vuPbHppUGoPbvUlHe5RKo6tuQEoZT9P6SupV+83suE=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=GTwqPxy9n+o/EkyNNm5xma4uALazf++e0Rg7RIj2y5VRA+/DFDgKEKdZTPKqUAlOa
NjIitvDABWSkgFA6AaeKdJ4NRbNj4dBRwD87iVmhoctoSWw9ZdxFXMcAwp6RUsf9Sr
+7xrhIAuAEZL2XY54mCLwR2WpDXzuoW6dVs1jGXw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19A293858D29
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 19A293858D29
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716589480; cv=none;
b=r/cRZlZybrMZNMIEmM13ZCIRcImU+bx096w7nE1NfUcbWJwNSZ/Fp1NWIG3JnALp0IQ/xOmZ6oqmj6GqgpyBPjC25fRrA/C50eQYFLCkrLb5tAUSoRfXCQHxTQrk4nIZ8uQBiQjX88kfIrFooYesK1ScTKpStAP4x47vle81sWs=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1716589480; c=relaxed/simple;
bh=4NcnloXxV+qN3c0H23xr4vwNMp7HXLhM0xJl2BpkIjI=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=lhDJ1AK+MfoJZFOWJq0Q5xP/N0Da5uCzGOTOSay4vH6pK+NwrQs/uYWZom54eF03mJjdwUh9Z5kXJy3MbxQ7HiGyBxwV+kqZ5eQjYoG5QyM/1coaos+yJx5ozLTCGtpdquB34fs93R5wWik46YroOqX4WOhmC2uvspeVz/sgoCQ=
ARC-Authentication-Results: i=1; server2.sourceware.org
Message-ID: <1660bc3d-19d5-4274-8477-2ebd63c34920@maxrnd.com>
Date: Fri, 24 May 2024 15:24:35 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: frequent hangs running ldd
To: cygwin AT cygwin DOT com
References: <fd3b2d14-0d16-9e66-f7ea-daadc0c5bfcc AT jdrake DOT com>
<20240525045424 DOT ac58c0ff5e325706b2a5f014 AT nifty DOT ne DOT jp>
<0bd2f49b-93f6-7db4-32b6-7f3021db211e AT jdrake DOT com>
<20240525071739 DOT 167d0f2b66b3dd8d2313be19 AT nifty DOT ne DOT jp>
In-Reply-To: <20240525071739.167d0f2b66b3dd8d2313be19@nifty.ne.jp>
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
SPF_HELO_NONE, SPF_PASS, TXREP,
WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Mark Geisert via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Mark Geisert <mark AT maxrnd DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019