http://bugs.winehq.org/show_bug.cgi?id=31566
Bug #: 31566 Summary: Fallout 3: regression causes block at critical section when radio is enabled Product: Wine Version: 1.5.2 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dsound AssignedTo: wine-bugs@winehq.org ReportedBy: ehoover@mines.edu CC: aric@codeweavers.com Classification: Unclassified Regression SHA1: 54eafc73e51666c3edf9fa78a0534ea7b1fa23c9
I recently decided to go back and finish Fallout 3 and I discovered a regression when the radio is enabled: err:ntdll:RtlpWaitForCriticalSection section 0x1e0f60 "renderer.c: BaseRenderer.csRenderLock" wait timed out in thread 0009, blocked by 0025, retrying (60 sec) err:ntdll:RtlpWaitForCriticalSection section 0x1e0e10 "dsoundrender.c: DSoundRenderImpl.csFilter" wait timed out in thread 0025, blocked by 0009, retrying (60 sec)
It's worth noting that this was rather hard to track down, as the problem does not occur immediately, so attempting to reproduce this requires some patience. Anyway, regression testing results are: 54eafc73e51666c3edf9fa78a0534ea7b1fa23c9 is the first bad commit commit 54eafc73e51666c3edf9fa78a0534ea7b1fa23c9 Author: Aric Stewart aric@codeweavers.com Date: Mon Apr 2 07:52:08 2012 -0500
strmbase: Implement renderer quality control into the base renderer.
:040000 040000 6f88eb37386f4c2aed6e0ba842cca351f91b55ce 019588c74722acabbe36f65f3844aeb9f59639b5 M dlls :040000 040000 93eb4271ec29bde5578982a4d5def889cc9494c2 66d9dcda84911b46c7504052be195d7cf5448e1c M include
http://bugs.winehq.org/show_bug.cgi?id=31566
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=31566
David Finch david@mytsoftware.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |david@mytsoftware.com
http://bugs.winehq.org/show_bug.cgi?id=31566
Brandon Corujo haku08879@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |haku08879@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=31566
Jonas Jelten jonas.jelten@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jonas.jelten@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=31566
chrisstufflebeam@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |chrisstufflebeam@gmail.com
--- Comment #1 from chrisstufflebeam@gmail.com 2013-06-06 04:34:02 CDT --- This bug is resolved for me by installing l3codecx via winetricks.
http://bugs.winehq.org/show_bug.cgi?id=31566
Ryan Northrup northrupthebandgeek@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |northrupthebandgeek@gmail.c | |om
http://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #2 from Ryan Northrup northrupthebandgeek@gmail.com 2013-06-28 01:06:59 CDT --- Affected as well. Interestingly, this only seems to be affecting the Pip-Boy; other in-game radios appear to play fine.
The errors seem to indicate that the two threads in question (0009 and 0025 in Erich's case, 0009 and 003c in my case) are stuck waiting on each other in a deadlock. Perhaps winedbg could provide some more insights as to what they're waiting for.
OS: Slackware64 14.0 (with Alien Bob's multilib packages) Kernel: 3.2.29 Wine: 1.5.25
(In reply to comment #1)
This bug is resolved for me by installing l3codecx via winetricks.
Tried this; Fallout3.exe still wedged itself with the same errors, though at least now it crashes right away instead of waiting for half a minute, and it does now play the audio, at least up until the crash.
http://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #3 from GyB gyebro69@gmail.com --- Created attachment 46989 --> http://bugs.winehq.org/attachment.cgi?id=46989 backtrace
Still present as of wine-1.7.9-19-ge54503f. I'm at the beginning at the game and the deadlock occurs when I tune in the radio station 'Enclave Radio'. There are 2 backtraces in the attached log: the first one is right after the game became unresponsive, the second backtrace is after ""dsoundrender.c: DSoundRenderImpl.csFilter" was printed in the terminal. I believe bug #33216 is about the same problem.
http://bugs.winehq.org/show_bug.cgi?id=31566
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #4 from GyB gyebro69@gmail.com --- 'winetricks quartz' is sufficient to get rid of the deadlock, but music is still not playing and certain radio stations produce garbage audio. You also need 'winetricks l3codecx' to fix that.
http://bugs.winehq.org/show_bug.cgi?id=31566
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
http://bugs.winehq.org/show_bug.cgi?id=31566
Daniel Cantarín omega_canta@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |omega_canta@yahoo.com
--- Comment #5 from Daniel Cantarín omega_canta@yahoo.com --- I've played F:NV complete with minor to no problems. F3 GOTY however is much more problematic.
After lots of different configuration testing (as the same for F:NV was higly unstable with F3), i've got one stable enough, but without pipboy radio.
My experience is the same as http://bugs.winehq.org/show_bug.cgi?id=31566#c2 As stated there, other radios work fine (i can listen to Three Dog and GNR's Music from there), but pipboy's just plays voices: when it's time for music, there's none, and the game most likely crashes with this error:
err:ntdll:RtlpWaitForCriticalSection section 0x60414cf8 "dsoundrender.c: DSoundRenderImpl.csFilter" wait timed out in thread 0029, blocked by 0047, retrying (60 sec) err:ntdll:RtlpWaitForCriticalSection section 0x60414e48 "renderer.c: BaseRenderer.csRenderLock" wait timed out in thread 0047, blocked by 0029, retrying (60 sec)
There's also a Gstreamer error when trying to play music from the pipboy:
err:ole:apartment_getclassobject DllGetClassObject returned error 0x80040111 err:ole:CoGetClassObject no class object {da4e3da0-d07d-11d0-bd50-00a0c911ce86} could be created for context 0x1 fixme:gstreamer:GST_QueryInterface No interface for {37d84f60-42cb-11ce-8135-00aa004bb851}! fixme:thread:start_thread Started native thread 0000005a fixme:gstreamer:unknown_type Could not find a filter for caps: audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2, parsed=(boolean)true fixme:gstreamer:watch_bus decodebin21: Your GStreamer installation is missing a plug-in. fixme:gstreamer:watch_bus decodebin21: Your GStreamer installation is missing a plug-in. fixme:gstreamer:GST_Connect GStreamer could not find any streams
There are other gstreamer errors at game loading time, regarding WRONG ELF. However, as said before, the music from other radios plays fine, as well as the intro music, videos, ambient music, and so on.
I got an i7 with nVidia 9800 GT on an Ubuntu 12.04. nVidia drivers are 331.20, and Wine version is 1.7.13. quartz, dsound, and dswave are all set as "builtin then native"; other setups renders low quality audio or no audio at all, this setup gives perfect quality audio. l3codecx are installed.
http://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #6 from Erich Hoover erich.e.hoover@gmail.com --- Created attachment 49035 --> http://bugs.winehq.org/attachment.cgi?id=49035 Flip the order of a very critical set of locks
I finally took some time to look into this again. It looks like what happens is that there's two threads, and at the time of the lock conflict this is what the situation looks like: ==Thread 1== csRenderLock ... other code ... filter.csFilter ==Thread 2== filter.csFilter csRenderLock
So, the attached patch changes the lock order on "Thread 2" since there's no code in between the two locks to care about the lock order.
http://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #7 from Erich Hoover erich.e.hoover@gmail.com --- (In reply to Erich Hoover from comment #6)
Created attachment 49035 [details] Flip the order of a very critical set of locks ...
Just a little more detail about the call order, for those that are interested (why this change is necessary): == Thread 1== BaseRendererImpl_Receive -> EnterCriticalSection(csRenderLock); -> ... -> QualityControlRender_BeginRender -> ReferenceClock_GetTime -> EnterCriticalSection(filter.csFilter); -> ... -> LeaveCriticalSection(filter.csFilter); -> ... -> LeaveCriticalSection(csRenderLock); == Thread 2== BaseRenderer_InputPin_BeginFlush -> EnterCriticalSection(filter.csFilter); -> EnterCriticalSection(csRenderLock); -> ... -> LeaveCriticalSection(filter.csFilter); -> LeaveCriticalSection(csRenderLock);
There are a few other places that do similar things, so I went ahead and put together patches for all the obvious ones: https://github.com/compholio/wine-compholio/tree/master/patches/17-strmbase-...
http://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #8 from Jonas Jelten jonas.jelten@gmail.com --- did you submit your patches to wine-patches@winehq.org? would be awesome to see that fixed upstream.
https://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #9 from Austin English austinenglish@gmail.com --- (In reply to Jonas Jelten from comment #8)
did you submit your patches to wine-patches@winehq.org? would be awesome to see that fixed upstream.
https://source.winehq.org/git/wine.git/commitdiff/c22547792a2e135bace39ace42... https://source.winehq.org/git/wine.git/commitdiff/47425a5801e7972e5e78e3561d... https://source.winehq.org/git/wine.git/commitdiff/a9325037b535eacd669cddb003... https://source.winehq.org/git/wine.git/commitdiff/126a420c5630332f4370f3662b... https://source.winehq.org/git/wine.git/commitdiff/ee94725c8ea49a42130954a49a... https://source.winehq.org/git/wine.git/commitdiff/dd3278577260788b5e5349be17...
please retest.
http://bugs.winehq.org/show_bug.cgi?id=31566
Erich Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |c22547792a2e135bace39ace42b | |a9e7caa7f48d7 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #10 from Erich Hoover erich.e.hoover@gmail.com --- I'm going to go ahead and mark this as resolved since I'm the reporter for this bug. If anyone continues to have problems then please feel free to open a new bug, it's probably something different ;)
https://bugs.winehq.org/show_bug.cgi?id=31566
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.24.
https://bugs.winehq.org/show_bug.cgi?id=31566
Storm hewanci@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hewanci@gmail.com
--- Comment #12 from Storm hewanci@gmail.com --- I still have the same garbage audio from radio with quartz and l3codecx installed. I tried both builtin and native override for quartz, neither works.
https://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #13 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Storm from comment #12)
I still have the same garbage audio from radio with quartz and l3codecx installed. I tried both builtin and native override for quartz, neither works.
As stated in comment 10: If anyone continues to have problems then please feel free to open a new bug, it's probably something different ;)
https://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #14 from Storm hewanci@gmail.com --- Ah, sorry, false alarm. The codecs didn't install properly at first try, reinstalled them via "winetricks --force" and now it works!
https://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #15 from Erich Hoover erich.e.hoover@gmail.com --- (In reply to Storm from comment #12)
I still have the same garbage audio from radio with quartz and l3codecx installed. I tried both builtin and native override for quartz, neither works.
I don't think there's a bug for it, but I do have a patchset for another radio issue: https://github.com/wine-compholio/wine-staging/tree/master/patches/quartz-Me...
Feel free to open a new bug for it, if there's a duplicate someone will make sure it gets noted ;)
https://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #16 from Daniel Cantarín omega_canta@yahoo.com --- (In reply to Erich Hoover from comment #15)
I don't think there's a bug for it, but I do have a patchset for another radio issue: https://github.com/wine-compholio/wine-staging/tree/master/patches/quartz- MediaSeeking_Positions
Feel free to open a new bug for it, if there's a duplicate someone will make sure it gets noted ;)
Pardon me Erich but, care to tell us about this other patch?
I'm still experiencing the issue stated here: https://bugs.winehq.org/show_bug.cgi?id=31566#c5
It seemed related to this bug, but by Bruno's comment i guess it's not. I'm about to create another bug for my problem, but would like you to tell us first if your patch is related.
Thanks.
https://bugs.winehq.org/show_bug.cgi?id=31566
--- Comment #17 from Erich Hoover erich.e.hoover@gmail.com --- (In reply to Daniel Cantarín from comment #16)
... It seemed related to this bug, but by Bruno's comment i guess it's not. I'm about to create another bug for my problem, but would like you to tell us first if your patch is related. ...
The patch is specifically for problems with the radio on F3 being unable to sync to its time-points (the PipBoy radio syncs to the "in-game radios" you see lying about). You may need to disable winegstreamer in winecfg for the correct codepath to be used. If you take some time to test and open a new bug then please CC me on it.