Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Annoying EMERGENCY EXITs



Rene Bartsch wrote:
> 
> Am Die, 2003-06-10 um 22.20 schrieb Klaus Schmidinger:
> > Rene Bartsch wrote:
> > >
> > > Hi,
> > >
> > > we have a nice weather out here with lightnings.
> > >
> > > This causes VDR to restart and reload the driver once per minute for the
> > > last hour! This also causes high load on the server up to 100% (zig-zag
> > > scanning from driver up to 40%, insmodding 90 %, ...)
> > >
> > > So I think it is important to overwork the error-handling in VDR.
> > >
> > > VDR should differ which kind of error it has. I think only one out of
> > > 200 hundred restarts is really caused by the driver.
> >
> > Well, simply change cThread::EmergencyExit() to
> >
> > bool cThread::EmergencyExit(bool Request)
> > {
> >   if (!Request)
> >      return emergencyExitRequested;
> >   esyslog("initiating emergency exit");
> >   return false; // <--------- insert this line
> >   return emergencyExitRequested = true; // yes, it's an assignment, not a comparison!
> > }
> >
> > That way you'll still see when VDR would have requested an emergency
> > exit, but won't let it actually do it.
> >
> > Let's know the outcome.
> >
> 
> Ok, I'll check it when I'm home at weekend.
> 
> In which file is it (didn't find fitting code in vdr.c - only two
> similar ones I'm not sure they're the correct ones)?

kls@hawk2:/home/kls/vdr/VDR > grep EmergencyExit *.h
thread.h:  static bool EmergencyExit(bool Request = false);

So my guess would be it's in thread.c ;-)

> ...
> So VDR should check itself

That's what it does with the watchdog timer ;-)

> and if it is running well it shouldn't
> restart but check the state of the driver.

And how exactly do you suppose that should work?
How do you "check the state of the driver"?
If VDR is recording, and there is no more data coming
in, chances are the driver has run into trouble.

> If driver has crashed it
> should reload the driver only without restarting itself.

I'd really like to see how that would work!
To reload the driver VDR needs to close all its file handles
and most likely to exit in order to allow the surrounding script to
do the driver reload, in case it is not running as 'root'.

> And if both are
> running fine it should do nothing and wait until reception is back
> (maybe some info "DVB xy unavailable" in logs and on OSD)

Maybe we should connect VDR to some weather station, so it "knows"
when there is bad wheather ;-)

Get serious - how should VDR tell that "bad weather" is the cause of
the problems? The only thing I could imagine that might work is to
limit the time after which another emergency exit may happen.
Please implement that, test it, and if it improves things, send a patch.
But keep in mind that VDR can't look out the window to see what the
current weather conditions are ;-)

> In case one card fails but enough cards are left for recording, VDR also
> shouldn't restart but wait for the recordings to end.

As far as I can see emergency exits are only done if an ongoing recording
is having trouble. So it makes no sense to me _not_ to do an emergency exit
if recording A is having trouble on card 1, just because recording B is running
fine on card 2. I'd rather have a short glitch in recording B and still get
the rest of recording A than have an uninterrupted recording B and miss
half or all of recording A.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index