[mythtv-users] Backend going to 100% CPU
Michael T. Dean
mtdean at thirdcontact.com
Wed Apr 2 01:49:43 UTC 2008
On 04/01/2008 10:24 AM, Bob Cottingham wrote:
> On 3/31/08, Michael T. Dean <mtdean at thirdcontact.com> wrote:
>
>> On 03/31/2008 11:04 AM, Steven Adeff wrote:
>>
>>> On Sat, Mar 29, 2008 at 8:34 PM, Bob Cottingham <bobnvic at gmail.com> wrote:
>>>
>>>
>>>> Since upgrading to .21-fixes my backend has going to 100% CPU. I
>>>> noticed this once when I ran mythweb, however I haven't used mythweb
>>>> since and it has happened again repeatedly. What do I need to include
>>>> if I submit a ticket? I assume that a backtrace won't show anything
>>>> since it doesn't crash.
>>>>
>>>>
>>> first, is the version of MythWeb your running the same as the version
>>> of mythbackend your running?
>>> if so, try running mythbackend with the --noupnp option and see if that helps.
>>>
>> Also, there have been reports of this happening because of problems with
>> the XML-based preview request mechanism in the backend that's used by
>> MythWeb. For a while, it happened on almost every machine. Then, the
>> problem just "disappeared" for most, though no one fixed it (it's likely
>> a race condition for which the timing changed just enough because of
>> unrelated modifications to Myth to prevent the problem on some
>> machines). However, one person--the author of MythWeb, Chris
>> Petersen--has actually seen it since. You may be the second person. If
>> it's 100% reproducible by just requesting XML previews repeatedly, you are.
>>
>> If you want to find out, feel free to run the attached (hack of a)
>> script (when the backend isn't running at 100%) to see if it causes the
>> CPU to max out (make an empty temp directory from which to run it as it
>> will drop a bunch of previews in the dir). If so, you might be able to
>> work around the problem by changing the timing on your backend machine a
>> bit (i.e. by underclocking it a little or something). Note that this
>> script is meant only as a diagnostic tool and is not developed to be
>> generally useful. It has some stuff hardcoded, so you may need to
>> modify it a bit.
> {script deleted}
>
> Unfortunately, I couldn't get the script to work. I just get
> permission errors, even when running as root.
Probably just need to chmod 755 myth_get_previews.pl (or call it with
perl -w myth_get_previews.pl).
> I don't know perl and I
> don't really know what might need to be changed beyond replacing the
> first instance of {HOST} with the IP address of the machine.
>
Actually, that's done by the script. It's used to ensure that it works
even with slave backends.
> I've avoided using mythweb since the first time I noticed it sent the
> backend to 100%, yet I still find the backend going to 100% after a
> few hours, so mythweb can't be the only problem.
>
Unless you know that nothing else is requesting preview images through
the XML interface, it's still possible it's the same thing.
> Since I'm also experiencing some other issues which I havn't seen
> anyone else complaining about, I may try wiping my source tree and
> downloading a fresh copy and recompiling. I followed svn for a while
> where several of these issues were noted, so perhaps I just don't have
> a clean copy.
That may not be a bad idea, either.
Mike
More information about the mythtv-users
mailing list