Hi again,
Ok so I've found a workaround (not a great one..) for the deadlock I experience running System Shock 2 in wine using a SMP box. I've also tried another game in wine, Jedi Knight 2 which does not deadlock, I'm guessing it has to do with how ss2 is calling sounds, since it seems directly related to dsound underruns, and dsound_main.c says in the todo it's missing critical section locking in some parts of it's code, and it's critical section timeouts with the same address, and different tid's that are in the log when the deadlock occurs. (see older thread for more info....)
I decided I needed to try a new kernel, 2.5.70 to see if it was something with my kernel - and I also had an idea of how to work around it. The kernel upgrade still deadlocked, but 2.5.70 has the ability to set hard cpu affinity, so by restricting all the wine processes to only using cpu1, the deadlock disappears - obviously this should be fixed in the code rather than working around it like this, but I can't trace it since it doesn't happen when the game plays slow. It seems like it only happens when the game is playing at a good pace and two or more sounds are about to play at the same time. I hope someone knows what needs to be fixed for this without too much more info, as I'm only a novice coder. But until then I'll do some heavy reading on how wine works and see if I can figure it out myself... cheers -Dan
-- OverrideX overridex@punkass.com GPG Key Fingerprint = 4AD5 CE9C D7C8 0069 BDD3 7F72 3AB2 642A 5A5D EB89
It is difficult to legislate morality in the absence of moral legislators.
On Sat, Jun 14, 2003 at 08:13:42PM -0400, OverrideX wrote:
guessing it has to do with how ss2 is calling sounds, since it seems directly related to dsound underruns, and dsound_main.c says in the todo it's missing critical section locking in some parts of it's code, and
I don't think the missing critical sections in AddRef and Release are related to your problem, but just in case, I have changed the AddRef and Release in dsound_main.c to use InterlockedIncrement and InterlockedDecrement. Does this help? Or at least, does it avoid breaking it worse?
On Tue, 2003-06-17 at 20:15, John K. Hohm wrote:
On Sat, Jun 14, 2003 at 08:13:42PM -0400, OverrideX wrote:
guessing it has to do with how ss2 is calling sounds, since it seems directly related to dsound underruns, and dsound_main.c says in the todo it's missing critical section locking in some parts of it's code, and
I don't think the missing critical sections in AddRef and Release are related to your problem, but just in case, I have changed the AddRef and Release in dsound_main.c to use InterlockedIncrement and InterlockedDecrement. Does this help? Or at least, does it avoid breaking it worse?
Hi John, thanks for the reply and patch :)
It doesn't fix the problem, nope... as far as making it worse, maybe, the loading screen froze when reaching 100% the first time I tried which is something that hasn't happened before, the second try was fine for quite a while until the infamous deadlock.
Any suggestions to help track this down? I can't do a +relay as it slows the game down to around 2fps and even after trying for a half hour I couldn't make it freeze. Any suggestions are more than welcome, -Dan
-- OverrideX overridex@punkass.com GPG Key Fingerprint = 4AD5 CE9C D7C8 0069 BDD3 7F72 3AB2 642A 5A5D EB89
Again she fled, but swift he came. Tin'^Huviel! Tin'^Huviel! He called her by her elvish name; And there she halted listening. One moment stood she, and a spell His voice laid on her: Beren came And doom fell on Tin'^Huviel That in his arms lay glistening. As Beren looked into her eyes Within the shadows of her hair, The trembling starlight of the skies He saw there mirrored shimmering. Tin'^Huviel the elven-fair, Immortal maiden elven-wise, About him cast her shadowy hair And arms like silver glimmering. Long was the way that fate them bore, O'er stony mountains cold and grey, Through halls of iron and darkling door, And woods of nightshade morrowless. The Sundering Seas between them lay, And yet at last they met once more, And long ago they passed away In the forest singing sorrowless. -- J. R. R. Tolkien