https://bugs.winehq.org/show_bug.cgi?id=46995
Bug ID: 46995 Summary: Rekordbox 5.3.0 installer (32-bit process under WoW64) fails to load 32-bit code dlls with WoW64 filesystem redirection disabled Product: Wine Version: 4.5 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
encountered this while investigating bug 45543 (different issue).
The 32-bit installer (for 64-bit app) does a somewhat questionable thing:
--- snip --- $ WINEDEBUG=+seh,+relay,+loaddll,+module wine ./Install_rekordbox_x64_5_3_0.exe
log.txt 2>&1
... 0059:Call KERNEL32.LoadLibraryExW(0040f0d0 L"C:\users\focht\Temp\nsqb4a0.tmp\System.dll",00000000,00000008) ret=00402433 ... 0059:trace:module:process_attach (L"System.dll",(nil)) - START 0059:Call PE DLL (proc=0x10002728,module=0x10000000 L"System.dll",reason=PROCESS_ATTACH,res=(nil)) 0059:Call KERNEL32.VirtualProtect(10004020,00000004,00000040,10004028) ret=1000274c 0059:Ret KERNEL32.VirtualProtect() retval=00000001 ret=1000274c 0059:Ret PE DLL (proc=0x10002728,module=0x10000000 L"System.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 0059:trace:module:process_attach (L"System.dll",(nil)) - END 0059:Ret KERNEL32.LoadLibraryExW() retval=10000000 ret=00402433 ... 0059:Call KERNEL32.GetProcAddress(10000000,0016fc70 "Call") ret=004064fc 0059:Ret KERNEL32.GetProcAddress() retval=10002a4f ret=004064fc ... 0059:Call KERNEL32.lstrcpyW(00177c90,0016bc24 L"kernel32::Wow64EnableWow64FsRedirection(i0)") ret=100015c7 0059:Ret KERNEL32.lstrcpyW() retval=00177c90 ret=100015c7 ... 0059:Call KERNEL32.Wow64EnableWow64FsRedirection(00000000) ret=1000130d 0059:Ret KERNEL32.Wow64EnableWow64FsRedirection() retval=00000001 ret=1000130d ... 0059:Call KERNEL32.IsWow64Process(ffffffff,0015c9d0) ret=1000130d 0059:Ret KERNEL32.IsWow64Process() retval=00000001 ret=1000130d ... 0059:Call KERNEL32.LoadLibraryW(0040941c L"RichEd20") ret=00405d04 0059:trace:module:load_dll looking for L"RichEd20" in L"Z:\home\focht\Downloads;C:\windows\system32;C:\windows\system;C:\windows;.;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0059:trace:module:map_image mapped PE file at 0x390000-0x3a3000 0059:trace:module:map_image mapping section .text at 0x391000 off 200 size 5 virt 1000 flags 60000020 ... 0059:trace:module:open_dll_file L"\??\C:\windows\system32\RichEd20.dll" is for arch 8664, continuing search 0059:trace:module:map_image mapped PE file at 0x390000-0x3a3000 0059:trace:module:map_image mapping section .text at 0x391000 off 200 size 5 virt 1000 flags 60000020 ... 0059:trace:module:open_dll_file L"\??\C:\windows\system32\RichEd20.dll" is for arch 8664, continuing search 0059:warn:module:load_dll Failed to load module L"RichEd20"; status=c000007b 0059:Ret KERNEL32.LoadLibraryW() retval=00000000 ret=00405d04 0059:Call KERNEL32.LoadLibraryW(00409408 L"RichEd32") ret=00405d0f 0059:trace:module:load_dll looking for L"RichEd32" in L"Z:\home\focht\Downloads;C:\windows\system32;C:\windows\system;C:\windows;.;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0059:trace:module:map_image mapped PE file at 0x370000-0x374000 0059:trace:module:map_image mapping section .text at 0x371000 off 200 size 5 virt 1000 flags 60000020 ... 0059:trace:module:open_dll_file L"\??\C:\windows\system32\RichEd32.dll" is for arch 8664, continuing search 0059:trace:module:map_image mapped PE file at 0x370000-0x374000 0059:trace:module:map_image mapping section .text at 0x371000 off 200 size 5 virt 1000 flags 60000020 ... 0059:trace:module:open_dll_file L"\??\C:\windows\system32\RichEd32.dll" is for arch 8664, continuing search 0059:warn:module:load_dll Failed to load module L"RichEd32"; status=c000007b 0059:Ret KERNEL32.LoadLibraryW() retval=00000000 ret=00405d0f .. 0059:Call KERNEL32.LoadLibraryExW(0040f0d0 L"C:\users\focht\Temp\nsqb4a0.tmp\InstallOptions.dll",00000000,00000008) ret=00402433 ... 0059:trace:module:load_native_dll Trying native dll L"\??\C:\users\focht\Temp\nsqb4a0.tmp\InstallOptions.dll" 0059:trace:module:perform_relocations relocating from 0x10000000-0x1000b000 to 0x3b0000-0x3bb000 ... 0059:trace:module:map_image mapped PE file at 0x1d90000-0x1e38000 0059:trace:module:map_image mapping section .text at 0x1d91000 off 200 size 5 virt 1000 flags 60000020 ... 0059:trace:module:open_dll_file L"\??\C:\windows\system32\COMDLG32.dll" is for arch 8664, continuing search 0059:trace:module:map_image mapped PE file at 0x1d90000-0x1e38000 0059:trace:module:map_image mapping section .text at 0x1d91000 off 200 size 5 virt 1000 flags 60000020 ... 0059:trace:module:open_dll_file L"\??\C:\windows\system32\COMDLG32.dll" is for arch 8664, continuing search 0059:warn:module:load_dll Failed to load module L"COMDLG32.dll"; status=c000007b 0059:err:module:import_dll Loading library COMDLG32.dll (which is needed by L"C:\users\focht\Temp\nsqb4a0.tmp\InstallOptions.dll") failed (error c000007b). 0059:trace:module:load_dll looking for L"ole32.dll" in L"C:\users\focht\Temp\nsqb4a0.tmp;C:\windows\system32;C:\windows\system;C:\windows;.;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0059:trace:module:load_dll Found L"C:\windows\system32\ole32.dll" for L"ole32.dll" at 0x7da20000, count=-1 0059:warn:module:load_dll Failed to load module L"C:\users\focht\Temp\nsqb4a0.tmp\InstallOptions.dll"; status=c0000135 0059:Ret KERNEL32.LoadLibraryExW() retval=00000000 ret=00402433 ... 0059:Call user32.SetWindowTextW(000200a6,0043b238 L"Could not load: C:\users\focht\Temp\nsqb4a0.tmp\InstallOptions.dll") ret=00405145 ... --- snip ---
The 32-bit installer explicitly disables WoW64 file system redirection in main thread -> 'Wow64EnableWow64FsRedirection(FALSE)' and tries to load 32-bit dependencies dynamically which obviously fails. I double checked everything, there is no restore in between.
NOTE: On other threads it correctly disables and restores redirection which works fine (not shown here).
The failure is not critical for overall installer run but I assume this somehow works in 64-bit Windows (32-bit process under WoW64). Unfortunately I couldn't find any reasonable explanation/documentation for this behaviour. Maybe some Microsoft workaround for broken apps/installers?
$ sha1sum Install_rekordbox_x64_5_3_0.exe f5e5dfbbef3997d8cb2cca9e1412765bf91398b2 Install_rekordbox_x64_5_3_0.exe
$ du -sh Install_rekordbox_x64_5_3_0.exe 228M Install_rekordbox_x64_5_3_0.exe
$ wine --version wine-4.5-369-g9e80dc925e
Regards
https://bugs.winehq.org/show_bug.cgi?id=46995
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20190405195012/https://rek | |ordbox.com/_app/files/Insta | |ll_rekordbox_x64_5_3_0.zip Keywords| |download, win64
https://bugs.winehq.org/show_bug.cgi?id=46995
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=47912
https://bugs.winehq.org/show_bug.cgi?id=46995
Brendan Shanks bshanks@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bshanks@codeweavers.com
--- Comment #1 from Brendan Shanks bshanks@codeweavers.com --- Try this out with the latest trunk, this commit may have fixed the issue: https://source.winehq.org/git/wine.git/commit/aa51aee1a92ddbdd39875af81b0026...
https://bugs.winehq.org/show_bug.cgi?id=46995
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |aa51aee1a92ddbdd39875af81b0 | |02654f8ad4fc7 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/aa51aee1a92ddbdd39875af81b... ("ntdll: Enable WoW64 filesystem redirection when loading libraries.")
Thanks Brendan
--- snip --- $ $ WINEDEBUG=+seh,+relay,+loaddll,+module wine ./Install_rekordbox_x64_5_3_0.exe >>log.txt 2>&1 ... 002b:Call KERNEL32.Wow64EnableWow64FsRedirection(00000000) ret=1000130d 002b:Ret KERNEL32.Wow64EnableWow64FsRedirection() retval=00000001 ret=1000130d ... 002b:Call KERNEL32.IsWow64Process(ffffffff,0017dab8) ret=1000130d 002b:Ret KERNEL32.IsWow64Process() retval=00000001 ret=1000130d ... 002b:Call KERNEL32.LoadLibraryW(0040941c L"RichEd20") ret=00405d04 ... 002b:Call ntdll.LdrGetDllPath(0040941c L"RichEd20",00000000,0032fb64,0032fb68) ret=71259070 002b:Ret ntdll.LdrGetDllPath() retval=00000000 ret=71259070 002b:Call ntdll.LdrLoadDll(00112138 L"Z:\home\focht\Downloads;C:\windows\system32;C:\windows\system;C:\windows;.;C:\windows\system32;C:\windows;C:\windows\system32\wbem",00000000,0032fbb8,0032fb60) ret=71259158 002b:trace:module:load_dll looking for L"RichEd20" in L"Z:\home\focht\Downloads;C:\windows\system32;C:\windows\system;C:\windows;.;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 002b:trace:module:map_image mapped PE file at 0x7ac00000-0x7adbd000 002b:trace:module:map_image mapping section .text at 0x7ac01000 off 400 size 3a000 virt 39e7c flags 60500020 ... 002b:trace:module:get_load_order looking for L"C:\windows\system32\RichEd20.dll" 002b:trace:module:get_load_order got hardcoded default for L"RichEd20.dll" 002b:trace:module:load_builtin_dll Trying built-in L"RichEd20.dll" 002b:trace:module:map_image mapped PE file at 0x7ac00000-0x7adbd000 002b:trace:module:map_image mapping section .text at 0x7ac01000 off 400 size 3a000 virt 39e7c flags 60500020 ... 002b:trace:module:load_builtin_dll loading L"RichEd20.dll" from PE builtin L"\??\C:\windows\system32\RichEd20.dll" 002b:trace:module:load_native_dll Trying PE builtin dll L"\??\C:\windows\system32\RichEd20.dll" ... 002b:trace:loaddll:load_native_dll Loaded L"C:\windows\system32\RichEd20.dll" at 0x7ac00000: PE builtin 002b:trace:module:load_dll Loaded module L"\??\C:\windows\system32\RichEd20.dll" at 0x7ac00000 002b:trace:module:process_attach (L"RichEd20.dll",(nil)) - START ... 002b:Ret PE DLL (proc=0x7ac3a430,module=0x7ac00000 L"RichEd20.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 002b:trace:module:process_attach (L"RichEd20.dll",(nil)) - END 002b:Ret ntdll.LdrLoadDll() retval=00000000 ret=71259158 ... 002b:Ret KERNEL32.LoadLibraryW() retval=7ac00000 ret=00405d04 ... --- snip ---
$ wine --version wine-4.18-275-gccec532879
Regards
https://bugs.winehq.org/show_bug.cgi?id=46995
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.19.