[mythtv-users] no scheduling data in UI following db restore

Richard Morton richard.e.morton at gmail.com
Mon Mar 28 22:51:33 UTC 2011


Hi,

I did a silly thing and knocked my MBE the other day, next thing I
know mythbackend was playing up.

starting mythbackend on the console indicated it couldnt get any
program queries to work.

mysql indicated there was an issue with the program table

myisamcheck wouldnt fix it

I dropped and restored the database from a 2 day old backup; restored
on Sunday morning - after realising the F1 hadnt recorded :-(

F1 recorded at 13:00 that day, but I can watch live TV... all tuners work

other stuff that happened: last night mounted a new 2tb drive,
partitioned it with cfdisk, formatted it with mkfs.ext4 and then
started a a large file copy onto a spare hdd; completely filled a 2TB
drive, at which point it errored on each file and finally ended. I
umounted the drive and took it to my off-site storage location.

this evening ; no scheduling information in the programme guide and no
recordings after 0300.

I have restarted the MBE; run mythfilldatabase; started the backend
from the command line; nothing obvious.

I have rescanned existing transports, and allowed the inserts/updates
and rerun mythfilldatabase

I have turned off active eit scanning on all cards; but turned it back
on once I realised it wasnt that cause the data is in the database.


select count(*) from program where starttime>now() provides 45000+

but still no data in the programme guide / scheduler....

any ideas?



myth at myth-server:~$ mythbackend
2011-03-28 23:47:09.369 mythbackend version:
branches/release-0-23-fixes [26863] www.mythtv.org
2011-03-28 23:47:09.370 Using runtime prefix = /usr
2011-03-28 23:47:09.370 Using configuration directory = /home/myth/.mythtv
2011-03-28 23:47:09.370 Empty LocalHostName.
2011-03-28 23:47:09.370 Using localhost value of myth-server
2011-03-28 23:47:09.378 New DB connection, total: 1
2011-03-28 23:47:09.381 Connected to database 'mythconverg' at host: localhost
2011-03-28 23:47:09.382 Closing DB connection named 'DBManager0'
2011-03-28 23:47:09.382 Connected to database 'mythconverg' at host: localhost
2011-03-28 23:47:09.384 Current MythTV Schema Version (DBSchemaVer): 1254
2011-03-28 23:47:09.385 MythBackend: Starting up as the master server.
2011-03-28 23:47:09.393 New DB connection, total: 2
2011-03-28 23:47:09.393 Connected to database 'mythconverg' at host: localhost
2011-03-28 23:47:09.393 New DB connection, total: 3
2011-03-28 23:47:09.393 Connected to database 'mythconverg' at host: localhost
2011-03-28 23:47:09.567 New DB connection, total: 4
2011-03-28 23:47:09.568 Connected to database 'mythconverg' at host: localhost
2011-03-28 23:47:13.547 DVBChan(6:/dev/dvb/adapter0/frontend0)
Warning: Your frequency setting (11642000) is out of range.
(min/max:950000/2150000)
2011-03-28 23:47:13.602 New DB scheduler connection
2011-03-28 23:47:13.603 Connected to database 'mythconverg' at host: localhost
2011-03-28 23:47:13.605 Error preparing query: UPDATE oldrecorded SET
recstatus = :RSABORTED   WHERE recstatus = :RSRECORDING
2011-03-28 23:47:13.606 Driver error was [2/144]:
QMYSQL3: Unable to prepare statement
Database error was:
Table './mythconverg/oldrecorded' is marked as crashed and last
(automatic?) repair failed

2011-03-28 23:47:13.606 DB Error (UpdateAborted):
Query was:
UPDATE oldrecorded SET recstatus = :RSABORTED   WHERE recstatus = :RSRECORDING
Bindings were:
:RSABORTED=-4, :RSRECORDING=-2
Driver error was [2/1064]:
QMYSQL: Unable to execute query
Database error was:
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near ':RSABORTED   WHERE recstatus = :RSRECORDING' at line 1

2011-03-28 23:47:13.613 Enabling Upnpmedia rebuild thread.
2011-03-28 23:47:14.815 Main::Registering HttpStatus Extension
2011-03-28 23:47:14.815 Enabled verbose msgs:  important general
2011-03-28 23:47:14.816 AutoExpire: CalcParams(): Max required Free
Space: 40.0 GB w/freq: 15 min
2011-03-28 23:47:16.606 Reschedule requested for id -1.
2011-03-28 23:47:16.608 Invalid search key in recordid 12
2011-03-28 23:47:16.608 Invalid search key in recordid 455
2011-03-28 23:47:18.191 MainServer::ANN Monitor
2011-03-28 23:47:18.191 adding: myth-server as a client (events: 0)
2011-03-28 23:47:18.191 MainServer::ANN Monitor
2011-03-28 23:47:18.191 adding: myth-server as a client (events: 1)
2011-03-28 23:47:19.262 MainServer::ANN Monitor
2011-03-28 23:47:19.263 adding: myth-bedroom as a client (events: 0)
2011-03-28 23:47:19.263 MainServer::ANN Monitor
2011-03-28 23:47:19.263 adding: myth-bedroom as a client (events: 1)
2011-03-28 23:47:19.962 Error preparing query: UPDATE recordmatch
INNER JOIN sched_temp_record ON (recordmatch.recordid =
sched_temp_record.recordid)  INNER JOIN program ON (recordmatch.chanid
= program.chanid AND                         recordmatch.starttime =
program.starttime AND                         recordmatch.manualid =
program.manualid)  LEFT JOIN oldrecorded ON   (
sched_temp_record.dupmethod > 1 AND     oldrecorded.duplicate <> 0 AND
    program.title = oldrecorded.title      AND      (
(program.programid <> '' AND program.generic = 0        AND
program.programid = oldrecorded.programid)       OR
(oldrecorded.findid <> 0 AND         oldrecorded.findid = (CASE
sched_temp_record.type   WHEN 6    THEN sched_temp_record.findid
WHEN 9    THEN to_days(date_sub(program.starttime, interval
     time_format(sched_temp_record.findtime, '%H:%i') hour_minute))
WHEN 10    THEN floor((to_days(date_sub(program.starttime, interval
            time_format(sched_temp_record.findtime, '%H:%i')
hour_minute)) -                sched_temp_record.findday)/7) * 7 +
sched_temp_record.findday   WHEN 7    THEN sched_temp_record.findid
ELSE 0  END) )       OR       (        program.generic = 0        AND
      (program.programid = '' OR oldrecorded.programid = '')
AND        (((sched_temp_record.dupmethod & 0x02) = 0) OR
(program.subtitle <> ''           AND program.subtitle =
oldrecorded.subtitle))        AND
(((sched_temp_record.dupmethod & 0x04) = 0) OR (program.description <>
''           AND program.description = oldrecorded.description))
 AND        (((sched_temp_record.dupmethod & 0x08) = 0) OR
(program.subtitle <> ''           AND program.subtitle =
oldrecorded.subtitle) OR (program.subtitle = ''            AND
oldrecorded.subtitle = '' AND program.description <> ''           AND
program.description = oldrecorded.description))       )      )   )
LEFT JOIN sched_temp_recorded recorded ON   (
sched_temp_record.dupmethod > 1 AND     recorded.duplicate <> 0 AND
 program.title = recorded.title AND     recorded.recgroup NOT IN
('LiveTV','Deleted')      AND      (       (program.programid <> ''
AND program.generic = 0        AND program.programid =
recorded.programid)       OR       (recorded.findid <> 0 AND
recorded.findid = (CASE sched_temp_record.type   WHEN 6    THEN
sched_temp_record.findid   WHEN 9    THEN
to_days(date_sub(program.starttime, interval
time_format(sched_temp_record.findtime, '%H:%i') hour_minute))   WHEN
10    THEN floor((to_days(date_sub(program.starttime, interval
       time_format(sched_temp_record.findtime, '%H:%i') hour_minute))
-                sched_temp_record.findday)/7) * 7 +
sched_temp_record.findday   WHEN 7    THEN sched_temp_record.findid
ELSE 0  END) )       OR       (        program.generic = 0        AND
      (program.programid = '' OR recorded.programid = '')        AND
     (((sched_temp_record.dupmethod & 0x02) = 0) OR (program.subtitle
<> ''           AND program.subtitle = recorded.subtitle))        AND
      (((sched_temp_record.dupmethod & 0x04) = 0) OR
(program.description <> ''           AND program.description =
recorded.description))        AND
(((sched_temp_record.dupmethod & 0x08) = 0) OR (program.subtitle <> ''
          AND program.subtitle = recorded.subtitle) OR
(program.subtitle = ''            AND recorded.subtitle = '' AND
program.description <> ''           AND program.description =
recorded.description))       )      )   )  LEFT JOIN oldfind ON
(oldfind.recordid = recordmatch.recordid AND    oldfind.findid = (CASE
sched_temp_record.type   WHEN 6    THEN sched_temp_record.findid
WHEN 9    THEN to_days(date_sub(program.starttime, interval
     time_format(sched_temp_record.findtime, '%H:%i') hour_minute))
WHEN 10    THEN floor((to_days(date_sub(program.starttime, interval
            time_format(sched_temp_record.findtime, '%H:%i')
hour_minute)) -                sched_temp_record.findday)/7) * 7 +
sched_temp_record.findday   WHEN 7    THEN sched_temp_record.findid
ELSE 0  END) )   SET oldrecduplicate = (oldrecorded.endtime IS NOT
NULL),       recduplicate = (recorded.endtime IS NOT NULL),
findduplicate = (oldfind.findid IS NOT NULL),       oldrecstatus =
oldrecorded.recstatus
2011-03-28 23:47:19.962 Driver error was [2/144]:
QMYSQL3: Unable to prepare statement
Database error was:
Table './mythconverg/oldrecorded' is marked as crashed and last
(automatic?) repair failed

2011-03-28 23:47:19.962 DB Error (AddNewRecords recordmatch):
Query was:
UPDATE recordmatch  INNER JOIN sched_temp_record ON
(recordmatch.recordid = sched_temp_record.recordid)  INNER JOIN
program ON (recordmatch.chanid = program.chanid AND
     recordmatch.starttime = program.starttime AND
    recordmatch.manualid = program.manualid)  LEFT JOIN oldrecorded ON
  (     sched_temp_record.dupmethod > 1 AND     oldrecorded.duplicate
<> 0 AND     program.title = oldrecorded.title      AND      (
(program.programid <> '' AND program.generic = 0        AND
program.programid = oldrecorded.programid)       OR
(oldrecorded.findid <> 0 AND         oldrecorded.findid = (CASE
sched_temp_record.type   WHEN 6    THEN sched_temp_record.findid
WHEN 9    THEN to_days(date_sub(program.starttime, interval
     time_format(sched_temp_record.findtime, '%H:%i') hour_minute))
WHEN 10    THEN floor((to_days(date_sub(program.starttime, interval
            time_format(sched_temp_record.findtime, '%H:%i')
hour_minute)) -                sched_temp_record.findday)/7) * 7 +
sched_temp_record.findday   WHEN 7    THEN sched_temp_record.findid
ELSE 0  END) )       OR       (        program.generic = 0        AND
      (program.programid = '' OR oldrecorded.programid = '')
AND        (((sched_temp_record.dupmethod & 0x02) = 0) OR
(program.subtitle <> ''           AND program.subtitle =
oldrecorded.subtitle))        AND
(((sched_temp_record.dupmethod & 0x04) = 0) OR (program.description <>
''           AND program.description = oldrecorded.description))
 AND        (((sched_temp_record.dupmethod & 0x08) = 0) OR
(program.subtitle <> ''           AND program.subtitle =
oldrecorded.subtitle) OR (program.subtitle = ''            AND
oldrecorded.subtitle = '' AND program.description <> ''           AND
program.description = oldrecorded.description))       )      )   )
LEFT JOIN sched_temp_recorded recorded ON   (
sched_temp_record.dupmethod > 1 AND     recorded.duplicate <> 0 AND
 program.title = recorded.title AND     recorded.recgroup NOT IN
('LiveTV','Deleted')      AND      (       (program.programid <> ''
AND program.generic = 0        AND program.programid =
recorded.programid)       OR       (recorded.findid <> 0 AND
recorded.findid = (CASE sched_temp_record.type   WHEN 6    THEN
sched_temp_record.findid   WHEN 9    THEN
to_days(date_sub(program.starttime, interval
time_format(sched_temp_record.findtime, '%H:%i') hour_minute))   WHEN
10    THEN floor((to_days(date_sub(program.starttime, interval
       time_format(sched_temp_record.findtime, '%H:%i') hour_minute))
-                sched_temp_record.findday)/7) * 7 +
sched_temp_record.findday   WHEN 7    THEN sched_temp_record.findid
ELSE 0  END) )       OR       (        program.generic = 0        AND
      (program.programid = '' OR recorded.programid = '')        AND
     (((sched_temp_record.dupmethod & 0x02) = 0) OR (program.subtitle
<> ''           AND program.subtitle = recorded.subtitle))        AND
      (((sched_temp_record.dupmethod & 0x04) = 0) OR
(program.description <> ''           AND program.description =
recorded.description))        AND
(((sched_temp_record.dupmethod & 0x08) = 0) OR (program.subtitle <> ''
          AND program.subtitle = recorded.subtitle) OR
(program.subtitle = ''            AND recorded.subtitle = '' AND
program.description <> ''           AND program.description =
recorded.description))       )      )   )  LEFT JOIN oldfind ON
(oldfind.recordid = recordmatch.recordid AND    oldfind.findid = (CASE
sched_temp_record.type   WHEN 6    THEN sched_temp_record.findid
WHEN 9    THEN to_days(date_sub(program.starttime, interval
     time_format(sched_temp_record.findtime, '%H:%i') hour_minute))
WHEN 10    THEN floor((to_days(date_sub(program.starttime, interval
            time_format(sched_temp_record.findtime, '%H:%i')
hour_minute)) -                sched_temp_record.findday)/7) * 7 +
sched_temp_record.findday   WHEN 7    THEN sched_temp_record.findid
ELSE 0  END) )   SET oldrecduplicate = (oldrecorded.endtime IS NOT
NULL),       recduplicate = (recorded.endtime IS NOT NULL),
findduplicate = (oldfind.findid IS NOT NULL),       oldrecstatus =
oldrecorded.recstatus
No error type from QSqlError?  Strange...
2011-03-28 23:47:20.012 Scheduled 0 items in 3.4 = 3.25 match + 0.11 place
2011-03-28 23:47:20.013 Seem to be woken up by USER
2011-03-28 23:47:23.843 UPnpMedia: BuildMediaMap VIDEO scan starting
in :/var/lib/mythtv/videos:
2011-03-28 23:47:25.017 UPnpMedia: BuildMediaMap Done. Found 3420 objects
2011-03-28 23:48:15.327 PID 0x297 status: Encrypted
2011-03-28 23:48:17.178 PID 0x203 status: Encrypted
2011-03-28 23:48:33.606 AutoExpire: CalcParams(): Max required Free
Space: 40.0 GB w/freq: 15 min
a


More information about the mythtv-users mailing list