5 Wine-Tests fail on FreeBSD 5.1

Eric Pouech pouech-eric at wanadoo.fr
Fri Aug 15 07:40:23 CDT 2003

>>I think more that's a discrepency in OSS handling between linux & *BSD 
>>(or a more subtle bug somewhere)
>>could you rerun with WINEOPTIONS="-debugmsg +wave,+dsound,+wavemap"

back from vacation...
the trace only shows a decent startup and a wait for incoming audio 
packets, which never show up.

> Let's take this further. I wrote to you/this list, about winedbg
> crashing on startup _every_time_. And I suspect it's this TEB thingy (I
> have no clue what a TEB is, but I really think something is broken
> there). 
a TEB is a thread environment block: a user land structure describing a 
thread status. TEB is usually stored in a page, which is pointer by the 
fs register. there's a field in the TEB which holds its linear address.
Hence, getting the linear address of a TEB is written fs:0x18.
Thread commutation (from a scheduler point of view) is (almost as simple 
as) changing the value of fs (there's also stack switching, context 
Anyway, your back trace information don't absolutely show that the TEB 
get screwed up. Since getting the TEB linear address is inlined, gdb 
sure has a hard time getting the value from the stack (as it may get 
overwritten by upper calls).
It doesn't mean however that TEB doesn't get overwritten. In gdb, you 
should check:
1/ at thread startup, where TEB is located, and which is the value of fs.
2/ on each lookup, check if fs value changed, and if TEB struct at 
address gotten from 1/ is still ok. You would want also to check that 
LDT entry for fs is still correct.

> Now back to "wine winedbg winemine".
it should be run as winedbg winemine

> wait4: Interrupted system call
> wait4: Interrupted system call <this line gets repeated every 1-4 seconds>
does this help ?
Index: ptrace.c
RCS file: /home/cvs/cvsroot/wine/wine/server/ptrace.c,v
retrieving revision 1.26
diff -u -u -r1.26 ptrace.c
--- ptrace.c	6 May 2003 00:21:21 -0000	1.26
+++ ptrace.c	15 Aug 2003 12:38:14 -0000
@@ -149,6 +149,7 @@
                  thread->unix_tid = -1;
                  thread->attached = 0;
+            else if (errno == EINTR) continue;
              else perror( "wait4" );
              return 0;

Eric Pouech

More information about the wine-devel mailing list