[mythtv-commits] Ticket #11529: MpegRecorder as used by HDPVR looses memory leading to OOM
MythTV
noreply at mythtv.org
Mon May 6 19:40:58 UTC 2013
#11529: MpegRecorder as used by HDPVR looses memory leading to OOM
------------------------------------------+------------------------
Reporter: david.osguthorpe@… | Owner: danielk
Type: Bug Report - Memory Leak | Status: new
Priority: major | Milestone: unknown
Component: MythTV - Recording | Version: 0.26-fixes
Severity: high | Keywords:
Ticket locked: 0 |
------------------------------------------+------------------------
Symptom: My system (Ubuntu 12.10, Myth 0.26 latest fixes update) using
HDPVR the mythbackend uses more memory over time eventually (3-4 weeks)
leading to OOM issues - this has been happening for quite a few months
Just did some logging with valgrind which shows possibly lost 135M in 4
blocks from DeviceReadBuffer::Setup over 1-2 days
Adding extra logging statements to DeviceReadBuffer.cpp and
mpegrecorder.cpp gives the following analysis:
MpegRecorder::OpenV4L2DeviceAsInput allocates the _device_read_buffer but
the MpegRecorder code suggests it is not deallocated on MpegRecorder
object deletion - the _device_read_buffer only appears to be deleted on
re-calling OpenV4L2DeviceAsInput (logging DeviceReadBuffer object deletion
also suggests it is never called)
Logging MpegRecorder object creation and deletion shows a new MpegRecorder
object is created for each recording - if this is true then
OpenV4L2DeviceAsInput will always be called with _device_read_buffer NULL
and a new _device_read_buffer will be created which is never deleted
Not sure what is correct fix - currently trying adding the
_device_read_buffer delete code at beginning of OpenV4L2DeviceAsInput of
MpegRecorder to the TearDownAll function
This seems to work (the DeviceReadBuffer object is now deleted after
recording) but may not be consistent with the design goals of MpegRecorder
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11529>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list