Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

mythbackend crashes / watchdog

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


hamish at cloud

Feb 16, 2004, 5:44 AM

Post #1 of 16 (6114 views)
Permalink
mythbackend crashes / watchdog

Hi all,

Has anyone developed a script which would start mythbackend and
automatically restart it when it crashes? And keeps the coredumps?

It crashed part way through a big recording schedule I had set up for
tonight. Not too impressed. I'm running the CVS code. It's recorded okay
before. It didn't seem to be doing anything in particular, just
recording.

Certain MPEG data causes the MPEG decoder to crash. Usually that's the
frontend, but the same code runs to post-process recordings (for ad
skipping) and that will crash the whole backend. The ad scanning should
be done in a separate process so that it can't crash the backend.

High definition digital TV causes no end of confusion to the myth MPEG
decoder and will usually crash the decoder within minutes. :-(


Hamish
--
Hamish Moffatt VK3SB <hamish[at]debian.org> <hamish[at]cloud.net.au>


mythtv at eeeCooks

Feb 16, 2004, 6:14 AM

Post #2 of 16 (6088 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

Have you looked into daemontools (http://cr.yp.to/daemontools.html)?

I haven't tried it myself, but it sounds as though it'll do the trick.
In fact, I may have to give it a try myself as myth crashes quite
frequently for me as well (my fault for upgrading too much at once -
kernel, nvidia drivers, myth...).


On Mon, Feb 16, 2004 at 11:44:42PM +1100, Hamish Moffatt wrote:
> Hi all,
>
> Has anyone developed a script which would start mythbackend and
> automatically restart it when it crashes? And keeps the coredumps?
>
> It crashed part way through a big recording schedule I had set up for
> tonight. Not too impressed. I'm running the CVS code. It's recorded okay
> before. It didn't seem to be doing anything in particular, just
> recording.
>
> Certain MPEG data causes the MPEG decoder to crash. Usually that's the
> frontend, but the same code runs to post-process recordings (for ad
> skipping) and that will crash the whole backend. The ad scanning should
> be done in a separate process so that it can't crash the backend.
>
> High definition digital TV causes no end of confusion to the myth MPEG
> decoder and will usually crash the decoder within minutes. :-(
>
>
> Hamish
> --
> Hamish Moffatt VK3SB <hamish[at]debian.org> <hamish[at]cloud.net.au>


mark_kendall at btinternet

Feb 16, 2004, 6:28 AM

Post #3 of 16 (6077 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

> Has anyone developed a script which would start mythbackend and
> automatically restart it when it crashes? And keeps the coredumps?

I'm currently using inittab to launch the backend - something someone
mentioned on this list recently. The following entry works for me and
ensures the backend is always up (although it rarely goes down these days
anyway):-

# Run the mythbackend
myth:2345:respawn:/usr/local/bin/mythbackend

Can't comment on retaining coredumps though.

> It crashed part way through a big recording schedule I had set up for
> tonight. Not too impressed. I'm running the CVS code. It's recorded okay
> before. It didn't seem to be doing anything in particular, just
> recording.
>
> Certain MPEG data causes the MPEG decoder to crash. Usually that's the
> frontend, but the same code runs to post-process recordings (for ad
> skipping) and that will crash the whole backend. The ad scanning should
> be done in a separate process so that it can't crash the backend.
>
> High definition digital TV causes no end of confusion to the myth MPEG
> decoder and will usually crash the decoder within minutes. :-(

I'm running a DVB setup with twin Nova-Ts. Using the local frontend viewing
etc is pretty much flawless now (bar some oddities with aspect ratio that
I'm trying to resolve) and using minimyth on an EPIA M10K is almost
flawless - the OSD causes problems and watching sport/action on the BBC/high
bitrate channels causes prebuffering pauses - have pretty much decided that
the hardware MPEG decoder can't cope with 15MBs and lots of action!

Ignoring the EPIA issues, both frontends will happily watch live tv for
hours on end...

I'd imagine that the root of your problem is signal quality/error rate?
(from memory you're using DVB as well) - are you seeing packet loss errors?

Cheers

Mark



----------------------------------------------------------------------------
----


_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


atd7 at cornell

Feb 16, 2004, 9:15 AM

Post #4 of 16 (6109 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

Quoting Hamish Moffatt <hamish[at]cloud.net.au>:

> Hi all,
>
> Has anyone developed a script which would start mythbackend and
> automatically restart it when it crashes? And keeps the coredumps?
>
> It crashed part way through a big recording schedule I had set up for
> tonight. Not too impressed. I'm running the CVS code. It's recorded okay
> before. It didn't seem to be doing anything in particular, just
> recording.
>
> Certain MPEG data causes the MPEG decoder to crash. Usually that's the
> frontend, but the same code runs to post-process recordings (for ad
> skipping) and that will crash the whole backend. The ad scanning should
> be done in a separate process so that it can't crash the backend.
>
> High definition digital TV causes no end of confusion to the myth MPEG
> decoder and will usually crash the decoder within minutes. :-(

Do a search in the archives for "restartmythonerror.cron" or "Misc tips and
tricks for RedHat + ivtv users" (or something like that.)

My script currently only restarts the backend if the logs indicate that it died
due to an ivtv I/O error (and reloads the ivtv module also), but it can be
modified to start mythbackend if it dies.

Attached is a script I use to start mythfrontend only if it isn't running
already (Which I currently have bound to be called by irexec when the power
button is hit on one of my remotes). Easily modifiable to run mythbackend in a
cron job.
Attachments: startmythonce.sh (0.23 KB)


bdillahu at peachbush

Feb 16, 2004, 10:42 AM

Post #5 of 16 (6072 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

> Quoting Hamish Moffatt <hamish[at]cloud.net.au>:
>
>
> My script currently only restarts the backend if the logs indicate that it
> died
> due to an ivtv I/O error (and reloads the ivtv module also), but it can be
> modified to start mythbackend if it dies.
>
> Attached is a script I use to start mythfrontend only if it isn't running
> already (Which I currently have bound to be called by irexec when the
> power
> button is hit on one of my remotes). Easily modifiable to run mythbackend
> in a
> cron job.
>

Thanks for the info... very handy!

Bruce
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


ijr at po

Feb 16, 2004, 11:10 AM

Post #6 of 16 (6050 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

On Monday 16 February 2004 07:44 am, Hamish Moffatt wrote:
> Hi all,
>
> Has anyone developed a script which would start mythbackend and
> automatically restart it when it crashes? And keeps the coredumps?

That's a _much_ better idea than getting backtraces and reporting them
properly!

Isaac
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


gjhurlbu+mythtv-users at beirdo

Feb 16, 2004, 2:56 PM

Post #7 of 16 (6068 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

Isaac Richards <ijr[at]po.cwru.edu> wrote:
> On Monday 16 February 2004 07:44 am, Hamish Moffatt wrote:
>> Hi all,
>>
>> Has anyone developed a script which would start mythbackend and
>> automatically restart it when it crashes? And keeps the coredumps?

> That's a _much_ better idea than getting backtraces and reporting them
> properly!

Is there any particular reason that you seem to think it's necessary to respond
in such a cynical manner to nearly every question?

The fact that the original poster wants to keep the coredumps leads me to think
that he may want to send in the backtraces (why else keep coredumps?!), but
also that his priority is in keeping the backend running so his recordings
happen. What's so improper about that?

Sigh
Gavin.


hamish at cloud

Feb 16, 2004, 3:06 PM

Post #8 of 16 (6066 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

On Mon, Feb 16, 2004 at 01:10:26PM -0500, Isaac Richards wrote:
> On Monday 16 February 2004 07:44 am, Hamish Moffatt wrote:
> > Hi all,
> >
> > Has anyone developed a script which would start mythbackend and
> > automatically restart it when it crashes? And keeps the coredumps?
>
> That's a _much_ better idea than getting backtraces and reporting them
> properly!

Thanks for your sarcasm. I want the coredumps kept so that I can generate
those backtraces and report the problems. And I want Myth restarted
after it crashes because I want to use it too.


Hamish
--
Hamish Moffatt VK3SB <hamish[at]debian.org> <hamish[at]cloud.net.au>


ijr at po

Feb 16, 2004, 3:26 PM

Post #9 of 16 (6077 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

On Monday 16 February 2004 05:06 pm, Hamish Moffatt wrote:
> On Mon, Feb 16, 2004 at 01:10:26PM -0500, Isaac Richards wrote:
> > On Monday 16 February 2004 07:44 am, Hamish Moffatt wrote:
> > > Hi all,
> > >
> > > Has anyone developed a script which would start mythbackend and
> > > automatically restart it when it crashes? And keeps the coredumps?
> >
> > That's a _much_ better idea than getting backtraces and reporting them
> > properly!
>
> Thanks for your sarcasm. I want the coredumps kept so that I can generate
> those backtraces and report the problems. And I want Myth restarted
> after it crashes because I want to use it too.

Multithreaded coredumps very, very rarely work right in linux. The only
really reliable way to get a useable backtrace of a crash is to run the
program in gdb.

Isaac
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


bjm at lvcm

Feb 16, 2004, 3:42 PM

Post #10 of 16 (6088 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

Hamish Moffatt wrote:
> On Mon, Feb 16, 2004 at 01:10:26PM -0500, Isaac Richards wrote:
>
>>On Monday 16 February 2004 07:44 am, Hamish Moffatt wrote:
>>
>>>Hi all,
>>>
>>>Has anyone developed a script which would start mythbackend and
>>>automatically restart it when it crashes? And keeps the coredumps?
>>
>>That's a _much_ better idea than getting backtraces and reporting them
>>properly!
>
>
> Thanks for your sarcasm. I want the coredumps kept so that I can generate
> those backtraces and report the problems.

Did you have any particular year in mind?

> And I want Myth restarted
> after it crashes because I want to use it too.

If the backend crashes, the recording would be broken into
multiple parts. Wouldn't it make more sense to follow these
instructions:

http://www.mythtv.org/docs/mythtv-HOWTO-20.html#ss20.9

and post to get a solution rather than post to ask for a script
to ignore the problem?

I look forward to reading the contrived counter-arguments ;-).

-- bjm


hamish at cloud

Feb 16, 2004, 4:37 PM

Post #11 of 16 (6070 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

On Mon, Feb 16, 2004 at 05:26:46PM -0500, Isaac Richards wrote:
> On Monday 16 February 2004 05:06 pm, Hamish Moffatt wrote:
> > Thanks for your sarcasm. I want the coredumps kept so that I can generate
> > those backtraces and report the problems. And I want Myth restarted
> > after it crashes because I want to use it too.
>
> Multithreaded coredumps very, very rarely work right in linux. The only
> really reliable way to get a useable backtrace of a crash is to run the
> program in gdb.

OK, that's useful information. I wasn't aware of the coredump
limitation. Thanks.

It's not too convenient to run the backend in gdb all the time, but I
should be able to contribute something that way anyway.

Hamish
--
Hamish Moffatt VK3SB <hamish[at]debian.org> <hamish[at]cloud.net.au>


mythgnomer at rowelab

Feb 16, 2004, 4:53 PM

Post #12 of 16 (6070 views)
Permalink
RE: mythbackend crashes / watchdog [In reply to]

If the tire on your car blows out, why bother changing it until you've
reported it to firestone?

-----Original Message-----
From: mythtv-users-bounces[at]mythtv.org
[mailto:mythtv-users-bounces[at]mythtv.org] On Behalf Of Bruce Markey
Sent: Monday, February 16, 2004 4:42 PM
To: Discussion about mythtv
Subject: Re: [mythtv-users] mythbackend crashes / watchdog

Hamish Moffatt wrote:
> On Mon, Feb 16, 2004 at 01:10:26PM -0500, Isaac Richards wrote:
>
>>On Monday 16 February 2004 07:44 am, Hamish Moffatt wrote:
>>
>>>Hi all,
>>>
>>>Has anyone developed a script which would start mythbackend and
>>>automatically restart it when it crashes? And keeps the coredumps?
>>
>>That's a _much_ better idea than getting backtraces and reporting them
>>properly!
>
>
> Thanks for your sarcasm. I want the coredumps kept so that I can
> generate those backtraces and report the problems.

Did you have any particular year in mind?

> And I want Myth restarted
> after it crashes because I want to use it too.

If the backend crashes, the recording would be broken into multiple parts.
Wouldn't it make more sense to follow these
instructions:

http://www.mythtv.org/docs/mythtv-HOWTO-20.html#ss20.9

and post to get a solution rather than post to ask for a script to ignore
the problem?

I look forward to reading the contrived counter-arguments ;-).

-- bjm


hamish at cloud

Feb 16, 2004, 5:02 PM

Post #13 of 16 (6094 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

On Tue, Feb 17, 2004 at 10:37:13AM +1100, Hamish Moffatt wrote:
> On Mon, Feb 16, 2004 at 05:26:46PM -0500, Isaac Richards wrote:
> > On Monday 16 February 2004 05:06 pm, Hamish Moffatt wrote:
> > > Thanks for your sarcasm. I want the coredumps kept so that I can generate
> > > those backtraces and report the problems. And I want Myth restarted
> > > after it crashes because I want to use it too.
> >
> > Multithreaded coredumps very, very rarely work right in linux. The only
> > really reliable way to get a useable backtrace of a crash is to run the
> > program in gdb.
>
> OK, that's useful information. I wasn't aware of the coredump
> limitation. Thanks.

The multithreaded coredump limitation seems to be fixed in 2.6
(specifically, since 2.5.47; see http://kerneltrap.org/node/view/492 ),
so I think my original question is still valid.

Hamish
--
Hamish Moffatt VK3SB <hamish[at]debian.org> <hamish[at]cloud.net.au>


hamish at cloud

Feb 16, 2004, 5:04 PM

Post #14 of 16 (6069 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

On Mon, Feb 16, 2004 at 02:42:05PM -0800, Bruce Markey wrote:
> Hamish Moffatt wrote:
> >Thanks for your sarcasm. I want the coredumps kept so that I can generate
> >those backtraces and report the problems.
>
> Did you have any particular year in mind?

Well I've only been running myth for about a month and have only just
got this far, so I don't think I could've reported anything sooner.

> If the backend crashes, the recording would be broken into
> multiple parts. Wouldn't it make more sense to follow these
> instructions:
>
> http://www.mythtv.org/docs/mythtv-HOWTO-20.html#ss20.9
>
> and post to get a solution rather than post to ask for a script
> to ignore the problem?

You'll note that I wasn't ignoring the problem but wanted to keep
coredumps. Now Isaac says they don't work for multithreaded apps,
but that doesn't seem to be true any more.

Hamish
--
Hamish Moffatt VK3SB <hamish[at]debian.org> <hamish[at]cloud.net.au>


atd7 at cornell

Feb 16, 2004, 5:30 PM

Post #15 of 16 (6100 views)
Permalink
RE: mythbackend crashes / watchdog [In reply to]

Quoting mythgnomer[at]rowelab.com:

> If the tire on your car blows out, why bother changing it until you've
> reported it to firestone?
An excellent analogy.

In a "daily use" Myth installation, if the backend crashes only once every three
weeks of heavy usage, we're not exactly going to run it in GDB all the time just
to catch that ONE crash.

If the backend is crashing often, then yes, it's a good idea to run it inside
GDB... But if it's crashing extremely rarely, then the scripts being talked
about here are insurance. The ivtv "Input/output error" problem I created a
script to work around has only affected me twice in two months - While it would
be nice to fix the problem, it's so rare and intermittent (read: not
reproducable) that the chances of it being fixed by anything other than pure
luck are slim. So I have the script running to make sure I don't lose three
shows worth of recordings if ivtv barfs again. Which may never happen again,
but better safe than sorry.

As far as the recording being broken into multiple parts - I'd rather have my
recording broken into multiple parts if the backend crashes than not have the
end of a show (and any subsequent shows) recorded at all.

In an ideal world, the backend would never crash, and this discussion would be
moot. But this is the real world - People are actually trying to USE MythTV.

_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


ijr at po

Feb 16, 2004, 6:07 PM

Post #16 of 16 (6083 views)
Permalink
Re: mythbackend crashes / watchdog [In reply to]

On Monday 16 February 2004 07:30 pm, Andrew Dodd wrote:
> In an ideal world, the backend would never crash, and this discussion would
> be moot. But this is the real world - People are actually trying to USE
> MythTV.

Certainly, but from the text of the original query, it sounded as if the
crashes were _very_ easily repeatable. I can't fix problems like that if I
can't reproduce them. If I get a good backtrace, chances are I can fix it
easily and that helps everyone out, in the long run.

Isaac
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.