[mythtv-commits] Ticket #8679: mythfrontend deletes settings when db connection is "weak"

MythTV mythtv at cvs.mythtv.org
Tue Jul 20 16:16:37 UTC 2010


#8679: mythfrontend deletes settings when db connection is "weak"
-------------------------------+--------------------------------------------
 Reporter:  thomas@…           |        Type:  defect          
   Status:  new                |    Priority:  minor           
Milestone:  unknown            |   Component:  MythTV - General
  Version:  0.22               |    Severity:  medium          
  Mlocked:  0                  |  
-------------------------------+--------------------------------------------
 For the third time, mythfrontend deleted my settings when somehow the
 connection to the backend was unstable.

 I don't know, why the connection was unstable, because my frontend boots
 via PXE from the backend. And restarting mythfrontend solved the
 connection problems. So, I guess it was no hardware problem.

 I did some investigation and found out that mythfrontend deletes data from
 the tables settings, displayprofiles, displayprofilegroups and
 inuseprograms in such a case.

 It's strange that mythfrontend thinks, that reading from the tables
 fails, but still it is able to delete data from the tables.

 >From mythfrontend.log:

 ---------------------------------------------------------

 2010-06-12 08:30:56.858 Using the OpenGL painter
 2010-06-12 08:30:58.429 Loaded base theme from
 /usr/share/mythtv/themes/Terra/base.xml
 2010-06-12 08:30:58.645 Loaded base theme from
 /usr/share/mythtv/themes/default-wide/base.xml
 2010-06-12 08:30:58.705 Loaded base theme from
 /usr/share/mythtv/themes/default/base.xml
 2010-06-12 08:30:58.747 Current MythTV Schema Version (DBSchemaVer): 1244
 2010-06-12 08:30:58.836 Error preparing query: SELECT name FROM
 displayprofilegroups WHERE hostname = :HOST
 2010-06-12 08:30:58.836 Driver error was [2/2006]:
 QMYSQL3: Unable to prepare statement
 Database error was:
 MySQL server has gone away

 2010-06-12 08:30:58.837 DB Error (get_profiles):
 Query was:
 SELECT name FROM displayprofilegroups WHERE hostname = :HOST
 Bindings were:
 :HOST=frontend
 Driver error was [2/2006]:
 QMYSQL: Unable to execute query
 Database error was:
 MySQL server has gone away

 2010-06-12 08:30:58.841 Error preparing query: DELETE FROM
 displayprofiles WHERE profilegroupid = :PROFID
 2010-06-12 08:30:58.841 Driver error was [2/2006]:
 QMYSQL3: Unable to prepare statement
 Database error was:
 MySQL server has gone away

 [...]

 2010-06-12 08:30:59.070 DB Error (create_profile_group):
 Query was:
 INSERT INTO displayprofilegroups (name, hostname) VALUES (?,?)
 Bindings were:
 :HOST=frontend, :NAME=CPU--
 Driver error was [2/1062]:
 QMYSQL3: Unable to execute statement
 Database error was:
 Duplicate entry 'CPU---frontend' for key 1

 [...]

 2010-06-12 08:31:11.451 MythContext: Connecting to backend server:
 localhost:6543 (try 1 of 1)
 2010-06-12 08:31:11.468 Connection to master server timed out.
                         Either the server is down or the master server
 settings
                         in mythtv-settings does not contain the proper
 IP address

 ---------------------------------------------------------

 After this incident, I restored the affected tables from the last backup
 and everything was OK again.

 I think mythfrontend should display a message ("There is a
 problem, what shall I do?") in such a case, instead of deleting data.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/8679>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list