[mythtv-commits] Ticket #5341: Slave backend connecting can cause the master to lock in QMutexLocker
MythTV
mythtv at cvs.mythtv.org
Sat May 10 19:16:13 UTC 2008
#5341: Slave backend connecting can cause the master to lock in QMutexLocker
-----------------------------------------------------+----------------------
Reporter: Mark Buechler <Mark.Buechler at gmail.com> | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: 0.21
Severity: medium | Mlocked: 0
-----------------------------------------------------+----------------------
When a slave backend connects, it's possible for the backend to lock up in
Scheduler::GetNextLiveTVDir() and Scheduler::SlaveConnected() each waiting
for the other to release the QMutex lock on reclist_locker. Backtrace
attached.
I'm not sure the best way to fix this, but I'm testing out the following
in ::SlaveConnected():
{
int lock_tries = 0;
bool is_locked = false;
while (!is_locked && (lock_tries < 5))
{
lock_tries++;
is_locked = reclist_lock->tryLock();
if (!is_locked)
usleep(100);
}
if (!is_locked)
return;
...
reclist_locker->unlock();
}
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/5341>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list