[mythtv] Unresponsive BE

Douglas Paul doug at elemental.ath.cx
Thu Nov 18 18:37:42 UTC 2010


On Wed, Nov 17, 2010 at 12:50:53PM +0100, warpme wrote:
> Issue is really annoying as for user, BE behaves like dead for FE requests (process restart is needed).

I did find another one of these cases when the Frontend disappears
completely while trying to play video. It happens to me when a wifi link to
the frontend disconnects. I just haven't had time to properly put it
together, but if you think it might be happening to you you could try this
patch I put at the bottom.

What would be probably the most useful too is if you can configure your
build with the --compile-type=debug option. Then when the backend freezes,
attach to it with gdb before killing it:

gdb <path to mythbackend> <pid of mythbackend>

And use the command:

thread apply all bt

The complete backtrace will give a lot of information. But, if it's the same
problem I've been seeing, on one of the threads you will likely see
something like this:

#0  0xb786d424 in __kernel_vsyscall ()
#1  0xb418ef95 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb42fc61b in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/qt4/libQtCore.so.4
#3  0xb42f662b in QReadWriteLock::lockForWrite() ()
   from /usr/lib/qt4/libQtCore.so.4
#4  0x080d510a in MainServer::connectionClosed (this=0x8d0af28, 
    socket=0xa8e04ef0) at mainserver.cpp:5436

--- programs/mythbackend/mainserver.cpp	(revision 26923)
+++ programs/mythbackend/mainserver.cpp	(working copy)
@@ -4813,6 +4813,8 @@
     FileTransfer *ft = GetFileTransferByID(recnum);
     if (!ft)
+        sockListLock.unlock();
         if (command == "DONE")
             // if there is an error opening the file, we may not have a
@@ -4828,7 +4830,6 @@
         SendResponse(pbssock, retlist);
-        sockListLock.unlock();

Douglas Paul

More information about the mythtv-dev mailing list