wine crashes in Source games since jaunty

Bug #367379 reported by Jorenko
44
This bug affects 5 people
Affects Status Importance Assigned to Milestone
PulseAudio
Fix Released
Undecided
Unassigned
pulseaudio (Ubuntu)
Fix Released
Undecided
Unassigned
wine (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: wine

Ever since upgrading to jaunty, wine has been crashing randomly in both Team Fortress 2 and Left 4 Dead. It happens at least once every ten minutes, but usually more often.

It has happened under both 1.1.19 and 1.1.20, though the exact behavior of the crash has changed a little in 1.1.20.

Under 1.1.19, the whole game would just go away immediately, and I'd get a lengthly backtrace printed out on the console. Since upgrading to 1.1.20, it just halts the game, and tries to show a popup advising me of the crash. The console debug output is much more terse, but it refers to some of the same things (pulsecore/memblock.c: pa_memblock_acquire() seems to be where the crash happens every time).

Attached is some debug logs from some various crashes in left 4 dead.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: wine 1.1.20~winehq0~ubuntu~9.04-0ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: wine
Uname: Linux 2.6.28-11-generic x86_64
UnreportableReason: This is not a genuine Ubuntu package

Revision history for this message
Jorenko (jorenko) wrote :
Revision history for this message
Jorenko (jorenko) wrote :

I've now seen this on the official 1.0.1 ubuntu version of wine as well:

jorenko@pyke:~$ aptitude show wine
Package: wine
State: installed
Automatically installed: no
Version: 1.0.1-0ubuntu6

The debug log is attached.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote : Re: [Bug 367379] Re: wine crashes in Source games since jaunty

Hello,

Please try to use ALSA instead of PulseAudio, and check in winecfg that your
sound is set to ALSA.

Revision history for this message
Jorenko (jorenko) wrote :

But in jaunty, pulseaudio seems to be inseparable from the gnome session, and whenever I kill it it restarts itself.

Running steam with pasuspender seems to eliminate the crashing, but that's a less than pretty crappy solution considering steam's designed to stay running in the background all of the time.

Revision history for this message
Susan Cragin (susancragin) wrote :

I don't use Steam but do use an audio program in wine that started crashing lately, and want to find out if you have the same problem I do.
What exactly are you doing when steam crashes? Are you using the microphone function?
If you are using the microphone, do you leave it on all the time, or is it activated with a hotkey?
Try installing Audacity for Windows, and record yourself talking. See if that crashes when you start, stop, then re-start the record function.

Revision history for this message
Jorenko (jorenko) wrote :

Well, I appear to have spoken too soon about pasuspender. Attached is a familiar looking debug log for running with `pasuspender env WINEDEBUG="-all" WINEPREFIX="/home/jorenko/.wine" wine "C:\Program Files\Steam\Steam.exe" &> pasuspender.wine101.steam.log`.

Steve, do you have any other suggestions for how to disable pulseaudio and run on just alsa under jaunty?

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

What about System > Preferences > Sound and check ALSA everywhere, and
reopen session ? Obviously PA shouldn't launch itself if you chose GNOME to
use ALSA. And if PA still launches, then a bug should be reported against
PA/ubuntu-desktop too :)

Cordially, SD.

Changed in wine (Ubuntu):
status: New → Confirmed
Revision history for this message
Susan Cragin (susancragin) wrote :

I have been unable to get audio applications working properly (in wine and elsewhere) either with pasuspender or with pulseaudio purged.
Check to see if it's wine that's involved at all.
For instance, I purged pulseaudio and now linux's audacity does not work properly.
I filed bug 369762 and then saw this. It might be the same problem.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Susan, does your wine works with winecfg's audio tab set to 'ALSA' and gnome-sound-properties set to 'ALSA' aswell ? For audacity / mplayer / totem / exaile issues, it might aswell be because you have to explicitely tell the apps to use ALSA (usually they have such settings options in their preferences menu).

Revision history for this message
Susan Cragin (susancragin) wrote :

No. Neither of these things work.
I have tried setting gnome-sound-properties to alsa instead of autodetect.
I have also tried selecting the alsa option that matches my current sound card.
It crashes just as if I leave it on autodetect.

My winecfg is set to ALSA.

This problem is new, as of about 2 weeks ago.
I have been running audacity in linux, and audacity and dragon naturallyspeaking in wine, for many months now without a problem, until then.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

I'm redirecting this to Pulseaudio then.

Revision history for this message
Jorenko (jorenko) wrote :

With ALSA chosen explicitly for all sound categories (and after rebooting just to be sure everything was reinitialized), pulseaudio still runs, still restarts itself if killed, and still causes this bug.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Then change the autospawn.

In /etc/pulse/client.conf, change autospawn = yes to autospawn = no, then
killall pulseaudio. When you have exited wine, just issue
start-pulseaudio-x11.

On Apr 30, 2009 9:40 PM, "Jorenko" <email address hidden> wrote:

With ALSA chosen explicitly for all sound categories (and after
rebooting just to be sure everything was reinitialized), pulseaudio
still runs, still restarts itself if killed, and still causes this bug.

-- wine crashes in Source games since jaunty
https://bugs.launchpad.net/bugs/367379 You received t...

Revision history for this message
Jorenko (jorenko) wrote :

Turning off autospawn indeed made pulseaudio behave as desired, and stay away, thank you.

I've yet to have the crash again since then... BUT, I do just plain lose sound at about the same interval that I was having the crash. So my theory now is that it's the same bug, and pulse reacts by crashing the game as well as itself, but ALSA just dies quietly.

The debug output is much quieter now... I just get a bunch of each of these lines:

Corrupt JPEG data: 57 extraneous bytes before marker 0xdb
warning: Unknown nb_ctl request: 4

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

This is indeed a much more lovely bug. What GPU do you have ? Also, did you activate your GPU drivers ?

Revision history for this message
Karthanis (antoine-karthanis) wrote :

Hi,

I'm witnessing the same symptoms as described by Jorenko in 64bits Ubuntu 9.04 & Wine 1.1.20.
Source games crash at pulsecore/memblock.c: pa_memblock_acquire() anywhere between 5 to 15 minutes of gameplay, and disabling PA prevents the games from crashing, but I lose sound either way.

Just to provide information requested from Jorenko by Steve, my GPU is an Nvidia GTX 285 w/ proprietary drivers installed through the Ubuntu GUI designed for that purpose.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

This is then much less lovely, as I only found traces of such problem with outdated drivers (basically, Nvidia GeForce 5xxx and ATi cards).

Does anyone here have the time for a regression testing ? http://wiki.winehq.org/RegressionTesting

Though, if you don't have the time for a whole test, running the same app in a clean wine prefix with wine 1.1.18, for instance, could already be helpful, since the bug has been reported the first time under 1.1.19.

Thanks everyone for taking the time to help tracking this bug down.

Revision history for this message
Jorenko (jorenko) wrote :

To answer your first two questions, Steve:

jorenko@pyke:~$ lspci |grep -i geforce
05:00.0 VGA compatible controller: nVidia Corporation GeForce 8600 GTS (rev a1)
jorenko@pyke:~$ aptitude show nvidia-glx-180
Package: nvidia-glx-180
New: yes
State: installed
Automatically installed: no
Version: 180.44-0ubuntu1
jorenko@pyke:~$ grep Driver /etc/X11/xorg.conf
 Driver "nvidia"

I might be able to find time to run some regression tests for you in the next week or so. As for 1.1.18, do you think the one in Wine's .deb archive for jaunty would be sufficient for our purposes? In any case, I'll give that a try next time I play.

Revision history for this message
Jorenko (jorenko) wrote :

Well, wine 1.1.18 had the same problem with both my current and a new, clean prefix.

Revision history for this message
Karthanis (antoine-karthanis) wrote :

Same symptoms with Wine 1.1.18, clean prefix and fresh Steam install.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Alright, I think someone should really run a full regression test here, in
order to find when it began going wrong. I can't do it myself since i don't
have any steam games :/

Revision history for this message
Jorenko (jorenko) wrote :

Well, the weird thing is, the last time I didn't have this bug was on 1.1.19. But, on intrepid. The problem started the very first time I tried it on jaunty.

Maybe I should try the intrepid 1.1.19 build on jaunty? How would I do that?

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Well, does it crash with Steam demos too ? I got an Intrepid PC so *at
worse* i can try with a steam game demo (its internet bandwidth is horribly
slow though, it'll take me ages to download steam and a demo).

Revision history for this message
Jorenko (jorenko) wrote :

I don't think there's a demo for any for the source games right now. Occasionally they'll have a free weekend for TF2 or L4D, but there's nothing going on right now that I know of.

Revision history for this message
Scott Ritchie (scottritchie) wrote :

You can intest the Interepid Wine packages by just downloading and installing them manually from here: http://wine.budgetdedicated.com/archive/index.html

However they're very similar to the Jaunty ones so you'll probably see the exact same problem.

Revision history for this message
Jorenko (jorenko) wrote :

Yeah, no change with the intrepid 1.1.19 package. Could it be one of the supporting libraries?

Revision history for this message
Jack (jacksaffen) wrote :

Similar behaviour in Civ4 Beyond the Sword that began with upgrade to jaunty.
Not a steam version.
64bit, wine 1.1.20

E: shm.c: mmap() failed: Cannot allocate memory
E: memblock.c: Assertion 'b' failed at pulsecore/memblock.c:438, function pa_memblock_acquire(). Aborting.
wine: Assertion failed at address 0xf7feb430 (thread 0041),starting debugger...

Revision history for this message
Jorenko (jorenko) wrote :

So I'm willing to do a regression test, but I can't find a version of wine that works as a starting point. Even the 'stable' 1.0.1 has the bug. Any suggestions?

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Hi,

If even 1.0.1 has the bug, don't bother, it comes from a lib updated in
jaunty. ;)

Revision history for this message
Jorenko (jorenko) wrote :

As I suspected. Any suggestions as to which libs I should try rolling back?

Revision history for this message
Scott Ritchie (scottritchie) wrote :

This is definitely a pulseaudio issue.

Some discussion in Wine IRC channel:

(01:02:53 AM) stringfellow_: just a wild guess, but mmap() failing could be bug 13335, maybe the patches there help
(01:02:54 AM) buggbot: Bug http://bugs.winehq.org/show_bug.cgi?id=13335 major, P2, 1.2.0, <email address hidden>, REOPENED, Wine virtual memory exhaustion causing OpenGL crashes / slowdowns
(01:11:32 AM) oiaohm_: mmap failure is normally exhaustion of memory. PA does increase the risk of it also shm.c is in pulseaudio not wine. Wine is catching external error messages wine going splat on itself is normally different. I would be checking if PA is hitting ulimit. 64 system running wine there are still some known leaks like 13335.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Jorenko (jorenko) wrote :

Yes, but with pulseaudio disabled I see the game not crashing, but just losing sound, at pretty much the exact same interval. This makes me think it's a general sound-related bug, and that pulse's interaction with the bug is to crash, while ALSA's is to just stop all sound processing. See my previous comment:

https://bugs.launchpad.net/ubuntu/+source/wine/+bug/367379/comments/14

Revision history for this message
Daniel T Chen (crimsun) wrote :

How is Wine's OSS backend these days? Have you tried just using ALSA's OSS emulation?

Revision history for this message
Susan Cragin (susancragin) wrote :

I have tried OSS backend with Dragon NaturallySpeaking 10 running on wine. OSS works, but the sound quality is considerably poorer than ALSA. On DNS's internal test, my accuracy score drops from 29 to 23 (with everything else remaining the same). Subjectively, my recognition rate is way down.
I cannot adjust the volume with OSS, which is a separate problem; however, I happen to know that the volume setting I do use is near optimal. So ability to set volume does not cause my program's poorer performance.

Revision history for this message
Annika (annika-kremer) wrote :

I tried using OSS in wine and still got the same crash. So it doesn't appear to help. Jaunty 64 Bit, Realtek Soundcard recognized as "Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller" by the system, Wine 1.1.19, got the bug playing Counterstrike Source (well, not really playing since it always crashes within less than a minute).

Revision history for this message
Susan Cragin (susancragin) wrote :

My comment above was misleading, since it implies that with OSS my program does not crash at all, and that is not true.
With ALSA, the program freezes quickly.
With OSS the program crashes after about 10-13 minutes.
I am sorry for the confusion.

Revision history for this message
Thelamer (ryankuba) wrote :

I can confirm this bug with pulseaudio.

I am running jaunty and wine 1.1.19.

I tried disabling autospawn pulseaudio and going with alsa only. This works but the game lags ever 10-15 seconds when a lot of sound is going on. Not really a solution in my mind.

Revision history for this message
e64462 (nhdaimyo) wrote :

I'm having this exact problem... pretty much as soon as I connect to a server the game crashes.

I'm trying to play Counter-Strike. I'm using Jaunty. The seemingly relevant error message in my terminal is:

E: shm.c: mmap() failed: Cannot allocate memory
E: shm.c: mmap() failed: Cannot allocate memory
E: memblock.c: Assertion 'b' failed at pulsecore/memblock.c:438, function pa_memblock_acquire(). Aborting.
wine: Assertion failed at address 0xb8054430 (thread 0049), starting debugger...
Unhandled exception: assertion failed in 32-bit code (0xb8054430).

which is neat... I've also tried killing pulseaudio, and seting everything to alsa... and like everyone else, it still crashes.

If I can provide any other information, let me know.

Revision history for this message
ubuntnoob (nick-witzke) wrote :

Anyone have a lead on this? I've been seaching through wineforums, ubuntuforums etc, and this is by far the most helpful - got CS:Source to actually play, but as noted above by thelamer , sound cuts in and out (mostly out) and is real laggy,

I set autoscan to off, and thats what got CS actually running, winecfg, regedit-soundstuff, system/sound/devices all set to alsa.

wine version 1.0.1
ubuntu 9.04 x64

pretty new to linux, so if there's more information that's helpful, just let me know.

Revision history for this message
Jorenko (jorenko) wrote :

ubuntnoob: I've had much more success recently with disabling pulseaudio:

1. Edit /etc/pulse/client.conf and set "autospawn = no"
2. pulseaudio -k
3. start your game

Works like charm for the last few weeks.

As for speed, you may get better performance on the latest (beta) builds directly from wine themselves. Follow the instructions on their site to try it out: http://www.winehq.org/download/deb

Revision history for this message
ubuntnoob (nick-witzke) wrote :

Jorenko,
when i said "autoscan to off" i ment to say 'autospawn = no', but i'm special, and got the word wrong.
But, i checked out the link, and updated wine in synaptic, also it downloaded wine-gecko, which after reading the description, i think i can get rid of that.

Anyways, works like a charm, thanks for the tip.

wine v1.1.24

Revision history for this message
Daniel Nelson (packetcollision) wrote :

If you don't want to disable pulseaudio, I found an alternate workaround:

In CIV4 at least, simply editing /etc/pulse/client.conf and setting "disable-shm = yes" instead of "disable-shm = no" eliminates crashing.

then run:
$ killall pulseaudio && start-pulseaudio-x11
or reboot to activate the changes.

Revision history for this message
starslights (starslights) wrote :

Hello,

I run kubuntu karmic 9.10 on x86 64 and most of time wine crash with games, or windows programs, no matter what.

Some time it debug and take time but i don't find the rapport somewhere .

best regards

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:0.9.22~0.9.21+341-g62bf-0ubuntu1

---------------
pulseaudio (1:0.9.22~0.9.21+341-g62bf-0ubuntu1) lucid; urgency=low

  * New snapshot based on stable-queue git branch (testing requested
    specifically by upstream)
    - LP: #164745, #173212, #201391, #204536, #207796, #210016, #221038,
    - LP: #226342, #230408, #236423, #237443, #250059, #269585, #274304,
    - LP: #274577, #275474, #277532, #277566, #277932, #278025, #280534,
    - LP: #283049, #286816, #287036, #292732, #298011, #298301, #300290,
    - LP: #302038, #311497, #311853, #324062, #339448, #344057, #348979,
    - LP: #350829, #356206, #367379, #367544, #369822, #371897, #374846,
    - LP: #375570, #381801, #399515, #402950, #403786, #408169, #409322,
    - LP: #409723, #410326, #410446, #417695, #417976, #419271, #421072,
    - LP: #422774, #423979, #424655, #425028, #427016, #431072, #432660,
    - LP: #437640, #437996, #442191, #443306, #443389, #446719, #449762,
    - LP: #455417, #461532, #464652, #483191, #497537, #503780
  * debian/patches/:
    + add: 0099-change-configure-git-version-tag.patch: Match released
           upstream 0.9.21 for shlibs and LIBPULSE_VERSION_INFO
    - drop: 0004-set-tsched0.patch (no longer relevant)
            0050-revert-pacmd-poll-argv.patch (no longer relevant)
            0056-dont-bail-on-sound-class-modem.patch (merged)
            0056-ignore-sound-class-modem.patch (merged)
            0058-Backport-4c793.patch (merged)
            0059-Backport-978d3.patch (merged)
            0060-fix-implicit-func-decl-cpu-arm.patch (merged)
            0061-Backport-c5fdb.patch (merged)
            0070-dont-bail-on-sound-class-modem-devs.patch (merged)
    + refresh: 0001-change-resample-and-buffering.patch
               0090-disable-flat-volumes.patch
               0091-dont-load-cork-music-on-phone.patch
               0057-load-module-x11-bell.patch
 -- Daniel T Chen <email address hidden> Thu, 14 Jan 2010 20:33:05 -0500

Changed in pulseaudio (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for posting this bug.

Does this issue occur in latest WINE?

Changed in wine (Ubuntu):
status: Confirmed → Incomplete
Changed in pulseaudio:
status: New → Fix Released
Revision history for this message
starslights (starslights) wrote :

Hello,

About Wine, from recent version, it's possible to quit the applications or games who can cause a problems , so now the bugs are fixed and i never has any more crash system caused by wine.

So i close the wine status too.

Best Regards

Stars

Revision history for this message
starslights (starslights) wrote :

Oh sorry, i am not the original reporter, so i can't make invalid my own,

Well, about wine, i play many games actually like Fallout3, Alpha Protocol, Steam or Applications like Utorrent, mkvmerge, winrar, ect and all work fine.

So i recommend to make that bug as fixed, Thanks :D

Revision history for this message
Dan Kegel (dank) wrote :

I'm seeing this now on every other run of Dragon Age Origins with wine from git:

bt_audio_service_open: connect() failed: Connection refused (111)
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
mmap() failed: Cannot allocate memory
Assertion 'b' failed at pulsecore/memblock.c:451, function pa_memblock_acquire(). Aborting.

Revision history for this message
dino99 (9d9) wrote :

this is no more a supported version

Changed in wine (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.