[mythtv-commits] Ticket #10249: config.xml gets truncated due to race condition when rewriting it on every application run
MythTV
noreply at mythtv.org
Mon Jan 9 21:42:46 UTC 2012
#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
More information about the mythtv-commits
mailing list