Michael Sauer sauer at
Wed Oct 15 09:30:50 CDT 2003

On Wed, 15 Oct 2003, Mike Hearn wrote:
> I might as well point out (as I didn't find this intuitive when I was
> learning) that you do that like this:
> 1) Open up a new terminal window
> 2) Run winedbg
> 3) "walk process"
> 4) Locate the win32 process id of the program that has deadlocked
> 5) "attach X" where X is the pid
> 6) "bt 0x9" gives you a backtrace of thread 9
> 7) "bt 0x15" gives you a backtrace of thread 15 etc....

ok did that (and attached at bottom of mail) and it helped a lot. But i
still don't know, where the specific error lies:
thread 0x3c called IDirectDraw4Impl_CreateSurface which lead over
X11DRV_DeleteDC to the tsx11_lock
thread 0x2s called VIRTUAL_HandleFault which lad over GDI_GetObjPtr to
the _EnterSysLevel lock thing
But i don't see the typical deadlock situation there (e.g. semaphore s,t
Thread1 : lock(s) lock(t)
Thread2 : lock(t) lock(s) )

Anyhow, this is perhaps the interesting part of thread 0x2f:

  12 0x401e43ad (VIRTUAL_HandleFault+0xcd(addr=0x4eef0000) [virtual.c:829]
in (ebp=406909b4)
  13 0x401dda53 (.L63+0xb [signal_i386.c] in (ebp=40690a2c)
  14 0x401ddf61 (segv_handler+0x41(__signal=0xb, __context=0x14d7)
[signal_i386.c:1058] in (ebp=40690d1c)
  15 0x400645f8 (NTDLL.DLL.toupper+0x6298 in (ebp=407a1dfc)

is it possible, that the thread produced a segfault while holding tsx11
lock, then the fault handler galled a GDI function?


err:ntdll:RtlpWaitForCriticalSection section 0x40f257a0 "x11drv_main.c: X11DRV_C
ritSection" wait timed out in thread 003c, blocked by 002f, retrying (60 sec)
err:ntdll:RtlpWaitForCriticalSection section 0x40979e80 "../../objects/gdiobj.c:
 GDI_level" wait timed out in thread 002f, blocked by 003c, retrying (60 sec)

Wine-dbg>walk thread
process  tid      prio
0000002e (D) C:\Spiele\pg3\PG3.exe
        0000003c    1
        00000038    0
        00000037   15
        00000034    0 <==
        00000032    2
        00000031    0
        00000030    0
        0000002f    0

Wine-dbg>bt 0x2f
=>0 0x4010595b (NTDLL.DLL.memcpy+0x5288b in (ebp=4069038c)
  1 0x401dff72 (NTDLL_wait_for_multiple_objects+0x122(count=0x0, handles=0x0, flags=0x8, timeout=0x40690448) [sync.c:584] in (ebp=40690430)
  2 0x401de23c (usr1_handler+0x4c(__signal=0xa, __context=0x14d7) [signal_i386.c:1162] in (ebp=40690454)
  3 0x400645f8 (NTDLL.DLL.toupper+0x6298 in (ebp=40690764)
  4 0x401dff72 (NTDLL_wait_for_multiple_objects+0x122(count=0x1, handles=0x40690858, flags=0xc, timeout=0x40690884) [sync.c:584] in (ebp=40690808)
  5 0x401dffe6 (NTDLL.DLL.NtWaitForMultipleObjects+0x66 in (ebp=40690830)
  6 0x401e003c (NtWaitForSingleObject+0x3c(handle=0x10c, alertable=0x0, timeout=0x40690884) [sync.c:611] in (ebp=40690850)
  7 0x401c0f02 (RtlpWaitForCriticalSection+0x112(crit=0x40979e80) [critsection.c:193] in (ebp=406908ec)
  8 0x401c119f (RtlEnterCriticalSection+0x3f(crit=0x40979e80) [critsection.c:255] in (ebp=40690900)
  9 0x404e645c (_EnterSysLevel+0x6c(lock=0x40979e80) [syslevel.c:112] in (ebp=40690934)
  10 0x4094c76b (GDI_GetObjPtr+0x2b(handle=0x2c74, magic=0x4f4b) [gdiobj.c:809] in (ebp=40690968)
  11 0x40edfb3e (X11DRV_DIB_FaultHandler+0x2e(res=0x2c74, addr=0x4eef0000) [dib.c:5284] in (ebp=40690988)
  12 0x401e43ad (VIRTUAL_HandleFault+0xcd(addr=0x4eef0000) [virtual.c:829] in (ebp=406909b4)
  13 0x401dda53 (.L63+0xb [signal_i386.c] in (ebp=40690a2c)
  14 0x401ddf61 (segv_handler+0x41(__signal=0xb, __context=0x14d7) [signal_i386.c:1058] in (ebp=40690d1c)
  15 0x400645f8 (NTDLL.DLL.toupper+0x6298 in (ebp=407a1dfc)
  16 0x40f5bf74 (_end+0x35648 in (ebp=00000011)

Wine-dbg>bt 0x3c
=>0 0x40064684 (NTDLL.DLL.toupper+0x6324 in (ebp=4e8f07d4)
  1 0x401dc720 (wine_server_call+0x40(req_ptr=0x4e8f0888) [server.c:226] in (ebp=4e8f0874)
  2 0x404abd19 (CONSOLE_GetNumHistoryEntries+0x59 [console.c:65] in (ebp=4e8f0904)
  3 0x404aa06c (CONSOLE_HandleCtrlC+0x1c(sig=0x2) [console.c:1394] in (ebp=4e8f09e0)
  4 0x401de11d (int_handler+0x9d(__signal=0x2, __context=0x14d7) [signal_i386.c:427] in (ebp=4e8f0d1c)
  5 0x400645f8 (NTDLL.DLL.toupper+0x6298 in (ebp=4ea11dc0)
  6 0x401dff72 (NTDLL_wait_for_multiple_objects+0x122(count=0x1, handles=0x4ea11eb4, flags=0xc, timeout=0x4ea11ee0) [sync.c:584] in (ebp=4ea11e64)
  7 0x401dffe6 (NTDLL.DLL.NtWaitForMultipleObjects+0x66 in (ebp=4ea11e8c)
  8 0x401e003c (NtWaitForSingleObject+0x3c(handle=0x108, alertable=0x0, timeout=0x4ea11ee0) [sync.c:611] in (ebp=4ea11eac)
  9 0x401c0f02 (RtlpWaitForCriticalSection+0x112(crit=0x40f257a0) [critsection.c:193] in (ebp=4ea11f48)
  10 0x401c119f (RtlEnterCriticalSection+0x3f(crit=0x40f257a0) [critsection.c:255] in (ebp=4ea11f5c)
  11 0x40f08942 (wine_tsx11_lock+0x22 [x11drv_main.c:159] in (ebp=4ea11f6c)
  12 0x40ee4fd9 (X11DRV_DeleteDC+0x29(physDev=0x4043c290) [init.c:141] in (ebp=4ea11f88)
  13 0x4093e236 (DeleteDC+0x186(hdc=0x2d20) [dc.c:793] in (ebp=4ea11fbc)
  14 0x40b0d039 (create_dib+0x1a9(This=0x40430f90) [dib.c:161] in (ebp=4ea11ff0)
  15 0x40b0d40d (DIB_DirectDrawSurface_Construct+0xdd(This=0x40430f90, pDD=0x40387d18, pDDSD=0x4ea12118) [dib.c:269] in (ebp=4ea12024)
  16 0x40b0d5e8 (DIB_DirectDrawSurface_Create+0x78(pDD=0x40387d18, pDDSD=0x4ea12118, ppSurf=0x4ea12310, pUnkOuter=0x0) [dib.c:300] in (ebp=4ea12048)
  17 0x40b0780a (Main_create_texture+0x3a(This=0x40387d18, pDDSD=0x4ea12118, ppSurf=0x4ea12310, pOuter=0x0, dwMipMapLevel=0x0) [main.c:342] in (ebp=4ea12064)
  18 0x40b07ad6 (create_texture+0x1e6(This=0x40387d18, pDDSD=0x4ea12218, ppSurf=0x4ea12310, pUnkOuter=0x0) [main.c:406] in (ebp=4ea121a4)
  19 0x40b0837e (Main_DirectDraw_CreateSurface+0x19e(iface=0x40387d18, pDDSD=0x4ea12218, ppSurf=0x4ea12310, pUnkOuter=0x0) [main.c:632] in (ebp=4ea121d8)
  20 0x40b0a6d0 (IDirectDraw4Impl_CreateSurface+0x40(This=0x40387d1c, pSDesc=0x4ea12218, ppSurface=0x4ea12310, pUnkOuter=0x0) [thunks.c:262] in (ebp=4ea121f4)
  21 0x100e68bf (PG3RENDR.DLL.EntryPoint+0x10a8f in PG3RENDR.DLL) (ebp=4a6d2470)
  22 0x00000004 (ebp=1011c460)
  23 0x100eab40 (PG3RENDR.DLL.EntryPoint+0x14d10 in PG3RENDR.DLL) (ebp=100e97e0)
  24 0x9090c310 (_end+0x4377c3d0) (ebp=14e528b8)
*** Invalid address 0x14e528b8 (PG3RENDR.DLL..reloc+0x4d028b8)

More information about the wine-devel mailing list