[mythtv-commits] Ticket #5269: Race condition in mythshutdown

MythTV mythtv at cvs.mythtv.org
Sat May 17 16:58:26 UTC 2008


#5269: Race condition in mythshutdown
--------------------------+-------------------------------------------------
 Reporter:  anonymous     |        Owner:  paulh     
     Type:  defect        |       Status:  closed    
 Priority:  minor         |    Milestone:  0.21.1    
Component:  mythshutdown  |      Version:  0.21-fixes
 Severity:  medium        |   Resolution:  fixed     
  Mlocked:  0             |  
--------------------------+-------------------------------------------------
Changes (by paulh):

  * status:  accepted => closed
  * resolution:  => fixed


Comment:

 (In [17343]) Merge r17342 from trunk.

 Fix a possible problem with mythshutdown --lock/--unlock.

 The lock/unlock commands can be nested so if lock is called twice unlock
 would have to also be called twice to unlock shutdown. Each lock/unlock
 requires 2 db queries one to get the setting and one to save it back
 again.
 The problem is if two instances of mythshutdown is running the reads and
 writes could overlap each other resulting in the setting getting out of
 sequence.

 This fixes the problem by using only one query to update the setting and
 also
 locks the table making it impossible for two mythshutdown processes to
 update
 the lock setting at the same time.

 Fixes #5269.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/5269#comment:3>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list