http://bugs.winehq.org/show_bug.cgi?id=28042
Summary: [regression] deadlock introduced/exposed with recent changes to winmm Product: Wine Version: 1.3.26 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: cfiend@talent.edu.pl
Running recent versions of Wine (1.3.25 or 1.3.26) causes "Cuban Missile Crisis: The Aftermath" (known also as "The Day After: Fight for Promised Land") to hang during startup with a message similar to:
err:ntdll:RtlpWaitForCriticalSection section 0x7efec8e4 "loader.c: loader_section" wait timed out in thread 001f, blocked by 0009, retrying (60 sec)
I cannot test this as currently I'm not in possesion of suitable software but there is a possibility that other games using the Enigma engine might suffer in the same way: Blitzkrieg, Blitzkrieg 2, Stalingrad. This needs confirmation though.
git bisect converges on the following commit:
30eeb996edc3be14b06244ed13b2b8f84be5f400 is the first bad commit commit 30eeb996edc3be14b06244ed13b2b8f84be5f400 Author: Andrew Eikum aeikum@codeweavers.com Date: Wed Jul 13 14:20:40 2011 -0500
winmm: Implement mixer* on top of MMDevAPI.
:040000 040000 3d0e5786be14ebaa13b08f4cd4234ddcbf112eb1 2ba46764f5cf7c6d823ce3a2d9d6132d43db7013 M dlls
Switching between hardware or emulation in sound settings does not help, neither does turning off sound entirely.
I will gladly provide any additional logs or information on request.
http://bugs.winehq.org/show_bug.cgi?id=28042
Bartosz Szreder cfiend@talent.edu.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
--- Comment #1 from Bartosz Szreder cfiend@talent.edu.pl 2011-08-09 15:50:14 CDT --- Adding author of the patch to CC
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #2 from Bartosz Szreder cfiend@talent.edu.pl 2011-08-09 15:58:01 CDT --- By executing "git reset --hard 30eeb996edc3be14b06244ed13b2b8f84be5f400" and inserting redundant traces I was able to pinpoint the line which causes the hang:
file dlls/winmm/waveform.c static BOOL WINMM_StartDevicesThread(void) ... 1898: wait = WaitForMultipleObjects(2, events, FALSE, INFINITE); /* this is never reached */
http://bugs.winehq.org/show_bug.cgi?id=28042
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Summary|[regression] deadlock |deadlock introduced/exposed |introduced/exposed with |with recent changes to |recent changes to winmm |winmm Regression SHA1| |30eeb996edc3be14b06244ed13b | |2b8f84be5f400
http://bugs.winehq.org/show_bug.cgi?id=28042
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #3 from GyB gyebro69@gmail.com 2011-08-11 12:26:24 CDT --- The problem is reproducible with the demo of Stalingrad: http://www.fileplanet.com/150269/150000/fileinfo/Stalingrad-demo
The demo hangs after starting in Wine-1.3.25 as well as in 1.3.26. In the terminal: err:ntdll:RtlpWaitForCriticalSection section 0x7bcbca00 "loader.c: loader_section" wait timed out ...
git checkout 30eeb996edc3be14b06244ed13b2b8f84be5f400 >> the game hangs git reset --hard HEAD^ >> the game starts correctly
Fedora 15 Alsa 1.0.24 Pulseaudio is not running
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #4 from Andrew Eikum aeikum@codeweavers.com 2011-08-22 15:10:25 CDT --- Looks like it's caused by the applications being buggy. With the Stalingrad demo, the call stack looks like:
0009:Call PE DLL (proc=0x110d309,module=0x1100000 L"sfx.dll",reason=PROCESS_ATTACH,res=(nil)) 0009:Call msvcrt._initterm(01112000,011120b4) ret=0110d2bc 0009:Call winmm.mixerGetNumDevs() ret=0113e1a0
however DLLs aren't supposed to call mixerGetNumDevs() from within DllMain. In fact, the application fails to launch on my Windows Vista VM, including in WinXP compatibility mode. It might be interesting to run it on actual hardware, but I'm not sure what we can do to work around this.
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #5 from Andrew Eikum aeikum@codeweavers.com 2011-08-23 15:06:53 CDT --- Unlike Bug 27982, this also fails on a Win 7 VM. Anybody seen it work on Vista or later?
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #6 from Bartosz Szreder cfiend@talent.edu.pl 2011-08-23 15:29:16 CDT --- Regarding Comment 4 and your comments in Bug 27982 - shouldn't the affected applications work at least in wine's "windows XP" mode?
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #7 from Andrew Eikum aeikum@codeweavers.com 2011-08-23 15:41:47 CDT --- The "Windows XP mode" thing doesn't really work like that. That setting just tweaks the reported OS version and a couple of behavior changes, like some shlwapi functions use ASCII instead of WCHAR for older Windows versions. The audio rewrite is a fundamental change. To keep the old behavior, we'd have to have _both_ codepaths laying around and maintained. Obviously that's not going to happen.
Unfortunately there's not a whole lot we can do to work around a broken application. We need to bring Wine up to match modern Windows behavior, and modern Windows behavior causes this application's bug to be exposed, as we can see by running it on post-XP Windows.
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #8 from Bartosz Szreder cfiend@talent.edu.pl 2011-08-23 19:42:39 CDT --- I'll try patching the game and report back.
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #9 from Bartosz Szreder cfiend@talent.edu.pl 2011-08-23 20:24:44 CDT --- Game starts fine after patching to version 1.2, so looks like this bug is INVALID.
Thanks for help and your work on Wine.
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #10 from Bartosz Szreder cfiend@talent.edu.pl 2011-08-23 20:29:47 CDT --- Well, no. I just noticed that I've been testing the game with wine-1.3.24. I'll do a checkout master, recompile and report back.
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #11 from Bartosz Szreder cfiend@talent.edu.pl 2011-08-23 22:01:16 CDT --- Unfortunately, even after patching to 1.2 the game still does not work with recent wine.
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #12 from Andrew Eikum aeikum@codeweavers.com 2011-08-24 07:39:36 CDT --- Does it work on Windows Vista or later? Which game is the 1.2 patch for, and where did you find it?
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #13 from Bartosz Szreder cfiend@talent.edu.pl 2011-08-24 09:20:07 CDT --- I don't have access to any windows machine.
I've downloaded the patch for Cuban Missile Crisis (Patch 1.2 US) from this address: http://www.strategyinformer.com/pc/patches/cubanmissilecrisis/patch.html
http://bugs.winehq.org/show_bug.cgi?id=28042
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #14 from joaopa jeremielapuree@yahoo.fr 2011-08-25 11:29:11 CDT --- The demo of Stalingrad works very fine in my real Vista box.
http://bugs.winehq.org/show_bug.cgi?id=28042
Raymond superquad.vortex2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |superquad.vortex2@gmail.com
--- Comment #15 from Raymond superquad.vortex2@gmail.com 2011-08-27 20:43:29 CDT --- (In reply to comment #0)
git bisect converges on the following commit:
30eeb996edc3be14b06244ed13b2b8f84be5f400 is the first bad commit commit 30eeb996edc3be14b06244ed13b2b8f84be5f400 Author: Andrew Eikum aeikum@codeweavers.com Date: Wed Jul 13 14:20:40 2011 -0500
winmm: Implement mixer* on top of MMDevAPI.
Should those mixer* implement using IAudioVolumeLevel API since they are used to control the hardware volume in w2k/xp
It seem sndvol32 only has 2 controls
http://bugs.winehq.org/show_bug.cgi?id=28042
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |loofsoft@gmail.com
--- Comment #16 from Andrew Eikum aeikum@codeweavers.com 2012-01-03 08:46:50 CST --- *** Bug 29522 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #17 from Andrew Eikum aeikum@codeweavers.com 2012-01-16 13:39:54 CST --- This should be fixed by 04ab858fefdd64380594c545f288df805c2d58ae. Please retest.
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #18 from Roman Nykyforchyn loofsoft@gmail.com 2012-01-16 14:24:59 CST --- Thanks Andrew!
The Blitzkrieg 1.2 starts fine now.
http://bugs.winehq.org/show_bug.cgi?id=28042
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |04ab858fefdd64380594c545f28 | |8df805c2d58ae Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #19 from Andrew Eikum aeikum@codeweavers.com 2012-01-18 08:19:41 CST --- Thanks for reporting and testing!
http://bugs.winehq.org/show_bug.cgi?id=28042
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #20 from Alexandre Julliard julliard@winehq.org 2012-01-27 14:18:06 CST --- Closing bugs fixed in 1.4-rc1.
http://bugs.winehq.org/show_bug.cgi?id=28042
Martin Fontaigne martinrs@softhome.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |martinrs@softhome.net
--- Comment #21 from Martin Fontaigne martinrs@softhome.net 2013-05-01 23:10:06 CDT --- There seems to be a regression in wine (at least in 1.5.24). I have the same error in both BlitzKrieg 1.2 and Stalingrad demo:
err:ntdll:RtlpWaitForCriticalSection section 0x7bcc4960 "loader.c: loader_section" wait timed out in thread 0023, blocked by 0009, retrying (60 sec)
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #22 from Andrew Eikum aeikum@codeweavers.com 2013-05-02 08:10:01 CDT --- (In reply to comment #21)
There seems to be a regression in wine (at least in 1.5.24). I have the same error in both BlitzKrieg 1.2 and Stalingrad demo:
err:ntdll:RtlpWaitForCriticalSection section 0x7bcc4960 "loader.c: loader_section" wait timed out in thread 0023, blocked by 0009, retrying (60 sec)
It's working fine for me in 1.5.29. Can you upgrade and retest? If it still doesn't work, please attach a log with the channels from http://wiki.winehq.org/Sound.
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #23 from Martin Fontaigne martinrs@softhome.net 2013-10-07 07:50:56 CDT --- (In reply to comment #22)
It's working fine for me in 1.5.29. Can you upgrade and retest? If it still doesn't work, please attach a log with the channels from http://wiki.winehq.org/Sound.
Thanks. I found out I was using Fedora source rpm and it has a big pulseaudio patch, so it must be related to Fedora's wine, not the original wine. Please disregard my comment #21.
http://bugs.winehq.org/show_bug.cgi?id=28042
--- Comment #24 from Martin Fontaigne martinrs@softhome.net 2013-10-07 21:15:30 CDT --- Just to complete my comment, I checked Fedora pulseaudio patch and it looks like setting an environment variable WINENOPULSE seems to work around the problem on the pulseaudio side.
So for those using Fedora's packaged wine (as of 1.7.3), use "WINENOPULSE=t wine game.exe" and don't bother the wine developers.