[Linux] RobbieThe1st Nov 25, 2012 @ 6:05pm
[Issue Report] TF2+Steam crashes due to audio issue
I've got an interesting issue: After a few minutes of running, TF2 will semi-randomly crash. It will only crash if I'm talking to my teammates through Steam voice chat. It won't /always/ crash when I talk, just randomly, and I haven't had it crash when I was /not/ talking.
Based on what I've seen, it's an issue of too many sounds being played at once or something, because it seems to happen when there's more than a couple of sounds being played at a time.
Here's my steam run-log from the last time this happened(last time I ran TF2):
http://pastebin.com/qvgiWfvG

Now, I'm not really a developer or anything, but it looks to me like the issue is here:
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
Assertion 'b' failed at pulsecore/memblock.c:454, function pa_memblock_acquire(). Aborting.
Looks like Pulse tried to allocate a chunk of ram for which there isn't space, and the allocation failed.
I've got 4GB of physical ram, however, and it never went over around 3.6GB used, and I've also got 23G of swap space available, so I'm pretty sure my system's not running into any limitations.
However, Steam is a 32-bit process, and should only be able to access at most 4GB of space(in theory). While googling about this, I ran into this post:
http://unix.stackexchange.com/questions/46201/mmap-failed-cannot-allocate-memory-how-do-i-find-out-whos-complaining
This answer is awesome of course. I should report though that in my case it was a simple case of Thundebird hitting 2.7G VIRT barrier on x86. Time to take pain pills and start converting to amd64. – lkraav Aug 29 at 12:36
If Ikraav is to believed, there's a 2.7GB limit on allocaton for 32-bit processes, which would explain why Steam doesn't seem to take up more than that.

I'm thinking it's a matter of TF2 maxing out the possible space with cache files, and when it does, Pulse doesn't have any room to allocate buffers.

Note also that I've tried a couple of different versions of Pulse, which didn't make a bit of difference.

Do note also that when TF2 works, it's worked extremely well - 60fps V-synced consistantly, good quality audio and I've had no issues with my microphone working.

I hope that this report can help you guys.

Thanks,

-RobbieThe1st
Showing 1-7 of 7 comments
< >
Reisen Udongein Inaba [因幡] Nov 26, 2012 @ 12:50am 
23G of swap space available
That is extremely unnecessary (I recommend a 4 gb SWAP) and won't help at all, since SWAP is for inactive data (more on SWAP here).
Beyond that, I don't know what the problem could be.
Last edited by Reisen Udongein Inaba [因幡]; Nov 26, 2012 @ 12:52am
[Linux] RobbieThe1st Nov 26, 2012 @ 4:36pm 
Yes-maby-no.
Thing is, as far as an application is concerned, it gets a virtual memory space it can use to store data in, which has no relation(as far as it's concerned) to the physical space it resides in.
The OS then translates that virtual memory space to some physical location, either in real memory or in swap space - when the application tries to read a chunk, the OS then finds it and reads it. If the needed bit is in swap, it takes a significant amount of time to read it, which basically freezes the program in question until it's been read.

Now, the OS can shift data between RAM and Swap as it chooses, and there are a few settings on how aggressive you want it to be on swapping data out(and caching) - if you have very little RAM, the OS can be swapping out actively used chunks, to the detriment of performance.

In my case, however, I have 4GB of ram, which typically means I have plenty to spare, so almost none of my swap is getting used(Never seen it over 512MB or so).
However, there is a good reason I have what I have: Swap space has another function - It's used when you hibernate a system(copy the contents of ram to disk and shut the system off).
I have three identical harddisks which I've setup several partitions on, those partitions being RAID-5'd together for extra read speed and reliability. When I set those up, I wanted to make sure I could hibernate, and expected to install 8GB of ram in my machine. Not knowing whether Linux could hibernate to multiple swap partitions or whether it had to be contiguous, I went with 8GB per disk(so the partition tables were the same), and ended up with a whole mass of unused swap. But it doesn't hurt anything, so I'm disinclined to mess with it.

[Linux] RobbieThe1st Dec 1, 2012 @ 9:03pm 
So, after the latest update it looks like the problem is improved, but still there somewhat. It's crashed a couple of times on me today, with the same message:
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
Assertion 'b' failed at pulsecore/memblock.c:454, function pa_memblock_acquire(). Aborting.
Can someone take a look at this?
Jengajam2 Dec 22, 2012 @ 4:40pm 
I am also encountering this exact same problem.
It is still ocurring and is truly a game breaking scenario.
[F2P]Wilde Wuchstkönigin Dec 26, 2012 @ 5:41am 
I can confirm this issue here, same problem. I tried a pulseaudio 1.x (Fedora 17 x86_64) and a pulseaudio 2.x (Fedora 18 x86_64) and the problem still exists. Sometimes it crashes the game immediately after starting and using voice chat, sometimes it crashes the game after an hour of playing tf2 - but it always happens.

My Machine:

F18 x86_64, 16GB Ram, i7-2600k.

Rest of the game works wunderful!

Crash log:

mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
Assertion 'b' failed at pulsecore/memblock.c:454, function pa_memblock_acquire(). Aborting.
Uploading dump (in-process) [proxy '']
/tmp/dumps/crash_20121226141948_1.dmp
success = yes
response: CrashID=bp-a9e22dd5-1ed2-4abc-a6e4-458e72121226
pipes.cpp (659) : Assertion Failed: bRet
Assert( Assertion Failed: bRet ):/home/buildbot/buildslave_steam/steam_rel_client_ubuntu12_linux/build/src/clientdll/../common/pipes.cpp:659

Installing breakpad exception handler for appid(hl2_linux)/version(1.0_client)
/home/becker/.local/share/Steam/steam.sh: line 287: 3089 Aborted (core dumped) $DEBUGGER "$STEAMROOT/$PLATFORM/$STEAMEXE" "$@"
... more output stuff of the crashed game (aftereffect)-
Last edited by [F2P]Wilde Wuchstkönigin; Dec 26, 2012 @ 5:42am
The Triggerhappy Innocent Dec 26, 2012 @ 8:49am 
I have a similar problem, only my game doesn't crash at all. I start playing everything works perfectly as it should then after 10-15 minutes my microphone stops working. If I alt+tab out of the game under system sound settings Input is still detected, but under steam there is no Audio device for input.
Barnex Aug 7, 2013 @ 8:03pm 
I am also facing this problem, I'm using ubuntu 11.10. It used to crash the game and I'd have to kill X. Now it only crashes steam and I get kicked out of the game after a while (because most servers require steam connection).
Showing 1-7 of 7 comments
< >
Per page: 15 30 50
Date Posted: Nov 25, 2012 @ 6:05pm
Posts: 7