[mythtv-users] OS X MythFillDatabase hangs using 100% CPU

Eric Holt ericsh at wvcom.net
Sat Sep 17 16:14:18 UTC 2011


On Sep 16, 2011, at 6:48 AM, Ian Clark wrote:

> On 16 September 2011 11:33, Eric Holt <ericsh at wvcom.net> wrote:
>> Hi all.  I just moved my backend from some 4 year old hardware to a refurb'd Mac Mini Server.
>> 
>> All is working great, except for the scheduled MythFillDatabase runs. They are hanging, eating up 100% cpu usage on one of the cores.
>> 
>> Looking through the logs, I found this relevant piece of information:
>> 
>>        sh: wget: command not found
>> 
>> Oddly enough, I installed wget in a directory in the user's path (/usr/local/bin/wget).  The user can run wget without specifying the path.
>> 
>> The myth user can also run mythfilldatabase from Console without any problem.  If I run it manually, it runs perfectly fine, no issues.
>> 
> Are these two users the same?
> 
> It sounds like the myth user can't see wget, or can't see wget when
> the backend is started (which spawns filldatabase), this probably
> means PATH isn't setup correctly at the point when mythbackend is
> started.
> 
> How are you changing to the myth user, it's quite easy to do and
> accidentally pull in the environment of the user you're changing from.
> 
> How do you start mythbackend?
> 
> You could wrap it in a scrip that does:
> 
> echo "Current myth path:" > /some/log/file.log
> echo $PATH >> /some/log/file.log
> mythbackend
> 
> or even
> 
> echo "Current myth env:" > /some/log/file.log
> set >> /some/log/file.log
> mythbackend

Ian:

You were spot-on with your observations about the PATH not being set correctly from how I was starting MythBackend.

I am using launchd to start MythBackend for the 'mythtv' user.  I made the mistake in thinking that because 'mythtv' could see the path to wget from a Console that MythBackend/mythfilldatabase should as well from launchd.  That doesnt appear to be the case.  launchd seems to have its own/different set of paths.

My 'quick and dirty' fix was to just move wget to /usr/bin.  This worked fine, and mythfilldatabase ran as expected this morning.  I'll work on getting the path setup correctly under launchd later on.

Now I'm fighting with perl bindings so I can run the optimize and backup 'mythconverg DB' scripts  ;)

Thanks and Best...
#Eric



More information about the mythtv-users mailing list