[mythtv] Possibility of adding a watchdog?
reza at reza.net
Thu Aug 28 20:48:08 EDT 2003
Ok, yes, it is better to fix, and I've already fixed several bugs that
I've had (and sent in patches), but there are still others, and I still
can't get gdb to work sufficiently to do any real debugigng -- I've just
been adding a series of printf's throughout the code. And I've not
been able to get anyone to share their debugging enviornment setup with
me, so my ablility to fix problems is limited.
In my previous life, I was a lead in the monitor engineering dept of my
last company. Even major software applications with lots of $$ poured
into them still have bugs and still have watchdog applications to
monitor them (or else our group would write 'me). Relying on a while()
loop is not sufficient for my problems as mythbackend or frontend will
freeze and not die (ie. when a recorded show ends playing, when
changing channels, etc..)
Since the backend already has a server, it should be easy to incorporate
the code into mythfrontend and add some 'monitoring' routines. It would
be very useful to add various metrics to monitor internals of various
functions -- i.e. time spent in various encoding/decoding routines,
number of skipped frames, etc... and be able to retieve them via the
On Thu, Aug 28, 2003 at 09:48:10PM -0400, Rick Warner sent me this...
> On Thursday 28 August 2003 08:57 pm, Isaac Richards wrote:
> > On Thursday 28 August 2003 08:48 pm, Michael J. Pedersen wrote:
> > > On Thu, Aug 28, 2003 at 05:52:10PM -0400, Isaac Richards wrote:
> > > > > I'm still having crashing issues, and I was wondering if there would
> > > > > be any arguments against having a 3rd process started to act as a
> > > > > watchdog.. basically, it would query the mythbackend via it's tcp
> > > > > ctrl ports to verify that it's up and restart it if it's not
> > > > > responding. The same would apply to mythfrontend, but we'll need to
> > > > > add support for it to listen to a tcp socket and respond.
> > > > > Any thoughs/objections?
> > > >
> > > > Yes. It's always better to fix the source of the bug, and not bandaid
> > > > it. Since you can't get gdb working on your distribution, I'd suggest
> > > > switching to another distro.
> > >
> > > Isaac, I've got to chime in on this one. Having such a watchdog function
> > > would be VERY good, for one simple reason: If MythTV crashes at 2pm, and
> > > I don't get home until 6pm, I've lost any recordings that would have
> > > occurred during that time window. Having a watchdog which would restart
> > > the backend would be an excellent idea, so that I don't lose said
> > > recordings.
> > If you're that worried about it, put it in a shell script with a while (1)
> > loop. No need for a watchdog daemon.
> > Isaac
> I already do this but still have problems... the backend occasionally goes
> into a "weird state" where it is still running but does not respond
> i know i should probably upgrade to latest cvs again (i'm running cvs from
> about a week b4 .11 came out).. but it's working so well otherwise
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
More information about the mythtv-dev