[mythtv] [mythtv-commits] Ticket #1319: scheduler is sometimes recording wrong program

Bruce Markey bjm at lvcm.com
Wed Mar 8 03:43:27 UTC 2006


henri wrote:
> On 07 Mar 2006, Bruce Markey <bjm at lvcm.com> wrote: 
> 
>> henri wrote:
>> ...
>>> my guess is that the schedule is changing but the data in recordmatch
>>> isn't getting cleared? that would be the only explanation that makes
>> More likely it was getting the same, or different, incorrect result
>> each time (how did it get an incorrect row in the first place?).
>> Could have been a broken index or something.
>>
>>> i'll keep a manual eye out for the 2 rules that are causing me
>>> problems (one on cartoon network, the other on comedy central). if it
>>> happens again hopefully i'll have more data (program entries from each
>>> day and recordmatch entries from each day)
>> If it does happen again, try:
>>
>> SELECT chanid,starttime,title FROM program WHERE title='Foobar';
>>
>> as a quick first check. If it returns a different title than the
>> WHERE clause then the DB is bad. If this result is correct but
>> the timestamps in recordmatch are different, it's probably still
>> a bad DB but you'll have narrowed down where to look for the cause.
>>
> 
> i'm assuming that doing a grep for:
> 
> grep "DELETE FROM recordmatch WHERE recordid = -1" /var/log/mythbackend.log

It would be "Reschedule requested for id -1.". Look in the log
to see if this message appear when mfdb ran the look to see if
the scheduler run succeeded or of there is a DB error or connection
failure:

2006-03-07 01:25:10.266 MainServer::HandleAnnounce Monitor
2006-03-07 01:25:10.272 adding: nordtv as a client (events: 0)
2006-03-07 01:25:10.466 Reschedule requested for id -1.
2006-03-07 01:25:10.507 Unknown socket closing
2006-03-07 01:25:15.189 Scheduled 301 items in 4.7 = 3.79 match + 0.91 place

Mfdb connected from "nordtv", requested the reschedule then closed.
The high "match" time is rematching everything.

> should Scheduler::UpdateMatches(-1) be called after each
> mythfilldatabase run? 

Yes.

> my logs only show it being called when i run 
> 
> mythbackend --resched 

See the messages at the end of your mfdb output:

2006-03-06 13:24:00.359
===============================================================
| Attempting to contact the master backend for rescheduling.  |
| If the master is not running, rescheduling will happen when |
| the master backend is restarted.                            |
===============================================================
2006-03-06 13:24:00.405 Connecting to backend server: 192.168.0.35:6543
 (try 1 of 5)
2006-03-06 13:24:00.412 Using protocol version 27
2006-03-06 13:24:00.728 mythfilldatabase run complete.

> or do something else manually, and not on a daily basis after
> mythfilldatabase is run (from a cron job, not via mythfrontend)

You shouldn't have to. Check your mfdb output to see that it connected
and and check your backend logs to see that the scheduler run succeeded.
I agree with Mike that this may simply be another consequence of the
MySQL 5 connection issues and you should update to current SVN or the
current '-fixes' branch if you haven't already.

--  bjm


More information about the mythtv-dev mailing list