Thread not detaching?

Duane Clark dclark at akamail.com
Sun Oct 3 13:34:30 CDT 2004


Alexandre Julliard wrote:
> Duane Clark <dclark at akamail.com> writes:
> 
> 
>>err:ntdll:RtlpWaitForCriticalSection section 0x403f2580 "syslevel.c:
>>Win16Mutex" wait timed out in thread 000b, blocked by 000a, retrying (60
>>sec)
>>err:ntdll:RtlpWaitForCriticalSection section 0x408849c0
>>"../../windows/user.c: USER_SysLevel" wait timed out in thread 000a,
>>blocked by 000b, retrying (60 sec)
> 
> 
> It sounds like thread 000b is trying to get the Win16 lock while it
> holds the USER lock, this is a bug. You should get a backtrace of that
> thread to find out which function is getting the locks in the wrong
> order.
> 

Hmm... I'll have to look at this awhile to see if I can make sense of 
it. Anyway, here is a backtrace, along with a relay trace of the last 
things happening on thread b.

-------------- next part --------------
kotao:~ > winedbg
Wine-dbg>info process
 pid      threads  parent   executable (all id:s are in hex)
 00000008 3        00000000 'F:\Setup.exe'
Wine-dbg>attach 8
In 32 bit mode.
0xffffe002: -- no code accessible --
Wine-dbg>info threads
process  tid      prio (all id:s are in hex)
00000008 (D) F:\Setup.exe
        0000000b    0 <==
        0000000a    0
        00000009    0

Wine-dbg>bt 11
Backtrace:
=>1 0xffffe002 (0x40d76c58)
  2 0x400a1f2f NTDLL_wait_for_multiple_objects+0x107(count=0x0, handles=0x0, flags=0x8, timeout=0x40d76d10) [/home/wine/dlls/ntdll/sync.c:587] in ntdll (0x40d76cf4)
  3 0x400a092d usr1_handler+0x39(__signal=0xa, __context=0x33) [/home/wine/dlls/ntdll/signal_i386.c:1160] in ntdll (0x40d76d1c)
  4 0x400488f8 __restore in libpthread.so.0 (0x410a55a8)
  5 0x400a1f2f NTDLL_wait_for_multiple_objects+0x107(count=0x1, handles=0x410a5694, flags=0xc, timeout=0x410a56ac) [/home/wine/dlls/ntdll/sync.c:587] in ntdll (0x410a5644)
  6 0x400a1f84 NtWaitForMultipleObjects+0x50(count=0x1, handles=0x410a5694, wait_all=0x0, alertable=0x0, timeout=0x410a56ac) [/home/wine/dlls/ntdll/sync.c:605] in ntdll (0x410a566c)
  7 0x400a1fb9 NtWaitForSingleObject+0x25(handle=0x78, alertable=0x0, timeout=0x410a56ac) [/home/wine/dlls/ntdll/sync.c:615] in ntdll (0x410a568c)
  8 0x40083866 RtlpWaitForCriticalSection+0x106(crit=0x403f2580) [/home/wine/dlls/ntdll/critsection.c:250] in ntdll (0x410a5714)
  9 0x40083a85 RtlEnterCriticalSection+0x65(crit=0x403f2580) [/home/wine/dlls/ntdll/critsection.c:354] in ntdll (0x410a572c)
  10 0x40372bf6 _EnterSysLevel+0x6e(lock=0x403f2580) [/home/wine/dlls/kernel/syslevel.c:111] in kernel32 (0x410a5748)
  11 0x40372f92 RestoreThunkLock+0x2a(mutex_count=0x2) [/home/wine/dlls/kernel/syslevel.c:228] in kernel32 (0x410a5760)
  12 0x407fb4ca MsgWaitForMultipleObjectsEx+0x13e(count=0x0, pHandles=0x0, timeout=0x0, mask=0x0, flags=0x0) [/home/wine/dlls/user/../../windows/message.c:599] in user32 (0x410a58f8)
  13 0x40a59a23 X11DRV_SetWindowPos+0x27(winpos=0x410a5994) [/home/wine/dlls/x11drv/winpos.c:888] in x11drv (0x410a5988)
  14 0x40811524 SetWindowPos+0xe4(hwnd=0x10024, hwndInsertAfter=0x0, x=0x0, y=0x0, cx=0x0, cy=0x0, flags=0x57) [/home/wine/dlls/user/../../windows/winpos.c:1210] in user32 (0x410a59c0)
  15 0x40a5a5f8 .L516+0x70 in x11drv (0x410a5a08)
  16 0x40810a11 ShowWindow+0x65(hwnd=0x10024, cmd=0x5) [/home/wine/dlls/user/../../windows/winpos.c:852] in user32 (0x410a5a24)
  17 0x4080c18f WIN_CreateWindowEx+0x51f(cs=0x410a5c20, classAtom=0xc007, type=0x1) [/home/wine/dlls/user/../../windows/win.c:1205] in user32 (0x410a5af4)
  18 0x4080c65d CreateWindowEx16+0x16d(exStyle=0x4, className=0x408b81f4, windowName=0x4026281b, style=0x50020080, x=0x43, y=0x13, width=0x113, height=0x35, parent=0x22, menu=0x65, instance=0x1307, data=0x0) [/home/wine/dlls/user/../../windows/win.c:1288] in user32 (0x410a5c5c)
  19 0x40824ade DIALOG_CreateControls16+0x11a(hwnd=0x10022, template=0x40262896, dlgTemplate=0x410a5d10, hInst=0x1307) [/home/wine/dlls/user/dialog16.c:171] in user32 (0x410a5cd8)
  20 0x40825172 DIALOG_CreateIndirect16+0x272(hInst=0x1307, dlgTemplate=0x4026280c, owner=0x0, dlgProc=0x124f00ba, param=0x13670004, modal=0x0) [/home/wine/dlls/user/dialog16.c:421] in user32 (0x410a5d5c)
  21 0x40825b6b CreateDialogIndirectParam16+0x3f(hInst=0x1307, dlgTemplate=0x402627f0, owner=0x0, dlgProc=0x124f00ba, param=0x13670004) [/home/wine/dlls/user/dialog16.c:764] in user32 (0x410a5d88)
  22 0x40825ade CreateDialogParam16+0x86(hInst=0x1307, dlgTemplate=0x1d4c, owner=0x0, dlgProc=0x124f00ba, param=0x13670004) [/home/wine/dlls/user/dialog16.c:751] in user32 (0x410a5db4)
  23 0x407df247 __wine_user_exe_CallFrom16_p_word_wtwll+0x3f(proc=0x40825a58, args=0x4025ab4e) [user.exe.spec.c:1058] in user32 (0x410a5dd8)
  24 0x403819f8 __wine_call_from_16_word+0x94 in kernel32 (0x410a5e08)
  25 0x125f:0x37d0 (0x1267:0x5078)
  26 0x125f:0x0a48 (0x1267:0x5178)
  27 0x0012:0x6700 (0x1267:0x5192)
  28 0x0012:0x6636 (0x1267:0x51a0)
  29 0x0012:0x660e (0x1267:0x0000)

Wine-dbg>bt 10
Backtrace:
  1 0xffffe002 (0x40d74c58)
  2 0x400a1f2f NTDLL_wait_for_multiple_objects+0x107(count=0x0, handles=0x0, flags=0x8, timeout=0x40d74d10) [/home/wine/dlls/ntdll/sync.c:587] in ntdll (0x40d74cf4)
  3 0x400a092d usr1_handler+0x39(__signal=0xa, __context=0x33) [/home/wine/dlls/ntdll/signal_i386.c:1160] in ntdll (0x40d74d1c)
  4 0x400488f8 __restore in libpthread.so.0 (0x40fa3dd4)
  5 0x400a1f2f NTDLL_wait_for_multiple_objects+0x107(count=0x1, handles=0x40fa3ec0, flags=0xc, timeout=0x40fa3ed8) [/home/wine/dlls/ntdll/sync.c:587] in ntdll (0x40fa3e70)
  6 0x400a1f84 NtWaitForMultipleObjects+0x50(count=0x1, handles=0x40fa3ec0, wait_all=0x0, alertable=0x0, timeout=0x40fa3ed8) [/home/wine/dlls/ntdll/sync.c:605] in ntdll (0x40fa3e98)
  7 0x400a1fb9 NtWaitForSingleObject+0x25(handle=0x88, alertable=0x0, timeout=0x40fa3ed8) [/home/wine/dlls/ntdll/sync.c:615] in ntdll (0x40fa3eb8)
  8 0x40083866 RtlpWaitForCriticalSection+0x106(crit=0x40885ae0) [/home/wine/dlls/ntdll/critsection.c:250] in ntdll (0x40fa3f40)
  9 0x40083a85 RtlEnterCriticalSection+0x65(crit=0x40885ae0) [/home/wine/dlls/ntdll/critsection.c:354] in ntdll (0x40fa3f58)
  10 0x40372bf6 _EnterSysLevel+0x6e(lock=0x40885ae0) [/home/wine/dlls/kernel/syslevel.c:111] in kernel32 (0x40fa3f74)
  11 0x40808f90 USER_Lock+0x1c [../../windows/user.c:135] in user32 (0x40fa3f84)
  12 0x4080a27b WIN_GetPtr+0x4b(hwnd=0x10022) [/home/wine/dlls/user/../../windows/win.c:245] in user32 (0x40fa3f98)
  13 0x4080a449 WIN_IsCurrentThread+0x35(hwnd=0x10022) [/home/wine/dlls/user/../../windows/win.c:290] in user32 (0x40fa3fb4)
  14 0x4080ad63 WIN_DestroyThreadWindows+0x6b(hwnd=0x10020) [/home/wine/dlls/user/../../windows/win.c:688] in user32 (0x40fa3fd4)
  15 0x4084f64d thread_detach+0x31 [/home/wine/dlls/user/user_main.c:234] in user32 (0x40fa3fe4)
  16 0x4084f695 DllMain+0x31(inst=0x407d0000, reason=0x3, reserved=0x0) [/home/wine/dlls/user/user_main.c:255] in user32 (0x40fa3ff4)
  17 0x407dc238 __wine_dll_main+0x60 in user32 (0x40fa4024)
  18 0x4008d4ce call_dll_entry_point+0x12 in ntdll (0x40fa403c)
  19 0x4008e4e7 MODULE_InitDLL+0xe3(wm=0x401e08f0, reason=0x3, lpReserved=0x0) [/home/wine/dlls/ntdll/loader.c:741] in ntdll (0x40fa40ac)
  20 0x4009022a LdrShutdownThread+0x8e [/home/wine/dlls/ntdll/loader.c:1669] in ntdll (0x40fa40d0)
  21 0x40376278 ExitThread+0x6c(code=0x0) [/home/wine/dlls/kernel/thread.c:235] in kernel32 (0x40fa420c)
  22 0x4077907f .L2160+0x62 in winedos (0x40fa4ad0)
  23 0x407800a9 DOSVM_IntProcRelay+0x9(context=0x40fa4b1c, data=0x407771f8) [/home/wine/dlls/winedos/interrupts.c:154] in winedos (0x40fa4adc)
  24 0x40783b8c RELAY_RelayStub+0x74(proc=0x407800a0, args=0xd0c58, ctx86=0x40fa4b1c) [relay.c:127] in winedos (0x40fa4b08)
  25 0x40381c54 __wine_call_from_16_regs+0x144 in kernel32 (0x40fa4e08)
  26 0x110f:0x0003 (0x1117:0x384a)
  27 0x110f:0x0000 (0x1117:0x0000)

Wine-dbg>bt 9
Backtrace:
  1 0xffffe002 (0x40017c58)
  2 0x400a1f2f NTDLL_wait_for_multiple_objects+0x107(count=0x0, handles=0x0, flags=0x8, timeout=0x40017d10) [/home/wine/dlls/ntdll/sync.c:587] in ntdll (0x40017cf4)
  3 0x400a092d usr1_handler+0x39(__signal=0xa, __context=0x33) [/home/wine/dlls/ntdll/signal_i386.c:1160] in ntdll (0x40017d1c)
  4 0x400488f8 __restore in libpthread.so.0 (0x4074fcd0)
  5 0x40370583 SleepEx+0x3f(timeout=0xffffffff, alertable=0x0) [sync.c:87] in kernel32 (0x4074fcec)
  6 0x4037053a Sleep+0x1a(timeout=0xffffffff) [sync.c:71] in kernel32 (0x4074fd00)
  7 0x40638567 main+0x143(argc=0x2, argv=0x401e06b8) [winevdm.c:242] in setup (0x4074fe9c)
  8 0x40638163 __wine_exe_main+0x163 in setup (0x4074ff2c)
  9 0x403612ce start_process+0xf2(arg=0x0) [/home/wine/dlls/kernel/process.c:1019] in kernel32 (0x4074fff4)
  10 0x4002a8c5 wine_switch_to_stack+0x11 in libwine.so.1 (0x00000000)

-------------- next part --------------
000b:Call kernel32.lstrcpynW(40887b68,4026ced8 L"%PSetup is preparing the InstallShield\00a9 Wizard which will guide you through the rest of the setup process.  Please wait. ",00000010) ret=4080df21
000b:Ret  kernel32.lstrcpynW() retval=40887b68 ret=4080df21
000b:Call window proc 0x408499e8 (hwnd=0x10024,msg=WM_SHOWWINDOW,wp=00000001,lp=00000000)
000b:Call kernel32._ConfirmSysLevel(40885ae0) ret=40809002
000b:Ret  kernel32._ConfirmSysLevel() retval=00000001 ret=40809002
000b:Call kernel32.GlobalGetAtomNameW(0000c007,40887af0,0000003c) ret=407e9b2b
000b:Ret  kernel32.GlobalGetAtomNameW() retval=00000006 ret=407e9b2b
000b:Call kernel32.lstrcpynW(40887b68,4026ced8 L"%PSetup is preparing the InstallShield\00a9 Wizard which will guide you through the rest of the setup process.  Please wait. ",00000010) ret=4080df21
000b:Ret  kernel32.lstrcpynW() retval=40887b68 ret=4080df21
000b:Ret  window proc 0x408499e8 (hwnd=0x10024,msg=WM_SHOWWINDOW,wp=00000001,lp=00000000) retval=00000000
000b:Call kernel32.GlobalLock16(00001237) ret=40800fc1
000b:Ret  kernel32.GlobalLock16() retval=4025ded0 ret=40800fc1
000b:Ret  user32.SendMessageW() retval=00000000 ret=40a5a5c3
000b:Call user32.IsWindow(00010024) ret=40a5a5cb
000b:Ret  user32.IsWindow() retval=00000001 ret=40a5a5cb
000b:Call user32.SetWindowPos(00010024,00000000,00000000,00000000,00000000,00000000,00000057) ret=40a5a5f8
000b:Call x11drv.SetWindowPos(410a5840) ret=40811524
000b:Call user32.MsgWaitForMultipleObjectsEx(00000000,00000000,00000000,00000000,00000000) ret=40a59a23
000b:Call kernel32.GlobalLock16(00001237) ret=40800fc1
000b:Ret  kernel32.GlobalLock16() retval=4025ded0 ret=40800fc1
000b:Call kernel32.ReleaseThunkLock(410a54dc) ret=407fb47a
000b:Ret  kernel32.ReleaseThunkLock() retval=00000000 ret=407fb47a
000b:Call x11drv.MsgWaitForMultipleObjectsEx(00000001,410a5550,00000000,00000000,00000000) ret=407fb4a6
000b:Call kernel32.WaitForMultipleObjectsEx(00000002,410a52ec,00000000,00000000,00000000) ret=40a47921
000b:Call ntdll.NtWaitForMultipleObjects(00000002,410a5114,00000000,00000000,410a510c) ret=403706e3
000b:Ret  ntdll.NtWaitForMultipleObjects() retval=00000102 ret=403706e3
000b:Ret  kernel32.WaitForMultipleObjectsEx() retval=00000102 ret=40a47921
000b:Ret  x11drv.MsgWaitForMultipleObjectsEx() retval=00000102 ret=407fb4a6
000b:Call kernel32.RestoreThunkLock(00000002) ret=407fb4ca
err:syslevel:_EnterSysLevel (0x403f2580, level 1): Holding 0x40885ae0, level 2. Expect deadlock!


More information about the wine-devel mailing list