Ticket #3618 (closed patch: fixed)
Opened 5 years ago
Last modified 3 years ago
LiveTV Safeguards
| Reported by: | stuartm | Owned by: | danielk |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.22 |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
We really need some more effective safeguards to prevent livetv recording to a single file for two days straight and causing auto-expire to delete all the other recordings. Even if all the known livetv bugs are fixed the ones we don't know about have the potential to do a lot of damage.
The safeguards have to be handled somewhere where a loop in the recorder or playback code won't prevent those conditions from ever being checked. I was using my idle timer on that machine, but it never got a chance to work - I assume because we were stuck in a loop (possibly the "LiveTV JumpTo? 1" loop).
Right now the precaution of never recording a programme that is more than 6 hours long is based on guide data, we don't use a timer to actually check how long we have been recording. We also need a check on filesizes so that we don't exceed an maximum e.g. 10Gb for SD
Attachments
Change History
comment:1 Changed 4 years ago by Shane Shrybman <gnome42@…>
Changed 4 years ago by Shane Shrybman <gnome42@…>
- Attachment mythtv_NVP_GetJumpPos.diff added
Move GetJumpPos?() call
Changed 4 years ago by Shane Shrybman <gnome42@…>
- Attachment mythtv_tvchain_clearswitch.diff added
Always clear NeedsToJump/NeedsToSwitch?
comment:3 Changed 3 years ago by danielk
- Owner changed from ijr to danielk
- Status changed from new to assigned

The first patch is a real fix I think. The second patch depends on the first but is only a safeguard against endless NeedsToSwitch/NeedsToJump? loops.
The endless JumpTo? loop scenario goes like this ...
Once NeedsToJump? is set in livetvchain it is only cleared by GetJumpPos?(). But livetvchain->GetSwitchProgram?() can return NULL, if we're already on the correct entry or it can't find the program which means an early return from NVP::JumpToProgram?() and GetJumpPos?() is never called and we loop forever.
The mythtv_NVP_GetJumpPos.diff patch addresses this by moving the call to GetJumpPos?() to before GetSwitchProgram?() so that NeedsToJump? is always cleared.
The second patch for LiveTVChain::GetSwitchProgram?() ensures that both NeedsToJump? and NeedsToSwitch? are always cleared in GetSwitchProgram?(). The comment above GetSwitchProgram?() already stated this was true but it didn't actually clear NeedsToJump? and didn't clear NeedsToSwitch? in all cases. This should provide a bit of a safeguard against endless loops.