
noreply at mythtv
Jan 9, 2012, 1:42 PM
Post #1 of 3
(107 views)
Permalink
|
|
Ticket #10249: config.xml gets truncated due to race condition when rewriting it on every application run
|
|
#10249: config.xml gets truncated due to race condition when rewriting it on every application run -------------------------------------+------------------------------------- Reporter: dekarl@… | Type: Bug Report - Status: new | General Milestone: unknown | Priority: minor Version: Trunk Head | Component: MythTV - General Keywords: | Severity: medium | Ticket locked: 0 -------------------------------------+------------------------------------- Symptom in any logfile: {{{ 2012-01-09 21:56:59.715916 E Error parsing: /home/mythtv/.mythtv/config.xml at line: 1 column: 1 2012-01-09 21:56:59.715921 E Error Msg: unexpected end of file }}} See the diagnosis between 18:00 and 21:00 at http://irc.mythtv.org/ircLog/channel/4/2011-12-29:18:05 It appears that every application **rewrites** the config file on every run which can lead to silent truncation when the application is killed at the right time. Possible solutions: * only write the config file when it has been changed * rewrite the config writing to make the race condition impossible (like writing to tempfile and move that over the old one) -- Ticket URL: <http://code.mythtv.org/trac/ticket/10249> MythTV <http://code.mythtv.org/trac> MythTV Media Center _______________________________________________ mythtv-commits mailing list mythtv-commits [at] mythtv http://www.mythtv.org/mailman/listinfo/mythtv-commits
|