[mythtv-commits] Ticket #13479: mythbackend deadlock when editing schedule metadata on frontend

MythTV noreply at mythtv.org
Tue Feb 4 17:00:29 UTC 2020


#13479: mythbackend deadlock when editing schedule metadata on frontend
----------------------------------+-------------------------------
 Reporter:  Peter Bennett         |          Owner:  Peter Bennett
     Type:  Bug Report - General  |         Status:  assigned
 Priority:  minor                 |      Milestone:  needs_triage
Component:  MythTV - General      |        Version:  v30-fixes
 Severity:  medium                |     Resolution:
 Keywords:                        |  Ticket locked:  0
----------------------------------+-------------------------------

Comment (by gigem):

 Replying to [comment:6 Peter Bennett]:
 > Regarding m_recListChanged - this can be used to check if the list
 changed. If the list changes during the call to
 m_mainServer->isClientConnected, that will not be a problem. In
 !HandleIdleShutdown it does look through the list, and the list cannot
 change while it is looking through the list since it is locked at that
 time. I prefer to make as few changes as possible to reduce risk, so I
 plan to only unlock and relock at the two places
 m_mainServer->isClientConnected is called inside !HandleIdleShutdown.

 Please do not do this.  When m_recListChanged is true, stop and return.
 Always.  It's not just that iterators might have been invalidated, but
 other assumptions like list ordering might have been invalidated too.  You
 might be able to convince yourself that in this case at this time, it
 won't hurt anything.  That might not always be the case, though, as an
 unrelated, future change might invalidate it.  To avoid that and keep
 things simple, just stop and return.

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


More information about the mythtv-commits mailing list