https://bugs.winehq.org/show_bug.cgi?id=44192
--- Comment #4 from Lorenzo Ferrillo lorenzofer@live.it --- Got a small log of the bug:
0100:trace:module:LdrGetDllHandleEx L"C:\users\lorenzo\Temp\nsi8b5c.tmp\nsisUnRar2.dll" -> 02E40000 (load path (null)) 0100:trace:module:LdrUnloadDll (02E40000) 0100:trace:module:lock_loader_exclusive recursion_count 0. 0100:trace:module:LdrUnloadDll (L"nsisUnRar2.dll") - START 0100:trace:module:MODULE_DecRefCount (L"nsisUnRar2.dll") ldr.LoadCount: 1 0100:trace:module:LdrUnloadDll END 0100:trace:module:unlock_loader recursion_count 0. 0100:trace:module:LdrGetDllHandleEx flag 0, load_path 00000000, dll_characteristics 00000000, name 006CF3A8, base 006CF3A4. 0100:trace:module:lock_loader_exclusive recursion_count 0. 0100:trace:module:lock_loader_exclusive recursion_count 1. 0100:trace:module:LdrAddRefDll (L"nsisUnRar2.dll") ldr.LoadCount: 2 0100:trace:module:unlock_loader recursion_count 1. 0100:trace:module:unlock_loader recursion_count 0. 0100:trace:module:LdrGetDllHandleEx L"C:\users\lorenzo\Temp\nsi8b5c.tmp\nsisUnRar2.dll" -> 02E40000 (load path (null)) 0100:trace:module:LdrUnloadDll (02E40000) 0104:trace:module:LdrUnloadDll (02E40000) 0100:trace:module:lock_loader_exclusive recursion_count 0. 0104:trace:module:lock_loader_exclusive recursion_count 0. 0100:trace:module:LdrUnloadDll (L"nsisUnRar2.dll") - START 0100:trace:module:MODULE_DecRefCount (L"nsisUnRar2.dll") ldr.LoadCount: 1 0100:trace:module:LdrUnloadDll END 0100:trace:module:unlock_loader recursion_count 0. 0104:trace:module:LdrUnloadDll (L"nsisUnRar2.dll") - START 0104:trace:module:MODULE_DecRefCount (L"nsisUnRar2.dll") ldr.LoadCount: 0 0104:trace:module:MODULE_DecRefCount (L"OLEACC.dll") ldr.LoadCount: 0 0104:trace:module:MODULE_DecRefCount (L"oleaut32.dll") ldr.LoadCount: 4 0104:trace:module:MODULE_DecRefCount (L"winspool.drv") ldr.LoadCount: 1 0104:trace:module:MODULE_DecRefCount (L"oleaut32.dll") ldr.LoadCount: 3 0104:trace:module:MODULE_InitDLL (02E40000 L"nsisUnRar2.dll",PROCESS_DETACH,00000000) - CALL 0104:trace:module:LdrUnloadDll (03AE0000) 0104:trace:module:lock_loader_exclusive recursion_count 1. 0104:trace:module:LdrUnloadDll (L"unrar.dll") - START 0104:trace:module:MODULE_DecRefCount (L"unrar.dll") ldr.LoadCount: 0 0104:trace:module:LdrUnloadDll END 0104:trace:module:unlock_loader recursion_count 1. 0100:trace:module:LdrGetDllHandleEx flag 0, load_path 00000000, dll_characteristics 00000000, name 006CF3A8, base 006CF3A4. 0100:trace:module:lock_loader_exclusive recursion_count 0.
Thread 100 is at the end trying to acquire the exclusive lock while thread 104 still hold the lock (recursion_count in the unlock_loader is 1)