[vdr] Re: Watchdog kicks in, 1.3.28, 1.3.29

Marcel Wiesweg marcel.wiesweg at gmx.de
Wed Aug 17 14:27:48 CEST 2005

Am Dienstag 16 August 2005 19:22 schrieb Malte Schröder:
> >>>I will try LD_ASSUME_KERNEL, let's see ...
> >>
> >>Seems to "fix" the problem .. so how can we debug this?
> >
> > See if the problem exists running under gdb as well. If it does, set a
> > breakpoint to the watchdog function (maybe gdb catches SIGALRM before).
> > When the watchdog expires, get a bt from all threads (thread apply all
> > bt) and examine where the main thread is hanging.
> > If the error does not occur, let VDR segfault in Watchdog() (something
> > like (*((int *)0))++; will do this), and examine the core file (set
> > ulimit -c unlimited)
> The backtrace is attached (thread 1 moved to top).

The backtrace suggests something is wrong in DvbTuner: Either the poll() in 
thread 2 does not return, or there is some sort of deadlock.
Unfortunately I cannot reproduce the problem here.
First you might try if the attached patch fixes the problem.
If not, please put printfs around Lock() and Unlock() in dvbtuner.c line 129, 
138, 299, 339, and possibly around the poll in line 157 as well, such as

printf("DvbTuner::Set: Now locking mutex\n");
printf("DvbTuner::Set: Lockedmutex\n");
printf(""DvbTuner::Set: Unlocking mutex");

and capture the output  to a file.


> > Marcel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dvbtuner-one-mutex.diff
Type: text/x-diff
Size: 2749 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20050817/f836a554/dvbtuner-one-mutex.bin

More information about the vdr mailing list