[mythtv-commits] Ticket #13571: Crash of backend on delete of program being recorded

MythTV noreply at mythtv.org
Wed Feb 5 16:24:03 UTC 2020


#13571: Crash of backend on delete of program being recorded
--------------------------------+------------------------------
 Reporter:  Klaas de Waal       |          Owner:  (none)
     Type:  Bug Report - Crash  |         Status:  new
 Priority:  minor               |      Milestone:  needs_triage
Component:  MythTV - General    |        Version:  Master Head
 Severity:  medium              |     Resolution:
 Keywords:                      |  Ticket locked:  0
--------------------------------+------------------------------

Comment (by Klaas de Waal):

 David, thanks for looking into this.

 The living room system has only a master backend. The development system
 is combined backend/frontend. Most recording extend to 15 minutes or more
 after the scheduled end time so we often delete a program that is still
 being recorded, and that is when the crash happens.

 To get the crash on my development system I have created a new capture
 card starting with one tuner and "schedule as group" on so that additional
 tuner entries are created.
 However, I tried this a few times and it crashed only once, in the new
 created tuner entry.

 It seems more likely to get a crash when the recording has been running
 for some time. When a recording is started and immediately deleted nothing
 happens.


 To confuse matters a bit, the crashes on my living room system are not in
 the latest created tuner (but they are in the traversal of m_encoderList
 as mentioned).

 I am currently thinking along the following lines.
 - It could be that the m_encoderList is reallocated when a new tuner is
 added. This has no consequence when it is always traversed from the start
 but if somewhere a pointer to an entry is stored then that pointer is
 invalid.
 - The m_encoderList is extended before the start of the recording (because
 the new tuner entry is needed) and the m_encoderList is correct until
 right before the recording is terminated by TVRec[x]. Could TVRec[x] have
 a pointer somewhere into the m_encoderList and then write something with a
 now-invalid pointer?
 - It looks to me that the AutoExpire is started with a copy of the pointer
 to the same m_encoderList but in the AutoExpire there is no locking
 whatsoever. This does not look to be the problem though as the AutoExpire
 does only read and the crashes are not in the AutoExpire.

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13571#comment:4>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list