[mythtv-commits] Ticket #12974: Auto expire has race condition

MythTV noreply at mythtv.org
Sat Jan 7 17:11:02 UTC 2017


#12974: Auto expire has race condition
--------------------------------------+---------------------
     Reporter:  amb@…                 |      Owner:
         Type:  Bug Report - General  |     Status:  new
     Priority:  minor                 |  Milestone:  unknown
    Component:  MythTV - General      |    Version:  0.28.0
     Severity:  medium                |   Keywords:
Ticket locked:  0                     |
--------------------------------------+---------------------
 The auto expiration of deleted programs has a race condition.

 Recorded programs to be deleted are marked for deletion by setting
 deletepending=1 in the database and they are also added to a list to be
 deleted.  The deletepending flag in the database stops this recording from
 appearing in the recording list or in the list of recordings to delete.

 The race condition occurs if mythbackend is killed or dies after the
 recording is flagged for deletion but before it is deleted.  The flag in
 the database stops the same recording from being added to the list again.
 The file therefore remains on the disk and the entry remains in the
 database but it is invisible in the frontend recording list and will not
 be re-added to the list for deletion.

 The patch attached is one solution, it may not be optimum.  It ignores the
 deletepending flag if it was set more than 5 minutes ago.  This stops the
 recording becoming invisible so it can be added to the list again and
 really get deleted.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12974>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list