[mythtv-commits] Ticket #9548: pulseaudio output memory leaks
MythTV
noreply at mythtv.org
Sat Feb 5 08:48:48 UTC 2011
#9548: pulseaudio output memory leaks
---------------------------------------+----------------------------------
Reporter: b-mythtv@… | Type: Patch - Bug Fix
Status: new | Priority: minor
Milestone: unknown | Component: MythTV - General
Version: 0.24-fixes | Severity: medium
Keywords: pulseaudio | Ticket locked: 0
---------------------------------------+----------------------------------
The pulseaudio output of myth doesn't seem to clean up properly. Each
stream consumes ~64MB of virtual address space due to shm segments with
pulseaudio. After creating several streams, a 32-bit process is quickly
exhausted of virtual address space, and a strings of these errors come
from mythfrontend as further pa_context_new() calls fail.
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
mmap() failed: Cannot allocate memory
...
2011-02-04 09:38:11.185 PulseAudio Error: ContextConnect, failed to
acquire new context
You can also observe the issue by looking at mythfrontend.real's VSS size
after opening and closing a stream. With this bug, it increases by 64MB
each time a new stream is created (either live tv, or viewing a video).
It seems that the pa_contexts are not being freed in audiooutputpulse.cpp.
The attached patch unref's them at various points, and fixes the memory
leaks for me (VSS no longer creeps up, and the mmap() problems are gone).
I can't claim to understand the code well enough to know if this is
correct though.
--
Ticket URL: <http://code.mythtv.org/trac/ticket/9548>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list