mythbackend does not terminate at computer shutdown

Bug #542627 reported by Nigel Hathaway
100
This bug affects 33 people
Affects Status Importance Assigned to Milestone
mythtv (Ubuntu)
Fix Released
Critical
Mario Limonciello

Bug Description

Binary package hint: dash

I think this may have something to do with the NVIDIA driver. I am running on a POV mboard with Atom 230 and Nvidia ION.

ProblemType: Bug
Architecture: i386
Date: Sat Mar 20 12:13:40 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /bin/dash
InstallationMedia: Mythbuntu 10.04 "Lucid Lynx" - Beta i386 (20100318)
NonfreeKernelModules: nvidia
OmitPids: 9141 9136 852 839
Package: dash 0.5.5.1-3ubuntu1
ProcCmdline: /bin/sh -e /proc/self/fd/8
ProcEnviron: PATH=(custom, no user)
ProcVersionSignature: Ubuntu 2.6.32-16.25-generic-pae
SourcePackage: dash
Title: does not terminate at computer shutdown
Uname: Linux 2.6.32-16-generic-pae i686

Related branches

Revision history for this message
Nigel Hathaway (nhathaway) wrote :
Revision history for this message
Mike Blackwood (blackwood) wrote :

EEEPC 1000 I also had driver problems (mirrored video) when upgrading to alpha 3

Martin Pitt (pitti)
affects: dash (Ubuntu) → mythtv (Ubuntu)
summary: - dash crashes on startup
+ mythbackend does not terminate at computer shutdown
Changed in mythtv (Ubuntu):
importance: Undecided → Low
Revision history for this message
Leon Alvarez (locoxella) wrote :

I have the same problem, and no nvidia card.

Revision history for this message
MarcRandolph (mrand) wrote :

On Bug 551277 (now marked as a dup of this bug), seemed to confirm that something similar to this was happening... mysql was being stopped, but the backend was not.

Changed in mythtv (Ubuntu):
importance: Low → Critical
status: New → Triaged
Revision history for this message
MarcRandolph (mrand) wrote :

Bug 559712 appears to have been reported in a different fashion and therefore contains a different set of logs.

Revision history for this message
MarcRandolph (mrand) wrote :

After making some test upstart jobs, I've convinced myself that the

stop on starting shutdown

line contained in /etc/init/mythtv-backend.conf can be changed to

stop on (starting shutdown or stopping mysql)

In my experiments, "stopping" clauses in upstart can refer to non-existent items. In other words, if mysql is not installed, this should still work fine. Only downside would be a unique config of a slave mythbackend on the same machine as a independent instance of mysql running for some other purpose. It seems to me that this is less likely than possible database corruption.

MarcRandolph (mrand)
Changed in mythtv (Ubuntu):
milestone: none → ubuntu-10.04
Revision history for this message
Max Barry (max-maxbarry) wrote :

> After making some test upstart jobs, I've convinced myself that the
>
> stop on starting shutdown
>
> line contained in /etc/init/mythtv-backend.conf can be changed to
>
> stop on (starting shutdown or stopping mysql)

Confirming this, I did the same thing independently a few weeks ago when I noticed mysql was stopping before mythtv-backend, which then produced errors. Haven't had a problem since.

I also tweaked my 'start' line. It looks like this:

start on (local-filesystems and net-device-up IFACE=lo and started mysql)
stop on (starting shutdown or stopping mysql)

This is on Mythbuntu 10.04.

Revision history for this message
nZain (patrick-stalph) wrote :

I can also confirm this on Ubuntu10.4 with MythTV 0.23. Similar to the not-waiting-for-udev bug, the additional condition "stopping mysql" is a good workaround for my use case (mysql server dedicated to mythtv).

Isn't there also a way to shutdown the backend manually? When using acpi wake-on-alarm & mythbackend's shutdown option, one could also add this command right before "sudo shutdown -h now", which is normally used. However, this may eventually fail since the backend stops itself before executing the final shutdown command? Wierd stuff :-)

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

Could someone affected please try the attached patch to see if it helps to rectify the problem? I think it should cause the backend to receive the shutdown signal a little bit earlier (and wait).

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

Marc:

I would generally agree with you, but we don't have a hard dependency on mysql currently because there is no such thing as a conditional job.

If the patch I posted above doesn't work, I do have another idea though.

We can have two different packages that own the upstart jobs:

mythtv-backend-master
mythtv-backend-slave

These packages would both conflict upon one another, but also both could resolve a dependency of mythtv-backend. The slave package would have a job that doesn't refer to mysql at all. The master package could have a job that depends on mysql for both shutdown and startup fixing the problems.

Changed in mythtv (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Mario Limonciello (superm1)
tags: added: patch
Revision history for this message
Mario Limonciello (superm1) wrote :

I've done some basic testing with that patch and seem to think it resolves the issue at hand. I haven't encountered any situations where i'm receiving errors about the backend not stopping anymore.

I've committed the patch to the packaging tree for -fixes and -trunk.
Anyone with the issue can update to the latest 0.24 or 0.25 autobuilds to receive the patch or manually modify their upstart job to include it.

Changed in mythtv (Ubuntu):
status: In Progress → Fix Committed
milestone: ubuntu-10.04 → none
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 2:0.24.0+fixes.20101207.d3d2640-0ubuntu1

---------------
mythtv (2:0.24.0+fixes.20101207.d3d2640-0ubuntu1) natty; urgency=low

  [ Mario Limonciello ]
  * Modify the get-orig-source rule to use launchpadlib to try to fetch the file
    from the archive instead.
  * Stop on runlevels [016] rather than on the start of shutdown job. (LP: #542627)
  * Move packaging to git based commands.
  * If no themes are included, don't make bad theme stubs in debian/control.
  * Update control files.
  * Add an epoch because of the changing fixes->fixes and trunk->master to allow
    proper upgrades.
  * In ppa git checker helper, if no hash returned, don't error up.
  * If running on a master build, have the update-control-files rule recommends
    mythtv-dbg.
  * Update standards version.
  * Force pic support on as much of the build as possible. (LP: #684941)
  * Move mythweb's set -e into the script invokation to quiet lintian.
  * Add python dependency to mythtv-common.
  * Demote libmythtv-perl depends to recommends on mythtv-backend.
  * Don't run the permissions fix up on python files smaller than 1 block.
  * Fixup the extra docs cleanup for mythweb.
  * >>Upstream changes since last upload (11ee9c5):
  * [d3d2640] MythArchive: Update the script to look for the fonts in
    the new location.
  * [011ffd5] Fix file streaming to stay working past 4G
  * [ecbbcf8] Backport from master to fixes/0.24.
  * [fe9d48e] Move toLower to the correct location
  * [e4ea220] Add gitignores to fixes/0.24 too
  * [dc4868a] Tweak PWD in the Makefile to be more specific

  [ Thomas Mashos ]
  * Make mythplugins replace mythmovies
  * Make mythplugins replace mythmovies in debian/control.in
 -- Mario Limonciello <email address hidden> Tue, 07 Dec 2010 02:42:49 -0600

Changed in mythtv (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.