Jamu cron job needs to check for ~/.mythtv/config.xml

Bug #432897 reported by MarcRandolph
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mythplugins (Ubuntu)
Fix Released
Undecided
Mario Limonciello

Bug Description

Binary package hint: mythplugins

Wasn't doing anything in particular... this crash report appeared 5 or 10 minutes after booting alpha for the first time.
Tried running mythtv-setup, but the database is hosed (probably my fault).

System is a complete mess after upgrade from 9.04 to 9.10 alpha, so I don't know if this is a real problem or not.
Prior upgrades (from 8.10 to 9.04) worked fine.

ProblemType: Crash
Architecture: i386
Date: Fri Sep 18 23:17:02 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/share/mythtv/mythvideo/scripts/jamu.py
InterpreterPath: /usr/bin/python2.6
Package: mythvideo 0.22.0~trunk21785-0ubuntu1
ProcCmdline: /usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/sh
ProcVersionSignature: Ubuntu 2.6.31-10.34-generic
PythonArgs: ['/usr/share/mythtv/mythvideo/scripts/jamu.py', '-MW']
SourcePackage: mythplugins
Title: jamu.py crashed with MythError in __init__()
Uname: Linux 2.6.31-10-generic i686
UserGroups: audio cdrom dialout video

Related branches

Revision history for this message
MarcRandolph (mrand) wrote :
visibility: private → public
description: updated
Revision history for this message
MarcRandolph (mrand) wrote :

Mario, anything you want to know or see before I blow this install away and start over?

Revision history for this message
Apport retracing service (apport) wrote : This bug is a duplicate

Thank you for taking the time to report this crash and helping to make Ubuntu better. This particular crash has already been reported and is a duplicate of bug #428473, so is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

tags: removed: need-duplicate-check
Revision history for this message
Mario Limonciello (superm1) wrote : Re: jamu.py crashed with MythError in __init__()

Well it looks like this was caused by a missing ~/.mythtv/config.xml in ~mythtv. We should probably make the mythvideo cron job only run if that file exists. My guess is it's missing *because* of the upgrade scenario. We create it normally.

Revision history for this message
Mario Limonciello (superm1) wrote :

Unmarking the duplicate. It looks like this isn't the exact same as bug 428473, but very similar.

Changed in mythplugins (Ubuntu):
status: New → Confirmed
assignee: nobody → Mario Limonciello (superm1)
summary: - jamu.py crashed with MythError in __init__()
+ Jamu cron job needs to check for ~/.mythtv/config.xml
Revision history for this message
MarcRandolph (mrand) wrote :

Sorry, I was doing a bunch of things at once and didn't get a chance at the time to see if that existed when the error popped up. Since it popped up immedately after the upgrade reboot, it is possible the file hadn't been created yet... looks like it got created eventually:

Ticket was opened at 11:23pm. Last touch date on ~/.mythtv/config.xml is midnight.

Revision history for this message
Mario Limonciello (superm1) wrote :

I've committed a fix for this that will show up in daily builds of trunk on sept 21. it's in bzr #116 for mythplugins-trunk-022.

Changed in mythplugins (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Jo Shields (directhex) wrote :

There's a further dimension to this bug, which #116 does not address.

The jamu cron script is included in the mythvideo package, which is used by both frontends and backends. It is entirely feasible to install it on a frontend-only machine, or even on a desktop PC which is not a dedicated frontend

On a desktop PC, it is feasible that you won't run MythTV as a dedicated user, i.e. your normal user (e.g. "directhex") will be running the frontend, not the automatic "mythtv" user (who has, in my case, never been used and has an empty home directory).

There are two questions at this point:

1) Should jamu be executed in my scenario? The Mythtv Wiki suggests it should only be executed on backends. Rather than checking the file exists, it might be better to simply export MYTHCONFDIR in the cron entry, as that directory is treated in jamu as an alternative home for config.xml
2) If not, then what happens if I ever used the mythtv user, even if just to try out? Whether or not jamu is executed depends on whether you've ever run a backend for any reason (debian/mythtv-backend.init line 60), or ever run a frontend as the mythtv user for any reason libs/libmyth/mythcontext.cpp line 1048).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythplugins - 0.22.0~trunk22101-0ubuntu1

---------------
mythplugins (0.22.0~trunk22101-0ubuntu1) karmic; urgency=low

  * New upstream checkout (r22101)
  * debian/mythvideo.cron.*:
    - Check that /home/mythtv/.mythtv/config.xml exists before running.
      (LP: #432897)

 -- Mario Limonciello <email address hidden> Sun, 20 Sep 2009 23:56:42 -0500

Changed in mythplugins (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.