List Info

Thread: Re: Gah, 1.7.3's record server still broken!




Re: Gah, 1.7.3's record server still broken!
country flaguser name
Switzerland
2007-08-21 14:14:37
Andrew Flegg wrote:
> On 8/21/07, Duncan Webb <duncanfreevo.org> wrote:
>>> Was this the first time using conflict
detection by chance?
> [snip]
>> I don't think so as this is really an old old bug.
It happened to me a
>> couple of times when I started using freevo.
> 
> Indeed, I'd also seen it before enabling conflict
resolution and this
> wasn't the first time adding/editing a new favourite
since enabling
> it.
> 
>> My guess is that is most likely caused by two
processes updating the
>> record_schedule.xml at the same time. For example,
when the recordserver
>> is doing an update and the webserver is adding a
favourite.
> 
> Interesting. Unfortunately, there was no web access
happening at the
> time and the TV updates happen at 07:16.

No background process running freevo schedulefavorites,
freevo cache,
etc. I still suspect a race condition in the saving of the
record_schedule.xml. A write lock could be added around any
code that
tries to read or write the record_schedule.xml, hopefully
this is only
done in a couple of functions.

> In other words, the only thing accessing the record
server at the time
> was the main Freevo UI on the TV.
> 
>> From Andrews bug report #1777726 you can see:
>> 2007-08-20 16:19:40,579 WARNING  recordserver.py
(268) :
>> "/var/cache/freevo/record_schedule.xml"
is invalid, removed
>> which means that the record_schedule.xml was
corrupt and had to be
>> deleted. As the record_schedule.xml also contains
the favourites this
>> means that they where also deleted. Ouch.
> 
> :-(
> 
>> Question for Andrew, is was there something
recording at the same time as
>> he was using web interface? 16:18 is a good time to
record children's
>> programmes.
> 
> Nope, nothing recording at the time either.
> 
> I've now got a little cronjob running as the PVR user:
> 
> --------8<--------
> 0 *     *   *     *  perl -e '$a =
> "/var/cache/freevo/record_schedule.xml";
system("cp $a ~/") if -s $a >
> 10240'
> -------->8--------
> 
> So I feel safer doing some more tests 
> 
> The strangest thing is why the web UI would work and
the main UI
> wouldn't. Aren't they both talking to the recordserver
using the same
> protocol and very similar code?

Before you update freevo please read the release notes in
freevo_config.py as I moved files around and you will need
to move the
record_schedule.xml to it's new location. Since you are
running freevo
as the user PVR it will create a ~/.freevo/static
directory.

Duncan


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Freevo-devel mailing list
Freevo-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-dev
el

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )