http://bugs.winehq.org/show_bug.cgi?id=29035
Bug #: 29035 Summary: winmm deadlock at exit Product: Wine Version: 1.3.32 Platform: x86 OS/Version: Linux Status: NEW Keywords: regression Severity: normal Priority: P2 Component: winmm&mci AssignedTo: wine-bugs@winehq.org ReportedBy: hoehle@users.sourceforge.net CC: aeikum@codeweavers.com Classification: Unclassified
Winmm now deadlocks at exit when it failed to play a sound concurrently.
Use my MCI shell from bug #20232, comment #10: wine wintest.exe mcishell open z:\usr\share\sounds\ekiga\newmessage.wav alias nm open z:\usr\share\sounds\ekiga\ring.wav alias ri set nm output 1 set ri output 1 play ri from 0 notify This will use "plughw:0" instead of "default" on ALSA. Now copy&paste these 2 lines at once: play nm from 0 play ri from 0 wait
The first sound will play while the second one gets: err:winmm:WINMM_OpenDevice Activate failed: 80004005 mci.c:1326: Test failed: mci play ri from 0 wait error: 265(9 MCIERR_DEVICE_OPEN)
Everything seems normal until you try and exit the shell with ^Z or ^D. mci.c:1332: GetLastError: 1 mcishell: 12 tests executed (0 marked as todo, 1 failure), 0 skipped.
But the program does not exit. Hitting ^C leads to: fixme:console:CONSOLE_DefaultHandler Terminating process 8 on event 0 err:ntdll:RtlpWaitForCriticalSection section 0x7efec8e4 "loader.c: loader_section" wait timed out in thread 002a, blocked by 0009, retrying (60 sec) err:ntdll:RtlpWaitForCriticalSection section 0x7eecc1c0 "console.c: CONSOLE_CritSect" wait timed out in thread 002b, blocked by 002a, retrying (60 sec) ... Process of pid=0008 has terminated No process loaded, cannot execute 'echo Modules:' Cannot get info on module while no process is loaded No process loaded, cannot execute 'echo Threads:'
Bug #28042 too is about loader.c deadlocks. But here it's at exit, not DllMain start.
Note that for the bug to trigger it seems essential to "play ri from 0 notify" once successfully.
http://bugs.winehq.org/show_bug.cgi?id=29035
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source
--- Comment #1 from Jörg Höhle hoehle@users.sourceforge.net 2011-11-09 00:56:33 CST ---
Everything seems normal
Not at all. Add: status nm mode mci.c:1323: command: status nm mode mci.c:1328: Response: playing Audio played to the end, yet the MCI didn't notice. It should report "stopped". Needless to say, playing nm without ri works correctly. Now add:
stop nm and the shell hangs. That's why winmm hangs at exit: mciClose(ALL) hangs.
Somehow attempting to play "ri" broke "nm" even though all audio seemed to play correctly.
http://bugs.winehq.org/show_bug.cgi?id=29035
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|winmm deadlock at exit |winmm deadlock at program's | |exit
--- Comment #2 from Dmitry Timoshkov dmitry@baikal.ru 2011-11-09 03:13:09 CST --- What programs is that? Regression test?
http://bugs.winehq.org/show_bug.cgi?id=29035
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|winmm deadlock at program's |winmm deadlock at program's |exit |exit as player hangs
--- Comment #3 from Jörg Höhle hoehle@users.sourceforge.net 2011-11-09 12:48:54 CST --- The programs and the sounds don't matter, choose any .wav from your HD, program source is in bug #20232, comment #9. I'm sorry I'm too busy for regression testing. 1.3.24 worked, so we have the usual suspects.
I just noticed when using a long .wav for the nm alias that its sound is interrupted as the second .wav starts, as if the player hangs. It ought not to be disturbed.
http://bugs.winehq.org/show_bug.cgi?id=29035
--- Comment #4 from Jörg Höhle hoehle@users.sourceforge.net 2011-11-18 03:50:32 CST ---
sound is interrupted as the second .wav starts, as if the player hangs
The logs show that mmdevapi continues playing for a little time, then hits an underrun because for unknown reasons the mciwave player ceases to submit further wave headers, as if SetEvent failed in WAVE_mciPlayCallback.
http://bugs.winehq.org/show_bug.cgi?id=29035
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.4.0 Summary|winmm deadlock at program's |winmm player deadlocks |exit as player hangs |after failing to launch a | |concurrent one
http://bugs.winehq.org/show_bug.cgi?id=29035
pete vazz28@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |vazz28@yahoo.com
http://bugs.winehq.org/show_bug.cgi?id=29035
--- Comment #5 from pete vazz28@yahoo.com 2012-01-26 14:21:52 CST --- Created attachment 38562 --> http://bugs.winehq.org/attachment.cgi?id=38562 SETUP.EXE
http://bugs.winehq.org/show_bug.cgi?id=29035
--- Comment #6 from Austin English austinenglish@gmail.com 2012-01-26 14:46:45 CST --- The content of attachment 38562 has been deleted by Austin English austinenglish@gmail.com who provided the following reason:
copyrighted file
The token used to delete this attachment was generated at 2012-01-26 14:46:33 CST.
http://bugs.winehq.org/show_bug.cgi?id=29035
--- Comment #7 from Jörg Höhle hoehle@users.sourceforge.net 2012-02-09 07:42:44 CST --- still present in wine-1.4-rc2
http://bugs.winehq.org/show_bug.cgi?id=29035
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC|vazz28@yahoo.com | Resolution| |FIXED
--- Comment #8 from Jörg Höhle hoehle@users.sourceforge.net 2012-02-17 12:14:20 CST --- Fixed by commit 197607db2e06f28b666da9ce88b69c9994c1bb65
http://bugs.winehq.org/show_bug.cgi?id=29035
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |197607db2e06f28b666da9ce88b | |69c9994c1bb65
http://bugs.winehq.org/show_bug.cgi?id=29035
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2012-02-17 13:51:20 CST --- Closing bugs fixed in 1.4-rc4.