http://bugs.winehq.org/show_bug.cgi?id=22805
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Summary|Can't install 64bit .NET |Can't install 64bit .NET |2.0 |2.0 (install.exe fails to | |be mapped at preferred base | |when being restarted as | |64-bit process, shared | |WoW64) Ever Confirmed|0 |1
--- Comment #7 from Anastasius Focht focht@gmx.net 2010-08-28 04:14:19 CDT --- Hello,
--- quote --- wine: Invalid address
A +module trace shows:
warn:module:map_image Need to relocate module from 0x400000 to 0x110000, but there are no relocation records warn:module:load_dll Failed to load module L"C:\users\paul\Temp\IXP000.TMP\install.exe"; status=c0000018
install.exe is 64bit.
If I run /wine/wine64/wine install.exe on a clean .wine the installation starts (but fails due to some other bug). Could that be a hint? --- quote ---
The problem appears in a shared Wow64 environment. Such failures seem to happen when the 32-bit loader previously refused to load the 64-bit executable (by design) and restarts the whole thing as 64-bit process. I have a "success" rate of 1 out of 15-20 tries.
I placed an endless loop in loader at the point where the relocation of the main executable (collision) is detected to help dumping the process vm maps. The executable should be mapped at default 0x400000 base (as specified in PE header). It seems when being restarted as 64-bit process most of the time another shared library already overlaps with the designed memory mappings of the main executable. This does _not_ happen if the installer is directly started as 64-bit process using 'wine64' (in shared WoW64).
Example for bad mappings (target process is 64 bit):
"/lib64/libnss_files-2.11.2.so" is in the way
--- snip --- 00110000-00130000 r-xp 00000000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 00130000-00131000 rw-p 00000000 00:00 0 00131000-001df000 r-xp 00021000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 001df000-003de000 ---p 000cf000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 003de000-003ea000 rw-p 000ce000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 003ea000-003fd000 rw-p 00000000 00:00 0 003fd000-00409000 r-xp 00000000 fd:02 5080 /lib64/libnss_files-2.11.2.so 00409000-00608000 ---p 0000c000 fd:02 5080 /lib64/libnss_files-2.11.2.so 00608000-00609000 r--p 0000b000 fd:02 5080 /lib64/libnss_files-2.11.2.so 00609000-0060a000 rw-p 0000c000 fd:02 5080 /lib64/libnss_files-2.11.2.so 00610000-00611000 rw-p 00000000 fd:03 1443568 /home/focht/Downloads/IXP000.TMP/install.exe 00611000-0073b000 rw-p 00000000 00:00 0 0073b000-00740000 rwxp 00000000 00:00 0 00740000-0075c000 rw-p 00000000 00:00 0 00b0b000-00c38000 r-xp 00000000 fd:01 662584 /opt/wine/wine-install/lib64/libwine.so.1.0 00c38000-00e37000 ---p 0012d000 fd:01 662584 /opt/wine/wine-install/lib64/libwine.so.1.0 00e37000-00e39000 rw-p 0012c000 fd:01 662584 /opt/wine/wine-install/lib64/libwine.so.1.0 00e39000-00e3b000 rw-p 00000000 00:00 0 7b800000-7b820000 r-xp 00000000 fd:01 661913 /opt/wine/wine-install/lib64/wine/kernel32.dll.so 7b820000-7b821000 rw-p 00000000 00:00 0 7b821000-7b8b5000 r-xp 00021000 fd:01 661913 /opt/wine/wine-install/lib64/wine/kernel32.dll.so 7b8b5000-7bab5000 ---p 000b5000 fd:01 661913 /opt/wine/wine-install/lib64/wine/kernel32.dll.so 7bab5000-7bba5000 rw-p 000b5000 fd:01 661913 /opt/wine/wine-install/lib64/wine/kernel32.dll.so 7be00000-7bf01000 r-xp 00000000 fd:01 662422 /opt/wine/wine-install/bin/wine64 7c101000-7c102000 rw-p 00101000 fd:01 662422 /opt/wine/wine-install/bin/wine64 ... --- snip ---
"/opt/wine/wine-install/lib64/libwine.so.1.0" is in the way:
--- snip --- 00110000-00130000 r-xp 00000000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 00130000-00131000 rw-p 00000000 00:00 0 00131000-001df000 r-xp 00021000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 001df000-003de000 ---p 000cf000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 003de000-003ea000 rw-p 000ce000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 003ea000-003fd000 rw-p 00000000 00:00 0 004f5000-00622000 r-xp 00000000 fd:01 662584 /opt/wine/wine-install/lib64/libwine.so.1.0 00622000-00821000 ---p 0012d000 fd:01 662584 /opt/wine/wine-install/lib64/libwine.so.1.0 00821000-00823000 rw-p 0012c000 fd:01 662584 /opt/wine/wine-install/lib64/libwine.so.1.0 00823000-00825000 rw-p 00000000 00:00 0 00825000-00831000 r-xp 00000000 fd:02 5080 /lib64/libnss_files-2.11.2.so 00831000-00a30000 ---p 0000c000 fd:02 5080 /lib64/libnss_files-2.11.2.so 00a30000-00a31000 r--p 0000b000 fd:02 5080 /lib64/libnss_files-2.11.2.so 00a31000-00a32000 rw-p 0000c000 fd:02 5080 /lib64/libnss_files-2.11.2.so 00a40000-00a41000 rw-p 00000000 fd:03 1443568 /home/focht/Downloads/IXP000.TMP/install.exe ... --- snip ---
One successful run:
--- snip --- 00110000-00130000 r-xp 00000000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 00130000-00131000 rw-p 00000000 00:00 0 00131000-001df000 r-xp 00021000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 001df000-003de000 ---p 000cf000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 003de000-003df000 rw-p 000ce000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 003df000-003ea000 rwxp 000cf000 fd:01 662061 /opt/wine/wine-install/lib64/wine/ntdll.dll.so 003ea000-003fd000 rwxp 00000000 00:00 0 00400000-00401000 r-xp 00000000 fd:03 1443568 /home/focht/Downloads/IXP000.TMP/install.exe 00401000-0050b000 r-xp 00000000 00:00 0 0050b000-00530000 rwxp 00000000 00:00 0 00530000-0054c000 r-xp 00000000 00:00 0 00550000-00551000 rwxp 00000000 00:00 0 005f1000-0071e000 r-xp 00000000 fd:01 662419 /opt/wine/wine-install/lib64/libwine.so.1.0 0071e000-0091d000 ---p 0012d000 fd:01 662419 /opt/wine/wine-install/lib64/libwine.so.1.0 0091d000-0091f000 rw-p 0012c000 fd:01 662419 /opt/wine/wine-install/lib64/libwine.so.1.0 ... --- snip ---
+tid,+seh,+process,+virtual,+module,+serve trace log started with 32-bit loader -> "cpu=x86" (tid 0009):
--- snip --- 0009: init_thread( unix_pid=2883, unix_tid=2883, debug_level=1, teb=7ffd8000, entry=7ffdf000, reply_fd=6, wait_fd=8, cpu=x86 ) 0009: init_thread() = 0 { pid=0008, tid=0009, server_start=1cb46892cf52bfc (-0.0001500), info_size=0, version=403, all_cpus=00000003 } ... 0009:trace:module:load_native_dll Trying native dll L"Z:\home\focht\Downloads\IXP000.TMP\install.exe" ... 0009:trace:virtual:VIRTUAL_DumpView View: 0x400000 - 0x54bfff (anonymous) 0009:trace:virtual:VIRTUAL_DumpView 0x400000 - 0x54bfff c-rWx 0009:trace:module:map_image mapped PE file at 0x400000-0x54c000 Trying to load PE image for unsupported architecture (AMD-64) ... 0009:warn:module:load_dll Failed to load module L"Z:\home\focht\Downloads\IXP000.TMP\install.exe"; status=c000007b ... 0009:trace:process:open_exe_file looking for L"Z:\home\focht\Downloads\IXP000.TMP\install.exe" ... 0009:trace:process:exec_process starting L"Z:\home\focht\Downloads\IXP000.TMP\install.exe" as Win64 binary ((nil)-(nil)) ... 0009: new_process( inherit_all=0, create_flags=00000000, socket_fd=11, exe_file=0018, process_access=001f0fff, process_attr=00000000, thread_access=001f03ff, thread_attr=00000000, info_size=720, info={debug_flags=0,console_flags=0,console=0000,hstdin=0004,hstdout=0008,hstderr=000c, .... ) 0009: *fd* 0193 -> 79 0009: new_process() = 0 { info=001c, pid=001b, phandle=0020, tid=001c, thandle=0024 } ... 0009: *killed* exit_code=0 0008: *process killed* ... 001c: init_thread( unix_pid=2883, unix_tid=2883, debug_level=1, teb=7ffff7ff4000, entry=7ffff7ffb000, reply_fd=5, wait_fd=7, cpu=x86_64 ) ... 001c:trace:virtual:VIRTUAL_DumpView View: 0x130000 - 0x3fcfff (system) 001c:trace:virtual:VIRTUAL_DumpView 0x130000 - 0x3fcfff c-rWx 001c:trace:virtual:virtual_create_builtin_view created 0x130000-0x3fd000 001c:trace:module:load_builtin_callback loaded ntdll.dll 0x7ffff7ac2280 0x130000 001c: load_dll( handle=0000, base=00130000, name=7ffff7ac22d0, size=2936832, dbg_offset=0, dbg_size=0, filename=L"ntdll.dll" ) ... 001c:trace:virtual:VIRTUAL_DumpView View: 0x7b820000 - 0x7bba4fff (system) 001c:trace:virtual:VIRTUAL_DumpView 0x7b820000 - 0x7b820fff c-rWx 001c:trace:virtual:VIRTUAL_DumpView 0x7b821000 - 0x7bab4fff c-r-x 001c:trace:virtual:VIRTUAL_DumpView 0x7bab5000 - 0x7bba4fff c-rw- 001c:trace:module:load_builtin_callback loaded KERNEL32.dll 0x7ffff7ac2360 0x7b820000 001c: load_dll( handle=0000, base=7b820000, name=7ffff7ac23b0, size=3690496, dbg_offset=0, dbg_size=0, filename=L"KERNEL32.dll" ) ... 001c:trace:process:__wine_kernel_init starting process name=L"Z:\home\focht\Downloads\IXP000.TMP\install.exe" argv[0]=L"Z:\home\focht\Downloads\IXP000.TMP\install.exe" ... 001c:trace:module:load_native_dll Trying native dll L"Z:\home\focht\Downloads\IXP000.TMP\install.exe" 001c: create_mapping( access=000f0005, attributes=00000000, protect=00000141, size=00000000, file_handle=0018, objattr={rootdir=0000,sd={},name=L""} ) 001c: create_mapping() = 0 { handle=001c } 001c:trace:virtual:NtMapViewOfSection handle=0x1c process=0xffffffffffffffff addr=(nil) off=000000000 size=0 access=2 001c: get_mapping_info( handle=001c, access=00000004 ) 001c: get_mapping_info() = 0 { size=0014c000, protect=256, header_size=1024, base=00400000, mapping=0020, shared_file=0000 } ... 001c:trace:virtual:map_view got mem with anon mmap 0x765000-0x8b1000 001c:trace:virtual:VIRTUAL_DumpView View: 0x770000 - 0x8bbfff (anonymous) 001c:trace:virtual:VIRTUAL_DumpView 0x770000 - 0x8bbfff c-rWx 001c:trace:module:map_image mapped PE file at 0x770000-0x8bc000 001c:trace:module:map_image mapping section .text at 0x771000 off 400 size 10a000 virt 109e6e flags 60000020 001c:trace:module:map_image mapping section .data at 0x87b000 off 10a400 size 1f400 virt 24250 flags c0000040 001c:trace:module:map_image clearing 0x89a400 - 0x89b000 001c:trace:module:map_image mapping section .pdata at 0x8a0000 off 129800 size 1a200 virt 1a100 flags 40000040 001c:trace:module:map_image clearing 0x8ba200 - 0x8bb000 001c:trace:module:map_image mapping section .rsrc at 0x8bb000 off 143a00 size a00 virt 808 flags 40000040 001c:trace:module:map_image clearing 0x8bba00 - 0x8bc000 001c:warn:module:map_image Need to relocate module from 0x400000 to 0x770000, but there are no relocation records ... --- snip ---
I did some strace but could not deduce something valuable what causes the newly created 64 bit process to have shared libs (pre)loaded at addresses conflicting with main executable.
Regards