[mythtv] Scheduling problem

Bruce Markey bjm at lvcm.com
Tue Feb 22 18:03:40 UTC 2005


Brent Borghese wrote:
> My system has two tuners.  And at 9:00pm the system was recording two
> programs.
> 
> Then at 9:05pm  I found that the show that should start at 10:00pm was
> starting at 9:30am.
> 
> So I stopped recording one of the shows that started at 9:00pm.  This
> should have resolved the conflict with the 9:30pm show, but it did not.
> 
> Myth was saying that the 9:30pm show was still being blocked by a higher
> priority show(the one I stopped) and it had a free tuner.

Confirmed. There were some problems before 0.17 with the scheudler
runs after a stop or delete. Most of these where hammered out but
appearantly things can still happen out of order after a Stop.

> The only way to get it to record the show at 9:30pm was to change the
> priority of the show above the priority of the stopped show. 

Actaully, anything that would cause the scheduler to run again
would fix it. For instance, if you went to a recording options
page for a show that wasn't involved, didn't make any changes and
hit Save, it would be correct after this new run of the scheduler.

> 0.16 had a option called: "Record Anyway" witch seems to be gone.

Actually, the "Record Anyway" is still there but like all the buttons
on that page other than "OK", it depends on the status but it was
probably confused at that point.


David, here's an example. I start a long record, add another that
starts later than stop the long show. The scheduler does run when
stop is pressed and the later show should then have card 1.

However, printlist shows that the long show is still assigned to
card 1 whereas it should be "S". The conflicts page shows "S"
(I don't understand this) and mb --printsched soesn't list the
long show at all and only shows the later show on card 2.


Starting up as the master server.

[start recording 9-11]

--- print list start ---
Title - Subtitle                    Chan ChID Day Start  End   S C I  T N Pri
BET Start                             27 1027  22 09:00-11:00  1 1 1  S 1   3
---  print list end  ---
2005-02-22 09:04:41.594 Scheduled 1 items in 0.2 = 0.14 match + 0.01 place
2005-02-22 09:04:41.601 Started recording "BET Start" on channel: 1027 on cardid: 1, sourceid 1

[add a 10-10:30 recording. Correctly assigned to card 2]

--- print list start ---
Title - Subtitle                    Chan ChID Day Start  End   S C I  T N Pri
BET Start                             27 1027  22 09:05-11:00  1 1 1  S 1   3
Rolie Polie Olie - "Little Souped C   28 1028  22 10:00-10:30  1 2 2  S 2   3
---  print list end  ---
2005-02-22 09:04:55.490 Scheduled 2 items in 0.2 = 0.22 match + 0.01 place

[pressed Stop on "BET Start"]

2005-02-22 09:05:10.855 Finished recording BET Start on channel: 1027
2005-02-22 09:05:10.857 Changing from RecordingOnly to None
2005-02-22 09:05:10.858 Reschedule requested for id 0.
2005-02-22 09:05:10.859 PruneOldRecords...
2005-02-22 09:05:10.859 AddNewRecords...
2005-02-22 09:05:10.860  |-- Start DB Query...
2005-02-22 09:05:10.864  |-- 4 results in 0.003471 sec. Processing...
2005-02-22 09:05:10.866  +-- Cleanup...
2005-02-22 09:05:10.866 Sort by time...
2005-02-22 09:05:10.867 PruneOverlaps...
2005-02-22 09:05:10.867 Sort by priority...
2005-02-22 09:05:10.867 BuildListMaps...
2005-02-22 09:05:10.867 SchedNewRecords...
2005-02-22 09:05:10.867 Scheduling:
  +Rolie Polie Olie - "Little Souped C   28 1028  22 10:00-10:30  1 2 2  S 23
2005-02-22 09:05:10.867 Sort retrylist...
2005-02-22 09:05:10.867 MoveHigherRecords...
2005-02-22 09:05:10.867 Retrying:
2005-02-22 09:05:10.867 ClearListMaps...
2005-02-22 09:05:10.867 Sort by time...
2005-02-22 09:05:10.867 PruneRedundants...
--- print list start ---
Title - Subtitle                    Chan ChID Day Start  End   S C I  T N Pri
BET Start                             27 1027  22 09:05-11:00  1 1 1  S 1   3
Rolie Polie Olie - "Little Souped C   28 1028  22 10:00-10:30  1 2 2  S 2   3
---  print list end  ---
2005-02-22 09:05:10.867 Scheduled 2 items in 0.0 = 0.00 match + 0.01 place

"BET Start" should have been rsStopped and "Rolie Polie Olie" should
have been reassigned to card 1. Upcoming Recordings show theses as
"S" and "2" and printsched doesn't show "BET Start" at all. 

$ mythbackend --printsched
2005-02-22 09:09:09.165 Connecting to backend server: 192.168.0.33:6543 (try 1of 5)
2005-02-22 09:09:09.171 Using protocol version 14
Retrieving Schedule from Master backend.
--- print list start ---
Title - Subtitle                    Chan ChID Day Start  End   S C I  T N Pri
Rolie Polie Olie - "Little Souped C   28 1028  22 10:00-10:30  1 2 2  S 2   3
---  print list end  ---

Note that where the scheduer ran it only placed "Rolie Polie Olie"
so would the state of "BET Start" have been kept by PruneOldRecords?
Both stop buttons call:

    pginfo->recstatus = rsStopped;
    if (m_sched)
        m_sched->UpdateRecStatus(pginfo);

Is it possible that the scheduler thread runs before UpdateRecStatus
has done it's thing?

--  bjm


More information about the mythtv-dev mailing list