Hi, Somewhere between 20-07-2005 and 26-07-2005 I've been getting deadlocks when I call some glx functions e.g. glXMakeCurrent, I've tracked to problem down to a deadlock, prior to calling glXMakeCurrent wined3d calls wine_tsx11_lock_ptr, but the call to glXMakeCurrent is raising an event in x11drv on a different thread that then tries to call wine_tsx11_lock_ptr, resulting in a deadlock.
I've looked through the patches send in between 20-07-2005 and 26-07-2005 but nothing looked obvious. Should I be calling wine_tsx11_lock_ptr before glXMakeCurrent? or should I try to find out what patch caused the problem?
___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
--- Oliver Stieber oliver_stieber@yahoo.co.uk wrote:
Hi, Somewhere between 20-07-2005 and 26-07-2005 I've been getting deadlocks when I call some glx functions e.g. glXMakeCurrent, I've tracked to problem down to a deadlock, prior to calling glXMakeCurrent wined3d calls wine_tsx11_lock_ptr, but the call to glXMakeCurrent is raising an event in x11drv on a different thread that then tries to call wine_tsx11_lock_ptr, resulting in a deadlock.
I've looked through the patches send in between 20-07-2005 and 26-07-2005 but nothing looked obvious. Should I be calling wine_tsx11_lock_ptr before glXMakeCurrent? or should I try to find out what patch caused the problem?
I've removed all the calls to wine_tsx11_lock_ptr in wined3d and it looked like the problem was desktop mode, So I switched off desktop mode, and now only one thread is running but calls to getDC are causing the same problem: 0009:err:ntdll:RtlpWaitForCriticalSection section 0x7fee5420 "x11drv_main.c: X11DRV_CritSection" wait timed out in thread 0009, blocked by 0000, retrying (60 sec)
=>1 0xffffe410 (0x7be83bc0) 2 0x7beda335 NTDLL_wait_for_multiple_objects+0x245(count=0x0, handles=0x0, flags=0x8, timeout=0x7be83d10, signal_object=0x0) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/ntdll/sync.c:719] in ntdll (0x7be83cf4) 3 0x7bed84dd usr1_handler+0x4d(__signal=0xa, __context=0x33) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/ntdll/signal_i386.c:1154] in ntdll (0x7be83d1c) 4 0xffffe420 (0x7ba8f510) 5 0x7beda335 NTDLL_wait_for_multiple_objects+0x245(count=0x1, handles=0x7ba8f698, flags=0xc, timeout=0x7ba8f6c8, signal_object=0x0) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/ntdll/sync.c:719] in ntdll (0x7ba8f644) 6 0x7beda437 NtWaitForMultipleObjects+0x67(count=0x1, handles=0x7ba8f698, wait_all=0x0, alertable=0x0, timeout=0x7ba8f6c8) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/ntdll/sync.c:750] in ntdll (0x7ba8f670) 7 0x7beda49a NtWaitForSingleObject+0x3a(handle=0x4c, alertable=0x0, timeout=0x7ba8f6c8) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/ntdll/sync.c:759] in ntdll (0x7ba8f690) 8 0x7beaf5c6 RtlpWaitForCriticalSection+0x196(crit=0x7fee5420) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/ntdll/critsection.c:246] in ntdll (0x7ba8f730) 9 0x7beaf8ad RtlEnterCriticalSection+0x5d(crit=0x7fee5420) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/ntdll/critsection.c:345] in ntdll (0x7ba8f748) 10 0x7febf915 wine_tsx11_lock+0x65 [/var/tmp/portage/wine-cvs/freeze-regression/notworking-01-08-05/dlls/x11drv/x11drv_main.c:244] in winex11.drv (0x7ba8f764) 11 0x7fea84f6 X11DRV_ExtEscape+0x2b6(physDev=0x7bc0d368, escape=0x1a85, in_count=0x1c, in_data=0x7ba8f8dc, out_count=0x0, out_data=0x0) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/x11drv/init.c:334] in winex11.drv (0x7ba8f808) 12 0x7b3fa37c ExtEscape(hdc=0x1f4, nEscape=0x1a85, cbInput=0x1c, lpszInData=0x7ba8f8dc, cbOutput=0x0, lpszOutData=0x0) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/gdi/driver.c:690] in gdi32 (0x7ba8f834) 13 0x7fe8e2ce update_visible_region+0x26e [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/x11drv/dce.c:155] in winex11.drv (0x7ba8f908) 14 0x7fe8ed4b X11DRV_GetDCEx(hwnd=0x10022, hrgnClip=0x0, flags=0x10000) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/x11drv/dce.c:550] in winex11.drv (0x7ba8f960) 15 0x7b4eef05 GetDCEx(hwnd=0x10022, hrgnClip=0x0, flags=0x10000) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/user/painting.c:430] in user32 (0x7ba8f978) 16 0x7b4eefc0 GetDC(hwnd=0x10022) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/user/painting.c:445] in user32 (0x7ba8f990) 17 0x7b5a5bba IWineD3DDeviceImpl_CreateAdditionalSwapChain+0xda(iface=0x7bc0ea60, pPresentationParameters=0x7ba8fb4c, ppSwapChain=0x7bc0c018, parent=0x7bc0c010, D3DCB_CreateRenderTarget=0x7b980550, D3DCB_CreateDepthStencil=0x7b9807c0) [/var/tmp/portage/wine-cvs/freeze-regression/notworking-01-08-05/dlls/wined3d/device.c:998] in wined3d (0x7ba8fb28) 18 0x7b9849dd IDirect3DDevice9Impl_CreateAdditionalSwapChain(iface=0x7bc0bfe8, pPresentationParameters=0x7ba8fbb8, pSwapChain=0x7ba8fbb4) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/d3d9/swapchain.c:177] in d3d9 (0x7ba8fb98) 19 0x7b9806e5 D3D9CB_CreateAdditionalSwapChain+0xb5(device=0x7bc0bfe8, pPresentationParameters=0x7ba8fc9c, ppSwapChain=0x7ba8fc3c) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/d3d9/directx.c:221] in d3d9 (0x7ba8fc04) 20 0x7b5bf46c IWineD3DImpl_CreateDevice+0x31c(iface=0x7bc0e7b0, Adapter=0x0, DeviceType=0x1, hFocusWindow=0x10022, BehaviourFlags=0x20, pPresentationParameters=0x7ba8fc9c, ppReturnedDeviceInterface=0x7bc0bff0, parent=0x7bc0bfe8, D3DCB_CreateAdditionalSwapChain=0x7b980630) [/var/tmp/portage/wine-cvs/freeze-regression/notworking-01-08-05/dlls/wined3d/directx.c:1590] in wined3d (0x7ba8fc6c) 21 0x7b98099b IDirect3D9Impl_CreateDevice+0x11b(iface=0x7bc0d2d0, Adapter=0x0, DeviceType=0x1, hFocusWindow=0x10022, BehaviourFlags=0x20, pPresentationParameters=0x7ba8fd1c, ppReturnedDeviceInterface=0x42cc88) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/d3d9/directx.c:310] in d3d9 (0x7ba8fce8) 22 0x004011a9 in dx9_primitive_types (+0x11a9) (0x7ba8ff20) 23 0x7bb27232 start_process+0xf2(arg=0x0) [/var/tmp/portage/wine-cvs/freeze-regression/wine/dlls/kernel/process.c:996] in kernel32 (0x7ba8fff4) 24 0xb7fa4e41 wine_switch_to_stack+0x11 in libwine.so.1 (0x00000000)
___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
On Tuesday 02 August 2005 01:17, Oliver Stieber wrote:
--- Oliver Stieber oliver_stieber@yahoo.co.uk wrote:
Hi, Somewhere between 20-07-2005 and 26-07-2005 I've been getting deadlocks when I call some glx functions e.g. glXMakeCurrent, I've tracked to problem down to a deadlock, prior to calling glXMakeCurrent wined3d calls wine_tsx11_lock_ptr, but the call to glXMakeCurrent is raising an event in x11drv on a different thread that then tries to call wine_tsx11_lock_ptr, resulting in a deadlock.
I've looked through the patches send in between 20-07-2005 and 26-07-2005 but nothing looked obvious. Should I be calling wine_tsx11_lock_ptr before glXMakeCurrent? or should I try to find out what patch caused the problem?
I've removed all the calls to wine_tsx11_lock_ptr in wined3d and it looked like the problem was desktop mode, So I switched off desktop mode, and now only one thread is running but calls to getDC are causing the same problem: 0009:err:ntdll:RtlpWaitForCriticalSection section 0x7fee5420 "x11drv_main.c: X11DRV_CritSection" wait timed out in thread 0009, blocked by 0000, retrying (60 sec)
Are you sure you removed all x11drv locks form d3d9/d3d8/wined3d ? else can you provide all stacks for all threads ?
Anyway ENTER_GL() / LEAVE_GL() calls must be used only for Xlib/openGL calls (i have done a long time ago a mini cleanup for that).
Example in IWineD3DDeviceImpl_CreateAdditionalSwapChain, this is incorrect
<snip> ENTER_GL();
/* Create a new context for this swapchain */ template.visualid = (VisualID)GetPropA(GetDesktopWindow(), "__wine_x11_visual_id"); /* TODO: change this to find a similar visual, but one with a stencil/zbuffer buffer that matches the request (or the best possible if none is requested) */ TRACE("Found x visual ID : %ld\n", template.visualid);
object->visInfo = XGetVisualInfo(object->display, VisualIDMask, &template, &num); if (NULL == object->visInfo) { ERR("cannot really get XVisual\n"); LEAVE_GL(); return D3DERR_NOTAVAILABLE; <snip>
It should be like that
<snip> /* Create a new context for this swapchain */ template.visualid = (VisualID)GetPropA(GetDesktopWindow(), "__wine_x11_visual_id"); /* TODO: change this to find a similar visual, but one with a stencil/zbuffer buffer that matches the request (or the best possible if none is requested) */ TRACE("Found x visual ID : %ld\n", template.visualid);
ENTER_GL(); object->visInfo = XGetVisualInfo(object->display, VisualIDMask, &template, &num); LEAVE_GL(); if (NULL == object->visInfo) { ERR("cannot really get XVisual\n"); return D3DERR_NOTAVAILABLE; <snip>
Regards, Raphael