www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/11/04/14:20:16

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_DB,TW_EB,TW_RV,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Date: Thu, 4 Nov 2010 19:19:45 +0100 (CET)
From: hules AT free DOT fr
To: cygwin AT cygwin DOT com
Message-ID: <48848513.1857571288894785382.JavaMail.root@spooler8-g27.priv.proxad.net>
In-Reply-To: <1906373454.1857461288894772454.JavaMail.root@spooler8-g27.priv.proxad.net>
Subject: Re: 1.7.7: sh.exe sometimes hangs with 100% cpu usage
MIME-Version: 1.0
X-Authenticated-User: hules AT free DOT fr
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Some more info about that infinite loop in cygwin1.dll . 

This is indeed inside the cygheap_fixup_in_child function of cygwin1.dll . 

Inside this function, there is a loop that is:

for (_cmalloc_entry *rvc = cygheap->chain; rvc; rvc = rvc->prev) {
 ...
}

In the case of my sh.exe process , this loop never ends because it is stuck with an "rvc" pointer that is such that "rvc->prev == rvc"

I'm not sure what to look at, is there a chance that this is an "easy" bug to fix ?

--
Julien


> Hi,
> 
> I have some quite large and long build scripts running on cygwin, on
> some occasions (really rare), the build script just stops progressing.
> Looking at the processes with "process explorer", I always notice that
> one sh.exe is stuck, taking 100% of a core. The stack for that hang
> process is:
> 
> cygwin1.dll!setprogname+0x10b3
> cygwin1.dll!__rcmd_errstr+0x788c0
> cygwin1.dll!setprogname+0x10b3
> cygwin1.dll!__main+0x141a
> cygwin1.dll!dll_entry AT 12+0x2d9
> ntdll.dll!RtlDestroyQueryDebugBuffer+0xff
> ntdll.dll!LdrFindResourceDirectory_U+0x9cc
> ntdll.dll!RtlGetNtVersionNumbers+0x103
> ntdll.dll!LdrInitShimEngineDynamic+0x13f
> ntdll.dll!LdrInitializeThunk+0x10
> 
> (I can't attach gdb to it so this is the stack provided by process
> explorer).
> 
> If I attach the windbg debugger, I can get the assembly portion the
> loop that executes forever:
> 
> 61002900 8b03            mov     eax,dword ptr [ebx] 
> ds:002b:6127b1ec=00000000
> 61002902 85c0            test    eax,eax
> 61002904 741a            je      cygwin1!setprogname+0x10b0 (61002920)
> 61002906 833b1f          cmp     dword ptr [ebx],1Fh
> 61002909 7715            ja      cygwin1!setprogname+0x10b0 (61002920)
> 6100290b 8b4308          mov     eax,dword ptr [ebx+8]
> 6100290e 8d5308          lea     edx,[ebx+8]
> 61002911 83f809          cmp     eax,9
> 61002914 7e0a            jle     cygwin1!setprogname+0x10b0 (61002920)
> 61002916 83f863          cmp     eax,63h
> 61002919 7f15            jg      cygwin1!setprogname+0x10c0 (61002930)
> 6100291b 83c064          add     eax,64h
> 6100291e 8902            mov     dword ptr [edx],eax
> 61002920 8b5b04          mov     ebx,dword ptr [ebx+4]
> 61002923 85db            test    ebx,ebx
> 61002925 75d9            jne     cygwin1!setprogname+0x1090 (61002900)
> 61002927 83c418          add     esp,18h
> 6100292a 5b              pop     ebx
> 6100292b c20400          ret     4

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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