Mailing List archive

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

[vdr] Re: vdr[3330]: ERROR: can't record MPEG1! - possible cause



Andreas Schultz wrote:
> 
> Hi,
> 
> Klaus Schmidinger wrote:
> 
> [...]
> 
> > I've done that now (in thread.h for the moment) and have uploaded a modified
> > patch to
> >
> >   ftp://ftp.cadsoft.de/pub/etc/vdr/mutex.diff
> >
> > in which I have generally made the mutexes recursive.
> > Unfortunately, after a few channel switchings, there appears to be
> > a deadlock of some kind and I need to "kill -9" VDR...
> > Did I do something wrong?
> 
> Something very small, but it is unlikely to be the problem,
> 
>   // --- cThread
> ---------------------------------------------------------------
> @@ -96,8 +94,7 @@
>        signalHandlerInstalled = true;
>        }
>     running = false;
> -  parentPid = threadPid = lockingPid = 0;
> -  locked = 0;
> +  parentPid = threadPid;
>   }
>      ^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> this should be 'parentPid = threadPid = 0;'

Outch - I hate it when that happens...

> I tested it now, and it appears to run, haven't tested the channel
> switching though.

Channel switching still hangs. The first switch works (as it did before this latest
fix), but the second one hangs and I have to 'kill -9' VDR.

For those interested in testing this, too, I have uploaded the fixed version to

   ftp://ftp.cadsoft.de/pub/etc/vdr/mutex.diff

again.

> BTW: Putting the cMutex::Lock() and cMutex::Unlock() in the header will
> result in better optimized code as the compiler can inline both methods.

I'll do that as soon as it actually works.

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
_______________________________________________________________



Home | Main Index | Thread Index