[mythtv-commits] Ticket #7132: Deadlock in MpegRecorder::StopRecording() with HD-PVR
MythTV
mythtv at cvs.mythtv.org
Wed Sep 23 04:38:21 UTC 2009
#7132: Deadlock in MpegRecorder::StopRecording() with HD-PVR
------------------------------------+---------------------------------------
Reporter: jst-myth at jstenback.com | Owner: danielk
Type: defect | Status: new
Priority: major | Milestone: unknown
Component: MythTV - Recording | Version: unknown
Severity: high | Mlocked: 0
------------------------------------+---------------------------------------
I've been seeing an occasional deadlock (anywhere from several times per
day to every few days) in MpegRecorder::StopRecording() that leaves the
backend unable to record any more shows, or unable to serve content,
answer to mythweb, etc. I've tracked it down to a deadlock that happens
when StartEncoding() fails, when called from
MpegRecorder::StartRecording(). In my particular case I'm using an HD-PVR
and it seems to occasionally fail to start recording (why is still
unclear, beyond that an ioctl() call failing), and when that happens,
MpegRecorder::StopRecording() gets stuck waiting on a conditional variable
that's never notified on. The problem seems to be that the recording has
already ended, but the "encoding" member was never unset, so
MpegRecorder::StopRecording() waits for a notification that's supposed to
be sent when we're done recording etc. While I was looking through this
code I also found a memory leak (and another instance of this same
deadlock AFAICT) in MpegRecorder::StartRecording(), which I also fixed.
Please see attached patch.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7132>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list