[mythtv] SEGV in DVBRecorder::QualityMonitorHelper

Nick Craig-Wood ncw1 at axis.demon.co.uk
Fri Jun 18 12:12:33 EDT 2004


On Tue, Jun 15, 2004 at 08:09:59AM +0100, Nick Craig-Wood wrote:
> I've been trying to track down an intermittent crash (only every
> couple of days) in 0.15.1.
> 
> Since gdb deals so badly with threads I rigged up mythtv to dump core
> (ulimit -c 1000000).  This then just dumps the core of the one thread
> that SEGVs which is much easier to deal with!
> 
> mythtv at crate:~$ gdb -d ../mythtv-0.15.1/libs/libmythtv -s mythbackend-symbols ./mythbackend core.mythbackend.1087248912.26429
> GNU gdb 6.1-debian
> Copyright 2004 Free Software Foundation, Inc.
> [snip]
> (gdb) bt
> #0  0x4129cb22 in pthread_mutex_lock () from /lib/libpthread.so.0
> #1  0x403913e6 in DVBRecorder::QualityMonitorThread (this=0x81284b8)
>     at dvbrecorder.cpp:830
> #2  0x4039190f in DVBRecorder::QualityMonitorHelper (self=0x390020)
>     at dvbrecorder.cpp:865
> #3  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
> #4  0x414a266a in clone () from /lib/libc.so.6
> (gdb) up
> #1  0x403913e6 in DVBRecorder::QualityMonitorThread (this=0x81284b8)
>     at dvbrecorder.cpp:830
> 830                 pthread_mutex_lock(db_lock);
> (gdb) l
> 825     
> 826             if (cardid >= 0 &&
> 827                 db_conn != NULL && db_lock != NULL && dvbchannel != NULL &&
> 828                 dvbchannel -> FillFrontendStats(fe_stats))
> 829             {
> 830                 pthread_mutex_lock(db_lock);
> 831     
> 832                 QualityMonitorSample(cardid, fe_stats);
> 833     
> 834                 pthread_mutex_unlock(db_lock);
> (gdb) print db_lock
> $1 = (pthread_mutex_t *) 0x390020
> (gdb) print *db_lock
> Cannot access memory at address 0x390020
> 
> So db_lock appears to have been corrupted.
> 
> I wouldn't like to guess exactly why though not without studying the
> program a lot more!
> 
> I've put the core file, binary and symbols here so anyone can
> replicate the above ( 5 MB!)
> 
>   http://www.craig-wood.com/nick/mythtv-crash.tar.bz2
> 
> This could of course be a memory trample from another thread so I'll
> see if I can capture another core...

An update to this...

I caught 3 core files all with exactly the same crash in (different
corrupted values but SEGV in exactly the same point).

I've disabled the DVB media monitor and I haven't had a crash for 2.5
days.

So its looking fairly conclusive that there is a problem in that
particlular bit of code.

-- 
Nick Craig-Wood
ncw1 at axis.demon.co.uk


More information about the mythtv-dev mailing list