OK, this is a new problem to me... I'm not too familiar with the loader so I thought I'd see if anybody knew what was going on before I spent time trying to debug this myself.
I recently decided that my wine installation had become too crufty, so I wiped out ~/c, and ~/.wine, and ran tools/wineinstall. This is with CVS wine... IOW, a 100% standard config.
Everything seemed to go fine with wineinstall, but now, no matter what I try, I seem to be unable to run wine at all -- it more-or-less immediately segfautlts. I didn't change anything; aside from some truly trivial font path fixups, I have a completely vanilla ~/.wine/config and ~/c tree.
Under gdb, I see the following if I try to run notepad (or any other thing):
(gdb) up #1 0x4011ba3c in wine_dll_set_callback (load=0x400a7aa0 <load_library>) at loader.c:353 (gdb) print builtin_dlls[i].filename $6 = 0x400dcb95 "ntdll.dll" (gdb) down #0 map_dll (nt_descr=0x400f7b20) at loader.c:166 (gdb) bt #0 map_dll (nt_descr=0x400f7b20) at loader.c:166 #1 0x4011ba3c in wine_dll_set_callback (load=0x400a7aa0 <load_library>) at loader.c:353 #2 0x400a80c3 in BUILTIN32_LoadExeModule (main=0x0) at ../../relay32/builtin32.c:181 #3 0x403f5715 in __wine_process_init (argc=2, argv=0xbffff5f4) at ../../../wine/scheduler/process.c:578 #4 0x4011bc6a in wine_init (argc=2, argv=0xbffff5f4, error=0xbffff1a4 "", error_size=1024) at loader.c:427 #5 0x3c000540 in main (argc=2, argv=0xbffff5f4) at ../../wine/miscemu/main.c:33 #6 0x40237747 in __libc_start_main () from /lib/libc.so.6 (gdb) print ptr $7 = (void *) 0x41b (gdb) print base $8 = (void *) 0x0
It's deferencing the 0x41b pointer which is causing the segfault...
Any ideas? If not, how should I try and debug this?... what is fixup_rva_ptr's (libs/wine/loader.c) all about? And, if this is what happens with a completely vanilla wine install, why doesn't "everybody" have this problem?
Surely, I am missing something totally obvious? Thanks,
On Saturday 19 July 2003 07:33 pm, Gregory M. Turner wrote:
Everything seemed to go fine with wineinstall, but now, no matter what I try, I seem to be unable to run wine at all -- it more-or-less immediately segfautlts. I didn't change anything; aside from some truly trivial font path fixups, I have a completely vanilla ~/.wine/config and ~/c tree.
OK, I figured out what went wrong. tools/wineinstall reruns configure, which changed the install prefix in config.status to the default, /usr/local. Normally, my scripts set the prefix to /opt/wine. Here's were it gets interesting.
loader.c:353 (gdb) print builtin_dlls[i].filename $6 = 0x400dcb95 "ntdll.dll"
i, I should mention, was one (indicating the second of two array elements). builtin_dlls, suspiciously, contained two ntdll references: presumably, the one at /usr/local/lib/wine/ntdll.dll.so, and the one at /opt/wine/lib/wine/ntdll.so (or perhaps two of the same one, I lost track).
At a glance, it appears that wine was trying to mmap ntdll twice (or perhaps both ntdll's once), hence the disaster...
Of course, this is totally my fault for having two ntdll's in my library path... and thank goodness for "make uninstall," which made fixing this easy... but, under the circumstances, shouldn't the loader be loading just /one/ ntdll, even if it's the wrong one or whatever?
Well, not my area of expertise, but I thought I'd let you all know of that behavior (and that I'm no longer stymied).
I'm also having unrelated issues since I ran a cvs update *grr*, I can no longer click on anything, nor use the keyboard. The mouse cursor doesn't change when I move the mouse over it, and an x11drv trace shows it processing no events *at all* given input.
I hope this isn't actually CVS that's borked for everybody, but I can't really see what might have broken it :(
On Sun, 2003-07-20 at 08:08, Gregory M. Turner wrote:
On Saturday 19 July 2003 07:33 pm, Gregory M. Turner wrote:
Everything seemed to go fine with wineinstall, but now, no matter what I try, I seem to be unable to run wine at all -- it more-or-less immediately segfautlts. I didn't change anything; aside from some truly trivial font path fixups, I have a completely vanilla ~/.wine/config and ~/c tree.
OK, I figured out what went wrong. tools/wineinstall reruns configure, which changed the install prefix in config.status to the default, /usr/local. Normally, my scripts set the prefix to /opt/wine. Here's were it gets interesting.
loader.c:353 (gdb) print builtin_dlls[i].filename $6 = 0x400dcb95 "ntdll.dll"
i, I should mention, was one (indicating the second of two array elements). builtin_dlls, suspiciously, contained two ntdll references: presumably, the one at /usr/local/lib/wine/ntdll.dll.so, and the one at /opt/wine/lib/wine/ntdll.so (or perhaps two of the same one, I lost track).
At a glance, it appears that wine was trying to mmap ntdll twice (or perhaps both ntdll's once), hence the disaster...
Of course, this is totally my fault for having two ntdll's in my library path... and thank goodness for "make uninstall," which made fixing this easy... but, under the circumstances, shouldn't the loader be loading just /one/ ntdll, even if it's the wrong one or whatever?
Well, not my area of expertise, but I thought I'd let you all know of that behavior (and that I'm no longer stymied).
On 20 Jul 2003, Mike Hearn wrote:
I'm also having unrelated issues since I ran a cvs update *grr*, I can no longer click on anything, nor use the keyboard. The mouse cursor doesn't change when I move the mouse over it, and an x11drv trace shows it processing no events *at all* given input.
I hope this isn't actually CVS that's borked for everybody, but I can't really see what might have broken it :(
hi, Mike
i was "lucky" enough to get into such situation, once: http://www.winehq.org/hypermail/wine-devel/2003/07/0229.html
as no-one have responded to this, i decided to do: su -c "make uninstall"; make clean; tools/wineinstall
this helped :) hence, the question arises: why is it bad to just do "make uninstall", cvs update and "tools/wineinstall" after, sometimes?
BTW: sometimes i am forgetting to kill all wine processes, so wine (with any combination of cmd-line) just outputs 0 bytes and quits. maybe that is a indication of a problem. should wineinstaller kill running wines before overwriting old executable file(s) or even before doing some checks?
On Mon, 21 Jul 2003, Saulius Krasuckas wrote:
BTW: sometimes i am forgetting to kill all wine processes, so wine (with any combination of cmd-line) just outputs 0 bytes and quits. maybe that is a indication of a problem. should wineinstaller kill running wines before overwriting old executable file(s) or even before doing some checks?
i did mean "to kill all wine processes" during wineinstalling :-/
"Gregory M. Turner" gmturner007@ameritech.net writes:
Of course, this is totally my fault for having two ntdll's in my library path... and thank goodness for "make uninstall," which made fixing this easy... but, under the circumstances, shouldn't the loader be loading just /one/ ntdll, even if it's the wrong one or whatever?
It's because ntdll is looked for both in WINEDLLPATH (for explicit dlopen calls) and in LD_LIBRARY_PATH (when ld.so loads dependencies), and if that yields two different files then both get loaded, with bad results as you have noticed. This will be fixed once kernel32 dll separation is finished.