Deadlock?

Shachar Shemesh wine-devel at shemesh.biz
Thu Dec 11 16:24:25 CST 2003


Mike Hearn wrote:

>>How can I attach to two threads?
>>    
>>
>
>You don't, you attach to a process then pass the thread id to the "bt"
>command, ie:
>
>attach 0x0e (process id)
>bt 0x9
>bt 0x1 ... etc ....
>  
>
Ok, it finally happened again. Not at the same place (on program exit 
rather than entry), and without any debug strings, but beggers can't 
afford to be choosers.

The console messages:

> err:toolbar:ToolbarWindowProc unknown msg 204e wp=000000ca lp=4080f14c
> err:toolbar:ToolbarWindowProc unknown msg 204e wp=40c757d8 lp=4080f22c
> fixme:mshtml:MSHTML_DllCanUnloadNow
> fixme:mshtml:MSHTML_DllCanUnloadNow
> fixme:mshtml:MSHTML_DllCanUnloadNow
> fixme:mshtml:MSHTML_DllCanUnloadNow
> err:toolbar:ToolbarWindowProc unknown msg 204e wp=40c757d8 lp=4080f22c
> err:toolbar:ToolbarWindowProc unknown msg 204e wp=000000ca lp=4080f22c
> err:toolbar:ToolbarWindowProc unknown msg 204e wp=000000ca lp=4080f14c
> err:toolbar:ToolbarWindowProc unknown msg 204e wp=000000ca lp=4080f22c
> err:toolbar:ToolbarWindowProc unknown msg 204e wp=000000ca lp=4080f14c
> err:ntdll:RtlpWaitForCriticalSection section 0x40b13aa0 
> "../../windows/user.c: USER_SysLevel" wait timed out in thread 0016, 
> blocked by 0009, retrying (60 sec)
> err:ntdll:RtlpWaitForCriticalSection section 0x4020fc60 "loader.c: 
> loader_section" wait timed out in thread 0009, blocked by 0016, 
> retrying (60 sec)
> err:ntdll:RtlpWaitForCriticalSection section 0x40b13aa0 
> "../../windows/user.c: USER_SysLevel" wait timed out in thread 000b, 
> blocked by 0009, retrying (60 sec)
> err:font:ReadFontDir Can't open directory "/win/windows/fonts"
> err:ntdll:RtlpWaitForCriticalSection section 0x4020fc60 "loader.c: 
> loader_section" wait timed out in thread 0009, blocked by 0016, 
> retrying (60 sec)
> err:ntdll:RtlpWaitForCriticalSection section 0x4020fc60 "loader.c: 
> loader_section" wait timed out in thread 000b, blocked by 0016, 
> retrying (60 sec)

The debug output:

> Wine-dbg>walk thread process tid prio 00000018 0000001a 0 00000019 0 
> 00000008 (D) C:\Program Files\Microsoft Picture It! 9\pi.exe 00000016 
> 0 <== 00000010 00000012 0 00000011 0 00000008 (D) C:\Program 
> Files\Microsoft Picture It! 9\pi.exe 0000000b 0 0000000a 0 00000009 0 
> Wine-dbg>bt 0x16 Backtrace: =>0 0x4010e8ab (NTDLL.DLL._memccpy+0x5202b 
> in libc.so.6) (ebp=40934c60) 1 0x401f4002 
> (NTDLL_wait_for_multiple_objects+0xbf(count=0x0, handles=0x0, 
> flags=0x8, timeout=0x40934d10) [sync.c:578] in NTDLL.DLL) 
> (ebp=40934cf8) 2 0x401f1edd (usr1_handler+0x4e(__signal=0xa, 
> __context=0x4f) [signal_i386.c:1123] in NTDLL.DLL) (ebp=40934d1c) 3 
> 0x4006e498 (NTDLL.DLL.toupper+0x6208 in libc.so.6) (ebp=4c725f8c) 4 
> 0x401f4002 (NTDLL_wait_for_multiple_objects+0xbf(count=0x1, 
> handles=0x4c726078, flags=0xc, timeout=0x4c72606c) [sync.c:578] in 
> NTDLL.DLL) (ebp=4c726024) 5 0x401f40ae 
> (NTDLL.DLL.NtWaitForMultipleObjects+0x74 in NTDLL.DLL) (ebp=4c72604c) 
> 6 0x404fcb20 (WaitForMultipleObjectsEx+0x1d5(count=0x1, 
> handles=0x4c7261ac, wait_all=0x0, timeout=0x4e20, alertable=0x0) 
> [sync.c:167] in KERNEL32.DLL) (ebp=4c726184) 7 0x404fc8b8 
> (WaitForSingleObject+0x3c(handle=0x200, timeout=0x4e20) [sync.c:95] in 
> KERNEL32.DLL) (ebp=4c7261a4) 8 0x0101dc93 (pi.exe..text+0x1cc93 in 
> pi.exe) (ebp=4c726240) 9 0x006f0072 (pe_load+0x5d8072 in wine-kthread) 
> (ebp=0050005c) *** Invalid address 0x0050005c (pe_load+0x3e805c in 
> wine-kthread) Wine-dbg>bt 0xb Backtrace: =>0 0x4010e8ab 
> (NTDLL.DLL._memccpy+0x5202b in libc.so.6) (ebp=4092ec60) 1 0x401f4002 
> (NTDLL_wait_for_multiple_objects+0xbf(count=0x0, handles=0x0, 
> flags=0x8, timeout=0x4092ed10) [sync.c:578] in NTDLL.DLL) 
> (ebp=4092ecf8) 2 0x401f1edd (usr1_handler+0x4e(__signal=0xa, 
> __context=0x4f) [signal_i386.c:1123] in NTDLL.DLL) (ebp=4092ed1c) 3 
> 0x4006e498 (NTDLL.DLL.toupper+0x6208 in libc.so.6) (ebp=42ae2900) 4 
> 0x401f4002 (NTDLL_wait_for_multiple_objects+0xbf(count=0x1, 
> handles=0x42ae29ec, flags=0xc, timeout=0x42ae2a20) [sync.c:578] in 
> NTDLL.DLL) (ebp=42ae2998) 5 0x401f40ae 
> (NTDLL.DLL.NtWaitForMultipleObjects+0x74 in NTDLL.DLL) (ebp=42ae29c0) 
> 6 0x401f40fe (NtWaitForSingleObject+0x42(handle=0x1a4, alertable=0x0, 
> timeout=0x42ae2a20) [sync.c:611] in NTDLL.DLL) (ebp=42ae29e4) 7 
> 0x401cda35 (RtlpWaitForCriticalSection+0x127(crit=0x4020fc60) 
> [critsection.c:193] in NTDLL.DLL) (ebp=42ae2a84) 8 0x401cdc25 
> (RtlEnterCriticalSection+0x51(crit=0x4020fc60) [critsection.c:255] in 
> NTDLL.DLL) (ebp=42ae2a9c) 9 0x401d92dc 
> (LdrLockLoaderLock+0x92(flags=0x0, result=0x0, magic=0x42ae2d08) 
> [loader.c:926] in NTDLL.DLL) (ebp=42ae2acc) 10 0x404dd58f 
> (GetModuleFileNameW+0x38(hModule=0x0, lpFileName=0x436e0dd8, 
> size=0x104) [module.c:482] in KERNEL32.DLL) (ebp=42ae2d10) 11 
> 0x404dd4d7 (GetModuleFileNameA+0x72(hModule=0x0, 
> lpFileName=0x42ae36e8, size=0x104) [module.c:465] in KERNEL32.DLL) 
> (ebp=42ae2d44) 12 0x0101db7e (pi.exe..text+0x1cb7e in pi.exe) 
> (ebp=42ae2de4) Wine-dbg>bt 0x9 Backtrace: =>0 0x4010e8ab 
> (NTDLL.DLL._memccpy+0x5202b in libc.so.6) (ebp=40032c60) 1 0x401f4002 
> (NTDLL_wait_for_multiple_objects+0xbf(count=0x0, handles=0x0, 
> flags=0x8, timeout=0x40032d10) [sync.c:578] in NTDLL.DLL) 
> (ebp=40032cf8) 2 0x401f1edd (usr1_handler+0x4e(__signal=0xa, 
> __context=0x4f) [signal_i386.c:1123] in NTDLL.DLL) (ebp=40032d1c) 3 
> 0x4006e498 (NTDLL.DLL.toupper+0x6208 in libc.so.6) (ebp=4076d78c) 4 
> 0x401f4002 (NTDLL_wait_for_multiple_objects+0xbf(count=0x1, 
> handles=0x4076d878, flags=0xc, timeout=0x4076d8ac) [sync.c:578] in 
> NTDLL.DLL) (ebp=4076d824) 5 0x401f40ae 
> (NTDLL.DLL.NtWaitForMultipleObjects+0x74 in NTDLL.DLL) (ebp=4076d84c) 
> 6 0x401f40fe (NtWaitForSingleObject+0x42(handle=0x1a4, alertable=0x0, 
> timeout=0x4076d8ac) [sync.c:611] in NTDLL.DLL) (ebp=4076d870) 7 
> 0x401cda35 (RtlpWaitForCriticalSection+0x127(crit=0x4020fc60) 
> [critsection.c:193] in NTDLL.DLL) (ebp=4076d910) 8 0x401cdc25 
> (RtlEnterCriticalSection+0x51(crit=0x4020fc60) [critsection.c:255] in 
> NTDLL.DLL) (ebp=4076d928) 9 0x401d92dc 
> (LdrLockLoaderLock+0x92(flags=0x0, result=0x0, magic=0x4076db94) 
> [loader.c:926] in NTDLL.DLL) (ebp=4076d958) 10 0x404dd58f 
> (GetModuleFileNameW+0x38(hModule=0x0, lpFileName=0x436e0bc8, 
> size=0x104) [module.c:482] in KERNEL32.DLL) (ebp=4076db9c) 11 
> 0x404dd4d7 (GetModuleFileNameA+0x72(hModule=0x0, 
> lpFileName=0x4076e574, size=0x104) [module.c:465] in KERNEL32.DLL) 
> (ebp=4076dbd0) 12 0x0101db7e (pi.exe..text+0x1cb7e in pi.exe) 
> (ebp=4076dc70) 


This one doesn't look like strictly deadlock in Wine. In thread 0x16 it appears the application called "WaitForSingleObject" directly. I wonder what object that may be, however, and how come we are blocking on it on called to "GetModuleFileNameA".

This is NOT the problem I was reporting before, but I figured I'll report it while wer'e here.

Thread 16 seems to be calling "WaitForSingleObject" on an event it created not long before. It does create another process between creating the event and waiting on it. I'm not sure what process, though.

I hope someone is able to glean useful information of this.

				Shachar

-- 
Shachar Shemesh
Open Source integration & consulting
Home page & resume - http://www.shemesh.biz/





More information about the wine-devel mailing list