<?xml version="1.0" ?>
<kc>

<title>Wine Traffic</title>

<author contact="http://www.theshell.com/~vinn">Brian Vincent</author>
<issue num="283" date="07/15/2005" />
<intro> <p>This is the 283rd issue of the Wine Weekly News publication.
Its main goal is to split aces. It also serves to inform you of what's going on around Wine. Wine is an open source implementation of the Windows API on top of X and Unix.  Think of it as a Windows compatibility layer.  Wine does not require Microsoft Windows, as it is a completely alternative implementation consisting of 100% Microsoft-free code, but it can optionally use native system DLLs if they are available.   You can find more info at <a href="http://www.winehq.org">www.winehq.org</a></p> </intro>



<stats posts="178" size="819" contrib="64" multiples="35" lastweek="38">

<person posts="15" size="52" who="Oliver Stieber" />
<person posts="14" size="35" who="Alexandre Julliard" />
<person posts="11" size="32" who="James Liggett" />
<person posts="10" size="117" who="Nick Burns" />
<person posts="8" size="23" who="Robert Shearman" />
<person posts="6" size="20" who="Uwe Bonnes" />
<person posts="6" size="19" who="Hiji" />
<person posts="6" size="19" who="Saulius Krasuckas" />
<person posts="5" size="20" who="Ivan Gyurdiev" />
<person posts="5" size="14" who="Felix Nawothnig" />
<person posts="5" size="13" who="Mike McCormack" />
<person posts="4" size="13" who="Chris Morgan" />
<person posts="4" size="10" who="Vitaly Lipatov" />
<person posts="3" size="18" who="Hans Leidekker" />
<person posts="3" size="10" who="Eric Pouech" />
<person posts="3" size="9" who="Dmitry Timoshkov" />
<person posts="3" size="9" who="Jesse Allen" />
<person posts="3" size="9" who="Frank Richter" />
<person posts="3" size="8" who="Paul Vriens" />
<person posts="3" size="8" who="Tom Wickline" />
<person posts="2" size="44" who="Raphael" />
<person posts="2" size="8" who="Michael Jung" />
<person posts="2" size="8" who="Robert Lunnon" />
<person posts="2" size="7" who="Huw D M Davies" />
<person posts="2" size="7" who="Kevin DeKorte" />
<person posts="2" size="7" who="Jonathan Ernst" />
<person posts="2" size="7" who="Andreas Schneider" />
<person posts="2" size="7" who="=?UTF-8?B?QWxleCBWaWxsYWPDrcKtcyBMYXNzbw==?=" />
<person posts="2" size="6" who="Adam D. Moss" />
<person posts="2" size="6" who="Mitchell Mebane" />
<person posts="2" size="6" who="James Hawkins" />
<person posts="2" size="5" who="Detlef Riekenberg" />
<person posts="2" size="5" who="Brian Vincent" />
<person posts="2" size="5" who="Stefan D&#246;singer" />
<person posts="2" size="4" who="Dimi Paun" />
<person posts="1" size="134" who="=?ISO-8859-1?Q?Jo=EBl?= Bourquard" />
<person posts="1" size="3" who="=?ISO-8859-1?Q?Alex_Villac=ED=ADs_Lasso?=" />
<person posts="1" size="3" who="Gerald Pfeifer" />
<person posts="1" size="3" who="Tobias Burnus" />
<person posts="1" size="3" who="Holly Bostick" />
<person posts="1" size="3" who="Peter Zelezny" />
<person posts="1" size="3" who="R.T." />
<person posts="1" size="3" who="Jeremy Newman" />
<person posts="1" size="3" who="Jeremy White" />
<person posts="1" size="3" who="Robbert Xerox" />
<person posts="1" size="3" who="Tony Lambregts" />
<person posts="1" size="3" who="=?ISO-8859-1?Q?Altan_=CDz=B3dogru?=" />
<person posts="1" size="3" who="Marcus Meissner" />
<person posts="1" size="2" who="Paul Millar" />
<person posts="1" size="2" who="gslink" />
<person posts="1" size="2" who="Steven Edwards" />
<person posts="1" size="2" who="Adam Cooper" />
<person posts="1" size="2" who="Aric Stewart" />
<person posts="1" size="2" who="(jakov)" />
<person posts="1" size="2" who="Paul Vriens" />
<person posts="1" size="2" who="Lionel Ulmer" />
<person posts="1" size="2" who="Andreas Mohr" />
<person posts="1" size="2" who="Jonathan Wilson" />
<person posts="1" size="2" who="Ferenc Wagner" />
<person posts="1" size="2" who="Troy Rollo" />
<person posts="1" size="2" who="Marcus Meissner" />
<person posts="1" size="1" who="Vikram Kumar" />

</stats>
<section 
	title="Direct3D Work" 
	subject="wined3d - d3d9 regression testing"
	archive="http://www.winehq.org/hypermail/wine-devel/2005/07/0368.html" 
	posts="5"
	startdate="07/11/2005"
	enddate="07/14/2005"
>
<topic>DirectX</topic>
<p>Some weeks there's an overwhelming amount of threads on wine-devel
and  it takes a long time to summarize all of them.  Last week wasn't
one of those weeks.  Most of the threads were pretty boring and few
of them really touched on the development going on in the tree.  There's
definitely been a lot of CVS commits, so don't base development on the
lack of mailing list threads.
</p>
<p>More Direct3D 9 work has made its way into the Wine tree. 
Oliver Stieber announced this week that Half-Life 2 will now run, however
performance seems to be pretty bad and requires more work.  More
importantly, you can now run demos and check for regressions.
Oliver described what he uses for that last week and we covered an
abbreviated list in WWN <a href="http://www.winehq.com/wwn/282">#282</a>.
Nick Burns began running the demos and giving reports of how things
were progressing.  On Monday he wrote:</p>
<quote who="Nick Burns"><p>
results of wined3d - d3d9 regression testing on windows98se gf4 4200 64MB
(using wined3d+GLX->WGL patch)
</p><p>
General overview
<ul>
<li> some demos give odd crash on exit</li>
<li> resizing windows is hacked (blame me) -- instead of stretching the output
-- it simply changes the viewport size</li>
<li> for programs that enumerate display modes the screen flashes a lot</li>
<li> for programs that enumerate display formats it takes a LONG time to
startup</li></ul></p></quote>
<p>
You can find a complete description of how the demos ran in Nick's
<a href="http://www.winehq.com/hypermail/wine-devel/2005/07/0379.html">
summary</a>.  Regarding the last item, Oliver knew of the issue:</p>
<quote who="Oliver Stieber"><p>
The slowdown is caused by this patch:
<ul><a href="http://www.winehq.org/hypermail/wine-patches/2005/04/0289.html">
http://www.winehq.org/hypermail/wine-patches/2005/04/0289.html</a></ul></p>
<p>

I've been working on an improved version that looks up
what the graphics card supports once and generates a
lookup table for later validation which makes the
checks more or less instantaneous, but it's not quite yet
ready yet.</p></quote>

<p>Jesse Allen reported some realworld things were working better:</p>
<quote who="Jesse Allen"><p>
Just to let y'all know that I was able to get BF1942 to show the EA
screen finally with yesterday's CVS.  That's the first time I have got
anything to show in that game.</p></quote>

<p>Stefan Dosinger gave some tips for getting further:</p>
<quote who="Stefan Dosinger"><p>
<code>wine BF1942.exe +restart 1</code></p><p>
or remove the movies/ directory. A NoCD patch is needed for BF1942.exe, 
Mods/bf1942/mods.dll, Mods/Xpack1/Mod.dll and Mods/Xpack2/Mod.dll
Then it should come up properly, with missing text(font problem?). Starting a 
game works for me, but the graphics are not correct(wrong textures, units 
only shown half)</p></quote>


</section>
<section 
	title="File Locking"
	subject="file locking"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/07/0397.html"
	posts="8"
	startdate="07/12/2005"
	enddate="07/18/2005"
>
<topic>Filesystems</topic>
<p>
I asked a question about Wine's file locking.  There had been some
discussion WineConf over it and I was kind of confused after doing
some quick tests:</p>
<quote who="Brian Vincent"><p>
I've been playing around with file locking and Wine, namely the fact
that Wine doesn't have any.
</p><p>
Is there any way around this, maybe placing the burden on a
filesystem?  If I wanted to share files between two different users
(say with something dumb like file permissions 666), is there any way
to prevent the two people from stomping on each other?</p></quote>

<p>Alexandre replied:</p>
<quote who="Alexandre Julliard"><p>

Wine has quite a bit of it actually.</p><p>

If you want mandatory locking then yes this has to be done at
the filesystem level, by setting the proper mount option and
permissions. man fcntl should give you the gritty details.</p></quote> 

<p>I clarified what I was wondering,
<quote who="Brian Vincent">

What I meant was if I'm on Windows and run Word it will warn me if
another user already has the file open.  It won't let me open it for
writing, but I will have the option to open it read only.  On Wine
it'll just let me open and write to it regardless of what anyone else
is doing to the file.  Or am I overlooking something?</quote></p>

<p>Rob Shearman outlined the issues involved and where things were
heading,
<quote who="Robert Shearman">

As much of the file locking as possible is done at the file system 
level, but the only filesystem that supports the Windows style locking 
semantics is smbfs. The rest we have to emulate in the wineserver. As 
the wineserver isn't shared between processes (Alexandre is doing work 
towards making this possible and I am doing work on the security side to 
make it safe to), the only other alternative is a shared locking server 
(as suggested by the Samba team). AFAIK, no one has started implementing 
their suggestion.</quote>
</p>
<p>After a little more discussion, Rob updated the 
<a href="http://wiki.winehq.org/FileLocking">FileLocking wiki page</a> 
with some of the info.  Vitaly Lipatov wanted some input about having
one wineserver synchronize locks:</p>
<quote who="Vitaly Lipatov"><p>
I guessed it is not needed to communicate between servers... I think user
program will calls shared wineserver directly.
</p><p>
I need to get a working shared wineserver ASAP and am ready to do some coding for
it.
Have you any instructions for me or I need to patching it as I see.
</p></quote>

<p>Alexandre didn't like the idea and suggested what he'd like to see:</p>
<quote who="Alexandre Julliard"><p>
I don't think a shared wineserver is the solution. Shared locking has
to work on network filesystems too, so it needs to be based on
filesystem locking. This is currently implemented for normal locks but
not for sharing modes, though that shouldn't be too hard to fix.
</p></quote>

<p>Keep in mind that "shouldn't be too hard" for Alexandre is slightly 
more difficult for anyone else.</p>

</section>
<section 
	title="MS Services for Unix"
	subject="FWIW, news of SFU and wine"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/07/0312.html"
	posts="3"
	startdate="07/10/2005"
>
<p>Microsoft's Services for Unix provides a lot of interoperability
features for NT.  Wesley Parish got them working with Wine just for fun:</p>
<quote who="Wesley Parish"><p>
I've installed MS SFU successfully.  I can now use gcc under wine on Linux to 
compile source for Linux under wine on Linux ... ;)  A bit bizarre, and a 
decidedly roundabout way of doing things, but what's a challenge for?
</p><p>
I had a go at installing the x-window-system-on-MS-Windows package shown but 
it halted with these error messages:
<ul><code>
[wparish_at_localhost sfu+X]$ wine x-win612LX.exe<br />
fixme:win:SetWindowTextA cannot set text "InstallShield Wizard" of other 
process window (nil)<br />
fixme:dialog:MSGBOX_OnInit task modal msgbox ! Not modal yet.<br />
fixme:dialog:MSGBOX_OnInit task modal msgbox ! Not modal yet.<br />
fixme:shell:SHELL32_DllCanUnloadNow (void): stub<br />
[wparish_at_localhost sfu+X]$</code></ul></p><p>

So at the moment I can't run X under wine on Linux just for the fun of it and 
the delight of saying I can ... ;(
</p><p>
Anyone got any ideas?</p></quote>
<p>Felix Nawothnig was surprised,
<quote who="Felix Nawothnig">
Are the SFU not implemented on top of ntdll? Considering that we don't 
even have NtCreateProcess it's hard to believe for me that it works...
</quote></p>


</section>
<section 
	title="Debugger on Solaris"
	subject="Debugger startup"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/07/0306.html"
	posts="7"
	startdate="07/09/2005"
	enddate="07/15/2005"
>
<topic>Debugging</topic>
<p>Bob Lunnon has been working on getting Wine's debugger to work
under Solaris.  He asked earlier in the week about some signal stuff:</p>
<quote who="Robert Lunnon"><p>
To implement a Solaris debugger I have traced the wineservers startup and 
there is something I don't understand. I get the following stack trace:
<ul><code>
send_thread_signal+0x4a(80aab90, 10)<br />
stop_thread+0x1f(80aab90)<br />
suspend_process+0x4d(81c72a8)<br />
debugger_attach+0xf1(81c72a8, 81d1b58)<br />
req_debug_process+0x4c(81d1c38, 80477a0)<br />
call_req_handler+0x74(81d1b58)<br />
read_request+0x68(81d1b58)<br />
thread_poll_event+0x62(81d22b0, 1)<br />
fd_poll_event+0x14(81d22b0, 1)<br />
main_loop+0x9e(804785c, 8056a51, 1, 8047868, 8047870, 804785c)<br />
main+0xc6(1, 8047868, 8047870)<br />
_start+0x5d(1, 804795c, 0, 8047979, 80479f6, 8047a0a)
</code></ul>
</p><p>
debugger_attach calls suspend_process then stop_thread
</p><p>
stop_thread sends a SIGUSR1 at the thread of interest. The result of this is 
that the thread is terminated and there is nothing to attach to....
</p><p>
Why is this SIGUSR1 sent ?</p></quote>

<p>Rob Shearman explained,
<quote who="Robert Shearman">

It is the way suspending processes is done because the kernel doesn't 
allow us to do it. The handler should be installed in the file 
dlls/ntdll/signal_i386.c. You probably want to find out why it isn't 
being installed correctly.</quote></p>

<p>Bob wanted to know why:</p>
<quote who="Robert Lunnon"><p>

OK, what do you mean the kernel doesn't allow you to do that - Suspend a 
thread or ??? Why not just write a SIGSTOP
</p><p>
Anyway I think I have worked past this but I now have run into a problem 
whereby procfs returns EBUSY on a control file write to start or single step 
a process which should only happen if the thread isn't stopped. My code 
though indicates it is stopped (I test the threads status to find out before 
I issue the run)  
</p><p>
Very Odd.</p></quote>

<p>Mike Hearn described the difference:</p>
<quote who="Mike Hearn"><p>

SIGSTOP has process scope on NPTL, I think.
</p><p>
If SIGUSR1 isn't handled, then stuff will break mysteriously. Essentially
all it does is block on a wineserver fd until the thread is woken up again.
In future it'll also store the sigcontext so copy protection and such
works.</p></quote>

<p>POSIX defines two different user-defined signals that can be sent
and caught by applications: SIGUSR1 and SIGUSR2.  Wine currently uses
both and there's a need for more.  That may or may not have
been what Mike was referring to when he said SIGUSR1 could also be used
for the sigcontext.  Discussion in the past focused on muxing the
signals or some such action in order to get the desired effect.</p>

<p>Bob must have sorted out the issue because he seemed to get further
along later in the week:</p>
<quote who="Robert Lunnon"><p>
Well we are getting somewhere
</p><p>
When my test application segfaults the debugger attaches and runs through a 
number of debug events eventually ariving at a segfault</p><p>
Problem is that the client program is stopped, probably on a segfault trace 
because I enable tracing (stops) on all machine faults and signals when I 
attached it (this allows my replacement for wait4 to find out if a fault or 
signal happened in the debuggee). Everything deadlocks then since the 
debugger never continues the program after the exception (Or perhaps the 
wineserver never gets a message to restart it)
</p><p>
Perhaps I don't understand the semantics of PTRACE wait4 interactions. Should 
I just let the app trap machine faults ?</p></quote>

<p>Eric Pouech had some questions about it:</p>
<quote who="Eric Pouech"><p><ul>
<li> when you call ContinueDebugEvent, did you change the causes that caused the 
crash (from the debugger) ? If not, it should segfault again (but I don't know 
what happens)</li>
<li> after you called ContinueDebugEvent, the debuggee should be restarted. It 
isn't the case, so I'd start looking at ContinueDebugEvent in the server so see 
what fails (you may want to start with breakpoints instead of seg faults, as it 
may be easier to handle - except for some kludges -&gt; see winedbg/break.c, when 
incrementing / decrementing EIP)</li></ul></p></quote>


<p>With regards to the first question, Bob answered,
<quote who="Robert Lunnon">

Nothing, the client doesn't get restarted it is in state "stop" when I look at 
the process with ps</quote></p>

<p>He was going to investigate Eric's suggestion about ContinueDebugEvent 
and go from there.</p>
</section></kc>

