Opened 12 years ago

Closed 11 years ago

#3618 closed patch (fixed)

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 (3)

mythtv_NVP_GetJumpPos.diff (761 bytes) - added by Shane Shrybman <gnome42@…> 12 years ago.
Move GetJumpPos?() call
mythtv_tvchain_clearswitch.diff (1.3 KB) - added by Shane Shrybman <gnome42@…> 12 years ago.
Always clear NeedsToJump/NeedsToSwitch?
3618-v1.patch (1.7 KB) - added by danielk 11 years ago.
updated patch

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by Shane Shrybman <gnome42@…>

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.

Changed 12 years ago by Shane Shrybman <gnome42@…>

Attachment: mythtv_NVP_GetJumpPos.diff added

Move GetJumpPos?() call

Changed 12 years ago by Shane Shrybman <gnome42@…>

comment:2 Changed 12 years ago by stuartm

Milestone: unknown0.22

comment:3 Changed 11 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newassigned

Changed 11 years ago by danielk

Attachment: 3618-v1.patch added

updated patch

comment:4 Changed 11 years ago by danielk

Type: taskpatch

comment:5 Changed 11 years ago by danielk

Resolution: fixed
Status: assignedclosed

(In [19484]) Fixes #3618. Fixes a potential infinite loop + related cleanups, see ticket for details.

Note: See TracTickets for help on using tickets.