[mythtv-commits] Ticket #11306: 0.26 (MASTER backend) core when (SLAVE backend) disconnects
MythTV
noreply at mythtv.org
Sun Apr 14 10:29:34 UTC 2013
#11306: 0.26 (MASTER backend) core when (SLAVE backend) disconnects
--------------------------------+----------------------------
Reporter: mythtvuser10@… | Owner: danielk
Type: Bug Report - Crash | Status: accepted
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.26-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------
Comment (by tomi.orava@…):
Ok, for some reason I'm now also seeing this bug every single time the
slave backend disconnects. The problem is that there is not much that can
be done with the current design, as the playbacksock and encoderlink
classes don't have real locking at all and the mythsocket callback is a
huge design problem.
The problem case seems to be this:
Whenever the slave is requested to shutdown,
two threads are racing against each other:
{{{
Scheduler::run
--> Scheduler::HandleIdleShutdown
--> EncoderLink::IsBusy
--> PlaybackSock::IsBusy
--> PlaybackSock::SendReceiveStringList
--> MythSocket::Lock
---> deadlock!
Slave Connection is closed:
--> MythSocketThread::run
--> MythSocketThread::ReadyToBeRead
--> MythSocket::close
--> MainServer::connectionClosed
--> EncoderLink::SetSocket
--> QMutexLocker::QMutexLocker
---> deadlock!
}}}
I've done a truly horrible hack around the problem,
but I've yet to figure out any reasonable workaround,
as the locking in each of these classes is not consistent.
The patch has been working for me since yesterday, though.
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11306#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list