Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

Ticket #10249: config.xml gets truncated due to race condition when rewriting it on every application run

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


noreply at mythtv

Jan 9, 2012, 1:42 PM

Post #1 of 3 (159 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


noreply at mythtv

Feb 18, 2012, 11:35 PM

Post #2 of 3 (129 views)
Permalink
Re: Ticket #10249: config.xml gets truncated due to race condition when rewriting it on every application run [In reply to]

#10249: config.xml gets truncated due to race condition when rewriting it on every
application run
-------------------------------------------+-----------------------------
Reporter: dekarl@… | Owner: mdean
Type: Bug Report - General | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
-------------------------------------------+-----------------------------
Changes (by wagnerrp):

* owner: => mdean
* status: new => assigned


--
Ticket URL: <http://code.mythtv.org/trac/ticket/10249#comment:1>
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


noreply at mythtv

May 3, 2012, 12:23 PM

Post #3 of 3 (109 views)
Permalink
Re: Ticket #10249: config.xml gets truncated due to race condition when rewriting it on every application run [In reply to]

#10249: config.xml gets truncated due to race condition when rewriting it on every
application run
----------------------------------+-----------------------------
Reporter: dekarl@… | Owner: mdean
Type: Bug Report - General | Status: closed
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Master Head
Severity: medium | Resolution: Duplicate
Keywords: | Ticket locked: 0
----------------------------------+-----------------------------
Changes (by mdean):

* status: assigned => closed
* resolution: => Duplicate


Comment:

This will be handled as part of #10305 . Patch attached there ensures
that we only re-write config.xml when it changes.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10249#comment:2>
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

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.