1.7.7: sh.exe sometimes hangs with 100% cpu usage

hules@free.fr hules@free.fr
Mon Oct 25 14:18:00 GMT 2010


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


--
Julien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 117752 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20101025/5c983e84/attachment.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list