[mythtv-users] [SOVLED] Mythfilldatabase and "Fetch channels from listings source" Hang Silently

Rob Rosenfeld rob+mythtv-users at rosenfeld.to
Sat Sep 9 19:08:05 UTC 2006

Rob Rosenfeld wrote:
> I recently updated my MythTV installation which follows svn head.  Ever
> since this update, mythfilldatabase hangs with out a hint.  The same
> happens from "Fetch channels from listings source" within mythtv-setup.
> Possibly related is that when I try to watch live tv, I get a blank
> screen for a few seconds and fails back to the menu.  What follows is
> the log output from mythfilldatabase and mythfrontend.  There don't seem
> to be any errors in mythbackend's -v all log, so I've excluded it.
> Any ideas how I can get my guide and live tv working again?

On further inspection, I see the following query in SHOW PROCESSLIST 
from MySQL.  I think it's launched by mythbackend immediately upon 
startup.  It never completes.

DELETE FROM program WHERE manualid = -1 OR  (manualid <> 0 AND -1 = -1)

It was locking many other queries and would stay running even if I 
stopped all mythtv processes, so I couldn't run a repair on the database.

To fix it:

1.  Stop all mythtv processes to make sure whatever was issuing the 
query doesn't restart it.
2.  Find the errant query using SHOW PROCESSLIST within mysql and then 
kill it using KILL <id>.
3.  Now the database is unlocked again.  Run the optimize_mythdb.pl 
script from the mythtv contrib directory.  This repairs all the tables, 
which I assume needed to be done.
4.  Try mythfilldatabase it looks good and doesn't hang.

More information about the mythtv-users mailing list