Modify

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

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

Change History

comment:1 Changed 4 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 4 years ago by Shane Shrybman <gnome42@…>

Move GetJumpPos?() call

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

comment:2 Changed 4 years ago by stuartm

  • Milestone changed from unknown to 0.22

comment:3 Changed 3 years ago by danielk

  • Owner changed from ijr to danielk
  • Status changed from new to assigned

Changed 3 years ago by danielk

updated patch

comment:4 Changed 3 years ago by danielk

  • Type changed from task to patch

comment:5 Changed 3 years ago by danielk

  • Status changed from assigned to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.