Jamu exits(1) when multiple instances are executed (such as if tvdb is down and one doesn't time out)

Bug #502051 reported by Stefan Pappalardo
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mythbuntu
Invalid
Low
Unassigned
mythplugins (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Since the last Update (weekly build) I get every hour a mail with the following text.

   run-parts: /etc/cron.hourly/mythvideo exited with return code 1

+++ Additional Information +++
Description: Ubuntu 9.10
Release: 9.10
mythvideo:
  Installiert: 0.22.0+fixes23034-0ubuntu0+mythbuntu3
  Kandidat: 0.22.0+fixes23034-0ubuntu0+mythbuntu3
  Versions-Tabelle:
 *** 0.22.0+fixes23034-0ubuntu0+mythbuntu3 0
        500 http://weeklybuilds.mythbuntu.org karmic/main Packages
        100 /var/lib/dpkg/status
     0.22.0+fixes22594-0ubuntu1 0
        500 http://de.archive.ubuntu.com karmic/multiverse Packages

Revision history for this message
Mario Limonciello (superm1) wrote : Re: [Bug 502051] [NEW] run-parts: /etc/cron.hourly/mythvideo exited with return code 1

Can you try running it manually and see if there is any other output?
What was the last functional version?

On 01/01/2010, Stefan Pappalardo <email address hidden> wrote:
> Public bug reported:
>
> Since the last Update (weekly build) I get every hour a mail with the
> following text.
>
> run-parts: /etc/cron.hourly/mythvideo exited with return code 1
>
> +++ Additional Information +++
> Description: Ubuntu 9.10
> Release: 9.10
> mythvideo:
> Installiert: 0.22.0+fixes23034-0ubuntu0+mythbuntu3
> Kandidat: 0.22.0+fixes23034-0ubuntu0+mythbuntu3
> Versions-Tabelle:
> *** 0.22.0+fixes23034-0ubuntu0+mythbuntu3 0
> 500 http://weeklybuilds.mythbuntu.org karmic/main Packages
> 100 /var/lib/dpkg/status
> 0.22.0+fixes22594-0ubuntu1 0
> 500 http://de.archive.ubuntu.com karmic/multiverse Packages
>
> ** Affects: mythbuntu
> Importance: Undecided
> Status: New
>
> ** Affects: mythvideo (Ubuntu)
> Importance: Undecided
> Status: New
>
> ** Also affects: mythvideo (Ubuntu)
> Importance: Undecided
> Status: New
>
> --
> run-parts: /etc/cron.hourly/mythvideo exited with return code 1
> https://bugs.launchpad.net/bugs/502051
> You received this bug notification because you are a member of Mythbuntu
> Developers, which is subscribed to Mythbuntu.
>

--
Sent from my mobile device

Mario Limonciello
<email address hidden>

Revision history for this message
Stefan Pappalardo (sjuk) wrote : Re: run-parts: /etc/cron.hourly/mythvideo exited with return code 1

Running the cronjob manually doesn't give more.
[..]
sudo run-parts --report /etc/cron.hourly
run-parts: /etc/cron.hourly/mythvideo exited with return code 1
[..]

Running /etc/cron.hourly/mythvideo manually doesn't give anything.
[..]
sudo /etc/cron.hourly/mythvideo
[..]

Looking at /etc/cron.hourly/mythvideo
[..]
#!/bin/sh
#Hourly massive update to ensure users see graphics coming in for upcoming recordings and current recordings
DIRECTORY=$(grep ^mythtv /etc/passwd | awk -F : '{print $6}')
if [ -f "$DIRECTORY/.mythtv/config.xml" ]; then
    su mythtv -c "/usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW >> '/var/log/mythtv/jamu.log'"
fi
[..]

There is no time and date in /var/log/mythtv/jamu.log. So I only can attach it.

Revision history for this message
Stefan Pappalardo (sjuk) wrote :

The last functional version was "0.22.0+fixes22564-0ubuntu1 (karmic)" I think.

At some point I can find this in the jamu.log. This could be a hint.
[..]
! Error: An instance of Jamu (-MW) is already running only one instance can run at a time.
One of the meta data sources may be off-line or very slow.
[..]

A "ps axf | grep myth" gives me that.
[..]
  872 ? Ss 0:00 /bin/su -c /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log mythtv
 1308 ? S 0:00 \_ sh -c /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log
 1309 ? Sl 116:17 \_ /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log
18822 ? S 0:00 \_ /bin/sh /etc/cron.hourly/mythvideo
18826 ? S 0:00 \_ su mythtv -c /usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW >> '/var/log/mythtv/jamu.log'
18834 ? S 0:00 \_ sh -c /usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW >> '/var/log/mythtv/jamu.log'
18835 ? S 0:00 \_ /usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW
 7071 pts/1 S+ 0:00 \_ grep myth
 2155 ? Ss 0:00 \_ /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session /usr/share/mythbuntu/session.sh
 2158 ? S 0:00 /usr/bin/dbus-launch --exit-with-session /usr/share/mythbuntu/session.sh
 2708 ? Sl 4:18 /usr/bin/mythlcdserver -v none
30596 ? S 0:03 /usr/bin/perl /usr/bin/mythexport-daemon
 1725 ? Ssl 724:15 /usr/bin/mythfrontend.real --logfile /var/log/mythtv/mythfrontend.log
 1817 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1819 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1822 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1825 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1827 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1829 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1832 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1835 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1849 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1852 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1854 ? Z 0:00 \_ [mythfrontend.re] <defunct>
 1858 ? Z 0:00 \_ [mythfrontend.re] <defunct>
12726 ? SN 0:00 /usr/bin/mythtranscode -j 181 -V 3 -p autodetect -l
[..]

Revision history for this message
John Ferlito (johnf-inodes) wrote :

This is an upstream problem. The code uses sys.exit(True) where is should be using False and vice vera.

eg
                # Check if this is a Scheduled and Recorded graphics download request
                if self.config['mythtv_watched']:
                        self._downloadScheduledRecordedGraphics()
                        sys.exit(True)

is using True to indicate success. Switching the line above solves the problem for the cronjob but the whole code base needs a review.

Revision history for this message
John Ferlito (johnf-inodes) wrote :

This has been fixed upstream http://svn.mythtv.org/trac/ticket/7560

Revision history for this message
Mario Limonciello (superm1) wrote : Re: [Bug 502051] Re: run-parts: /etc/cron.hourly/mythvideo exited with return code 1

That change was committed 7 weeks ago. This build that the reporter is
running is quite fresh. He's also provided a "last functional" build to
base a comparison on from his broken one.

On Sat, Jan 2, 2010 at 22:00, John Ferlito <email address hidden> wrote:

> This has been fixed upstream http://svn.mythtv.org/trac/ticket/7560
>
> --
> run-parts: /etc/cron.hourly/mythvideo exited with return code 1
> https://bugs.launchpad.net/bugs/502051
> You received this bug notification because you are a member of Mythbuntu
> Developers, which is subscribed to Mythbuntu.
>

--
Mario Limonciello
<email address hidden>

affects: mythvideo (Ubuntu) → mythplugins (Ubuntu)
Revision history for this message
Mario Limonciello (superm1) wrote : Re: run-parts: /etc/cron.hourly/mythvideo exited with return code 1

So after talking this over with the Jamu author, he suspects this is caused by prolonged outtages of tvdb. When a second instance of jamu spawns for the hourly cron job, it sees another running instance and causes an exit(1) code.

He will make this change upstream so that it will exit(0) instead if another instance is running.

Changed in mythbuntu:
status: New → Triaged
Changed in mythplugins (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in mythbuntu:
importance: Undecided → Low
summary: - run-parts: /etc/cron.hourly/mythvideo exited with return code 1
+ Jamu exits(1) when multiple instances are executed (such as if tvdb is
+ down and one doesn't time out)
MarcRandolph (mrand)
Changed in mythplugins (Ubuntu):
status: Triaged → In Progress
Changed in mythbuntu:
status: Triaged → Invalid
Revision history for this message
Mario Limonciello (superm1) wrote :

This has been fixed upstream on their trunk repository. It will be available in the 0.23 autobuilds or later. This bug will be automatically closed when such a build is uploaded to the current Ubuntu development release (Lucid Lynx).

Changed in mythplugins (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythplugins - 0.23.0~trunk23567-0ubuntu1

---------------
mythplugins (0.23.0~trunk23567-0ubuntu1) lucid; urgency=low

  [ Jean-Yves Avenard ]
  * debian/control:
    - Add mythnetvision package

  [ Mario Limonciello ]
  * New snapshot.
  * Fixes Jamu crashes (LP: #507703, #459426)
  * Fixes jamu exiting w/ the wrong code (LP: #502051)
  * Fixes ttvdb.py crashes (LP: #508086)
  * debian/control:
    - Recommends libmath-round-perl for mythweb streaming support.
    - Drop mythflix support
  * debian/rules:
    - Drop mythflix support
  * debian/mcc-jamu, debian/mythvideo.install:
    - Add a Jamu MCC plugin that's only installed if mythvideo is installed.
      (LP: #516226)
  * debian/control:
    - Mark mythvideo as enhancing MCC.
  * Convert package to v3 w/ quilt
  * Convert package to use dh7
  * Drop mytharchive-data package. Just put all that stuff in mytharchive.
    mytharchive-data has no functional purpose as a standalone.
 -- Mario Limonciello <email address hidden> Tue, 16 Feb 2010 22:57:41 -0600

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

Bug attachments

Remote bug watches

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