Mailing List Archive

Idea?
Hi all, Having been tied up at work lately I haven't been able to delve
into the source anywhere near as much as I would have liked, but...

Once in awhile myth would crash/hang, not often by any means but
sometimes it would just sit there not doing anything.

Anyways that's not the point I'm getting at.

What do you guys think of adding a watchdog to mythtv? You know add a
bit of code to mythtv that touches a file ever so often so that it can
be monitored by a second program and if mythtv does not touch the file
in say 15-30 seconds (maybe more...) the second program automatically
kills the currently running mythtv instance and restarts it. This
touched file can even contain the PIDs being used by myth to make for an
easy kill.

Please any feedback...


Calvin...
Re: Idea? [ In reply to ]
On Mon, Dec 23, 2002 at 02:43:01PM -0500, Calvin Harrigan wrote:

> What do you guys think of adding a watchdog to mythtv? You know add a bit
> of code to mythtv that touches a file ever so often so that it can be
> monitored by a second program and if mythtv does not touch the file in say
> 15-30 seconds (maybe more...) the second program automatically kills the
> currently running mythtv instance and restarts it. This touched file can
> even contain the PIDs being used by myth to make for an easy kill.
>
> Please any feedback...

If you know of any situation where mythtv does not behave correctly, and
instead hangs or crashes, then that is a bug which should be fixed.
Implementing a watchdog feature like this just serves to hide this kind of
bug, or keep people from reporting it, which is detrimental to the quality
of the software in the long run.

--
- mdz
Re: Idea? [ In reply to ]
On Mon, 2002-12-23 at 14:56, Matt Zimmerman wrote:
> On Mon, Dec 23, 2002 at 02:43:01PM -0500, Calvin Harrigan wrote:
>
> > What do you guys think of adding a watchdog to mythtv? You know add a bit
> > of code to mythtv that touches a file ever so often so that it can be
> > monitored by a second program and if mythtv does not touch the file in say
> > 15-30 seconds (maybe more...) the second program automatically kills the
> > currently running mythtv instance and restarts it. This touched file can
> > even contain the PIDs being used by myth to make for an easy kill.
> >
> > Please any feedback...
>
> If you know of any situation where mythtv does not behave correctly, and
> instead hangs or crashes, then that is a bug which should be fixed.
> Implementing a watchdog feature like this just serves to hide this kind of
> bug, or keep people from reporting it, which is detrimental to the quality
> of the software in the long run.
>
> --
> - mdz
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@snowman.net
> http://www.snowman.net/mailman/listinfo/mythtv-dev

You are probably right... Just throwing out ideas.

Calvin
Re: Idea? [ In reply to ]
On Monday 23 December 2002 20.43, Calvin Harrigan wrote:
> Hi all, Having been tied up at work lately I haven't been able to delve
> into the source anywhere near as much as I would have liked, but...
>
> Once in awhile myth would crash/hang, not often by any means but
> sometimes it would just sit there not doing anything.
>
> Anyways that's not the point I'm getting at.
>
> What do you guys think of adding a watchdog to mythtv? You know add a
> bit of code to mythtv that touches a file ever so often so that it can
> be monitored by a second program and if mythtv does not touch the file
> in say 15-30 seconds (maybe more...) the second program automatically
> kills the currently running mythtv instance and restarts it. This
> touched file can even contain the PIDs being used by myth to make for an
> easy kill.

If we need a watchdog then we had all better go back to win95, there it would
be useful. Seriously though this type of application shouldn't need one. I
use watchdogs in embedded stuff but there are quite different animals. They
shouldn't need them either but some of the embedded guys I work with don't
realise that :)

tony

--
Contract ASIC and FPGA design.
Telephone
+46 702 894 667
Re: Idea? [ In reply to ]
On Mon, 2002-12-23 at 15:11, Tony Clark wrote:
> On Monday 23 December 2002 20.43, Calvin Harrigan wrote:
> > Hi all, Having been tied up at work lately I haven't been able to delve
> > into the source anywhere near as much as I would have liked, but...
> >
> > Once in awhile myth would crash/hang, not often by any means but
> > sometimes it would just sit there not doing anything.
> >
> > Anyways that's not the point I'm getting at.
> >
> > What do you guys think of adding a watchdog to mythtv? You know add a
> > bit of code to mythtv that touches a file ever so often so that it can
> > be monitored by a second program and if mythtv does not touch the file
> > in say 15-30 seconds (maybe more...) the second program automatically
> > kills the currently running mythtv instance and restarts it. This
> > touched file can even contain the PIDs being used by myth to make for an
> > easy kill.
>
> If we need a watchdog then we had all better go back to win95, there it would
> be useful. Seriously though this type of application shouldn't need one. I
> use watchdogs in embedded stuff but there are quite different animals. They
> shouldn't need them either but some of the embedded guys I work with don't
> realise that :)
>
> tony
>
> --
> Contract ASIC and FPGA design.
> Telephone
> +46 702 894 667
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@snowman.net
> http://www.snowman.net/mailman/listinfo/mythtv-dev

Funny you mention embeded guys, that's what I do...
Some lessons are hard to forget I guess.

Calvin...
Re: Idea? [ In reply to ]
Tony Clark <tclark@telia.com> wrote:
> If we need a watchdog then we had all better go back to win95, there it would
> be useful. Seriously though this type of application shouldn't need one. I
> use watchdogs in embedded stuff but there are quite different animals. They
> shouldn't need them either but some of the embedded guys I work with don't
> realise that :)

When your really serious about your embedded device, you don't want it
to not be operational. Its almost impossible these days to test every
single test case of every input/output possiblity and all states that
the device can get into. Consequently, its a nice safeguard to throw
in the watchdog.

Granted, it should't crash. But its nice when it does (because it will)
to have automatic recovery.

How about having the watchdog write a log message, and have Myth present
the log on launch if the last launch resulted in a crash. Similiar
to Windows knowing you did a good shutdown vs. a bad shutdown and
forcing fdisk to run on startup. :) If the last run crashed, Myth
shows a message. If it didn't, no message.

This might be able to turn into a nice way to send feedback to the
developer. If you have gdb installed and built Myth with debugging
symbols on you can get a stack trace from the core, email it out,
and delete the core - all from the comfort of the couch and the remote
control. Just throw a button "Send Crash Info to Developers" in that
message box to kick off a shell script doing this work.

--
Shawn.
Re: Idea? [ In reply to ]
> Van: Shawn Pearce <spearce@spearce.org>
>
> How about having the watchdog write a log message, and have Myth present
> the log on launch if the last launch resulted in a crash. Similiar
> to Windows knowing you did a good shutdown vs. a bad shutdown and
> forcing fdisk to run on startup. :) If the last run crashed, Myth
> shows a message. If it didn't, no message.

LOL, running fdisk? (MS fdisk is a cruel MS-DOS based partition program)

I do know there's hole in IE (at least an older version), where a webpage
could acces your disk. Someone wrote a page that would kill your win.com
(still the program that bootstraps MS Windows), and put a "Please upgrade
your system to Linux" message at boot time. Talking about watchdogs ;-)

Anyways, sounds a bit like a bad idea, but on the other hand... if you run
your system sole as a VCR Deluxe, you'll probably like it.

Henk Poley <><