[mythtv] mythbackend 0.15.1 crash + gdb backtrace

Nick Craig-Wood ncw1 at axis.demon.co.uk
Wed Jun 9 14:02:47 EDT 2004


My mythbackend (from debian packages) keeps crashing.  It seems to
crash just after recording the BBC News (which I do every day).  This
program is unusal for me as I only keep 2 episodes of it (I usually
just let everything else auto-expire).

I've left it running again but set the ulimit so it will dump core
(using the new core_pattern feature).  Hopefully that might be useful.

If you run mythbackend not under the debugger this crash causes it to
disappear (and I'm hoping I've made it dump core if this happens
again).  However if you run it under gdb it just hangs and the
frontends lose contact with it.  Probably something to do with threads
and gdb.

Here is the crash dump with the middle 5000 lines snipped out (when it
was working fine!)

$ gdb -s /usr/lib/debug/usr/bin/mythbackend mythbackend
GNU gdb 6.1-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) handle SIGPIPE nostop
Signal        Stop	Print	Pass to program	Description
SIGPIPE       No	Yes	Yes		Broken pipe
(gdb) run --verbose all
Starting program: /usr/bin/mythbackend --verbose all
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 4592)]
Starting up as the master server.
2004-06-08 13:15:12 DVB#0 Using DVB card 0, with frontend Philips TDA10045H.
2004-06-08 13:15:12 DVB#0 Trying to tune to channel 1.
2004-06-08 13:15:12 DVB#0 Frequency: 505833333. BW:8Mhz HP:3/4 LP:3/4 C:16 TM:2K H:None GI:1/32
2004-06-08 13:15:13 DVB#0 Waiting for frontend event after tune.
2004-06-08 13:15:13 DVB#0 WARNING - Status: NO LOCK!
2004-06-08 13:15:13 DVB#0 Status: CARRIER | VITERBI | SIGNAL | SYNC | LOCK.
2004-06-08 13:15:13 DVB#0 Successfully tuned to channel 1.
[New Thread 32769 (LWP 4603)]
[New Thread 16386 (LWP 4604)]
[New Thread 32771 (LWP 4605)]
2004-06-08 13:15:13 DVB#1 Using DVB card 1, with frontend Philips TDA10045H.
2004-06-08 13:15:13 DVB#1 Trying to tune to channel 3.
2004-06-08 13:15:13 DVB#1 Frequency: 481833333. BW:8Mhz HP:1/2 LP:2/3 C:64 TM:2K H:None GI:1/32
2004-06-08 13:15:14 DVB#1 Waiting for frontend event after tune.
2004-06-08 13:15:14 DVB#1 WARNING - Status: NO LOCK!
2004-06-08 13:15:14 DVB#1 Status: CARRIER | VITERBI | SIGNAL | SYNC | LOCK.
2004-06-08 13:15:14 DVB#1 Successfully tuned to channel 3.
[New Thread 49156 (LWP 4608)]
[New Thread 65541 (LWP 4609)]
[New Thread 81926 (LWP 4610)]
[New Thread 98311 (LWP 4611)]
2004-06-08 13:15:14 Found changes in the todo list.
2004-06-08 13:15:14 PruneOldRecords...
2004-06-08 13:15:14 AddNewRecords...
2004-06-08 13:15:14  |-- Start DB Query...
[New Thread 114696 (LWP 4612)]
[New Thread 131081 (LWP 4613)]
2004-06-08 13:15:14  |-- Processing 150 results...
2004-06-08 13:15:14 mythbackend version: 0.15.20040525-1 www.mythtv.org
2004-06-08 13:15:14 Enabled verbose msgs :all
[New Thread 147466 (LWP 4614)]
[New Thread 163851 (LWP 4615)]
2004-06-08 13:15:14  +-- Cleanup...
2004-06-08 13:15:14 Sort by priority...
2004-06-08 13:15:14 BuildListMaps...
2004-06-08 13:15:14 SchedNewRecords...
2004-06-08 13:15:14 Scheduling:

[big snip]

2004-06-09 17:15:53 Scheduled 40 items in 0.269117 seconds.
2004-06-09 17:15:53 45      BACKEND_MESSAGE[]:[]SCHEDULE_CHANGE[]:[]empty
2004-06-09 17:57:01 Started recording "BBC News" on channel: 2008 on cardid: 7, sourceid 2
2004-06-09 17:57:01 45      BACKEND_MESSAGE[]:[]SCHEDULE_CHANGE[]:[]empty
2004-06-09 17:57:01 DVB#0 Trying to tune to channel 1.
2004-06-09 17:57:01 DVB#0 Frequency: 505833333. BW:8Mhz HP:3/4 LP:3/4 C:16 TM:2K H:None GI:1/32
2004-06-09 17:57:01 DVB#0 Successfully tuned to channel 1.

Program received signal SIGINT, Interrupt.
[Switching to Thread 32771 (LWP 4605)]
0x4129e604 in __pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) thread apply all bt full

Thread 15 (Thread 213006 (LWP 4618)):
#0  0x4129e604 in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
#1  0x4129e3c8 in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
No symbol table info available.
#2  0x4129af2b in pthread_cond_wait at GLIBC_2.0 () from /lib/libpthread.so.0
No symbol table info available.
#3  0x40ff73f8 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#4  0x0807a0e5 in ProcessRequestThread::run (this=0x41900550)
    at mainserver.cpp:61
No locals.
#5  0x40d07f2a in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#6  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#7  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#8  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

---Type <return> to continue, or q <return> to quit---
Thread 14 (Thread 196621 (LWP 4617)):
#0  0x4129e604 in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
#1  0x4129e3c8 in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
No symbol table info available.
#2  0x4129af2b in pthread_cond_wait at GLIBC_2.0 () from /lib/libpthread.so.0
No symbol table info available.
#3  0x40ff73f8 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#4  0x0807a0e5 in ProcessRequestThread::run (this=0x41900528)
    at mainserver.cpp:61
No locals.
#5  0x40d07f2a in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#6  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#7  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#8  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 13 (Thread 180236 (LWP 4616)):
---Type <return> to continue, or q <return> to quit---
#0  0x4129e604 in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
#1  0x4129e3c8 in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
No symbol table info available.
#2  0x4129af2b in pthread_cond_wait at GLIBC_2.0 () from /lib/libpthread.so.0
No symbol table info available.
#3  0x40ff73f8 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#4  0x0807a0e5 in ProcessRequestThread::run (this=0x80d60d0)
    at mainserver.cpp:61
No locals.
#5  0x40d07f2a in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#6  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#7  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#8  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 12 (Thread 163851 (LWP 4615)):
#0  0x4129e604 in __pthread_sigsuspend () from /lib/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#1  0x4129e3c8 in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
No symbol table info available.
#2  0x4129af2b in pthread_cond_wait at GLIBC_2.0 () from /lib/libpthread.so.0
No symbol table info available.
#3  0x40ff73f8 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#4  0x0807a0e5 in ProcessRequestThread::run (this=0x8103cf0)
    at mainserver.cpp:61
No locals.
#5  0x40d07f2a in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#6  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#7  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#8  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 11 (Thread 147466 (LWP 4614)):
#0  0x4129e604 in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#1  0x4129e3c8 in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
No symbol table info available.
#2  0x4129af2b in pthread_cond_wait at GLIBC_2.0 () from /lib/libpthread.so.0
No symbol table info available.
#3  0x40ff73f8 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#4  0x0807a0e5 in ProcessRequestThread::run (this=0x80ee368)
    at mainserver.cpp:61
No locals.
#5  0x40d07f2a in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
No symbol table info available.
#6  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#7  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#8  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 10 (Thread 131081 (LWP 4613)):
#0  0x41472ca6 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#2  0x41472aef in sleep () from /lib/libc.so.6
No symbol table info available.
#3  0x0808e1ec in Transcoder::TranscodePoll (this=0x80ca780)
    at transcoder.cpp:419
	pid = 0
	transData = (TranscodeData *) 0x0
#4  0x0808e331 in Transcoder::TranscodePollThread (param=0xfffffffc)
    at transcoder.cpp:437
No locals.
#5  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#7  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 9 (Thread 114696 (LWP 4612)):
#0  0x41472ca6 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.
#2  0x41472aef in sleep () from /lib/libc.so.6
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#3  0x0808f2b7 in HouseKeeper::RunHouseKeeping (this=0x80ce278)
    at housekeeper.cpp:96
	period = 0
	maxhr = 0
	minhr = 0
#4  0x08090731 in HouseKeeper::doHouseKeepingThread (param=0xfffffffc)
    at housekeeper.cpp:211
No locals.
#5  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#7  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 8 (Thread 98311 (LWP 4611)):
#0  0x41472ca6 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.
#2  0x41472aef in sleep () from /lib/libc.so.6
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#3  0x08050bd4 in AutoExpire::RunExpirer (this=0x80d6108) at autoexpire.cpp:121
	statbuf = {f_type = 61267, f_bsize = 4096, f_blocks = 49003952, 
  f_bfree = 3667718, f_bavail = 3667718, f_files = 24903680, 
  f_ffree = 24903449, f_fsid = {__val = {0, 0}}, f_namelen = 255, 
  f_frsize = 0, f_spare = {0, 0, 0, 0, 0}}
	freespace = 13
	minFree = 5
	recordfileprefix = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x80a56e8, static shared_null = 0x80a56e8}, d = 0x80d7280, 
  static shared_null = 0x80a56e8}
#4  0x08051d11 in AutoExpire::ExpirerThread (param=0xfffffffc)
    at autoexpire.cpp:128
No locals.
#5  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#7  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 7 (Thread 81926 (LWP 4610)):
#0  0x41472ca6 in nanosleep () from /lib/libc.so.6
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.
#2  0x41472aef in sleep () from /lib/libc.so.6
No symbol table info available.
#3  0x080813e3 in Scheduler::RunScheduler (this=0x80c9590) at scheduler.cpp:764
	prerollseconds = 180
	secsleft = 10978
	nexttv = (EncoderLink *) 0x80ce2d8
	nextRecording = (ProgramInfo *) 0x80cb460
	nextrectime = {d = {jd = 2453166}, t = {ds = 75600000}}
	curtime = {d = {jd = 2453166}, t = {ds = 64621833}}
	lastupdate = {d = {jd = 2453166}, t = {ds = 62153115}}
	recordfileprefix = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x80a56e8, static shared_null = 0x80a56e8}, d = 0x80c9348, 
  static shared_null = 0x80a56e8}
	startIter = {<std::_List_iterator_base> = {
    _M_node = 0x80d6858}, <No data fields>}
	blockShutdown = true
	idleSince = {d = {jd = 0}, t = {ds = 0}}
	idleTimeoutSecs = 0
	idleWaitForRecordingTime = 15
---Type <return> to continue, or q <return> to quit---
	firstRun = false
	fillstart = {tv_sec = 1086797753, tv_usec = 118590}
	fillend = {tv_sec = 1086797753, tv_usec = 387707}
#4  0x08084641 in Scheduler::SchedulerThread (param=0xfffffffc)
    at scheduler.cpp:1158
No locals.
#5  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#7  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 6 (Thread 65541 (LWP 4609)):
#0  0x41472ca6 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.
#2  0x4149c6da in usleep () from /lib/libc.so.6
No symbol table info available.
#3  0x4036be76 in TVRec::RunTV (this=0x80d2c68) at tv_rec.cpp:816
No locals.
#4  0x4036be1f in TVRec::EventThread (param=0xfffffffc) at tv_rec.cpp:798
---Type <return> to continue, or q <return> to quit---
No locals.
#5  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#7  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 5 (Thread 49156 (LWP 4608)):
#0  0x4149985a in poll () from /lib/libc.so.6
No symbol table info available.
#1  0x403af9eb in DVBSections::ThreadLoop (this=0x80d5d38)
    at dvbsections.cpp:194
	ret = -4
	buffer = "\002°\225 EÅ\000\000ÿþð\027\v\002J\037\f\004\200´\201h\016\003À0\a\020\006À0\aÀ\b\000\002â\000ð\020\002\003\032H_R\001\000\016\003À(\006\006\001\002\004â\212ð\021\003\001g\n\004eng\000R\001\212\016\003À\002\n\004â\224ð\021\003\001g\n\004eng\003R\001\224\016\003À\000°\006ä\001ð\017Y\beng\020\000\002\000\002\016\003À\000¤\vä9ð\027\016\003À\003þ\023\005\000\000\000\003\000R\001ef\006\001\006\001\001\000\000g=ÔÖ", '\0' <repeats 3204 times>, "\200å)A\000\000\000\000t>*Aì÷?¿Ià)A", '\0' <repeats 20 times>, "èú?¿Ðú?¿"...
	head = {table_id = 2 '\002', section_length = 149, 
  table_id_ext = 8261, current_next = true, version = 2 '\002', 
---Type <return> to continue, or q <return> to quit---
  section_number = 0 '\0', section_last = 0 '\0'}
#2  0x403af95f in DVBSections::ThreadHelper (cls=0xfffffffc)
    at dvbsections.cpp:179
No locals.
#3  0x4129be51 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#4  0x4129becf in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#5  0x414a266a in clone () from /lib/libc.so.6
No symbol table info available.

Thread 4 (Thread 32771 (LWP 4605)):
#0  0x4129e604 in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
#1  0x4129e3c8 in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
No symbol table info available.
#2  0x4129dc42 in pthread_create@@GLIBC_2.1 () from /lib/libpthread.so.0
No symbol table info available.
#3  0x4021c415 in ThreadedFileWriter (this=0x80e4b10, 
    filename=0x8138de8 "/a/mythtv/Video//2008_20040609175700_20040609183000.nuv", flags=-4, mode=4294967292) at RingBuffer.cpp:118
	init = {__m_reserved = 0, __m_count = 0, __m_owner = 0x0, 
---Type <return> to continue, or q <return> to quit---
  __m_kind = 0, __m_lock = {__status = 0, __spinlock = 0}}
#4  0x4021d29f in RingBuffer (this=0x810de00, lfilename=@0xfffffffc, 
    write=true) at RingBuffer.cpp:288
	usereadahead = Cannot access memory at address 0x0
(gdb) q

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


More information about the mythtv-dev mailing list