[mythtv] Need help catching a segfault in mythbackend?

Michael Rice mikerice1969 at gmail.com
Wed Jun 6 06:32:37 UTC 2007


On 5/25/07, Stuart Auchterlonie <stuarta at squashedfrog.net> wrote:
>
> Not running from the startup script, but i've found attaching the debugger
> to the running instance of the backend works well.
>
> gdb /fullpath/to/mythbackend <pidof-mythbackend>
>
> as root. It'll attach to the process and drop you into gdb. Then
>
> set pagination off
> set logging file backend-gdb.log
> set logging on
> cont
>
> and then the backend will continue on it's merry way, and you can
> leave it till it crashes.

I've been running my debug compiled 0.20-fixes backend for about two
weeks now and it finally crashed today (crashes much more frequently
in an optimized compile).  I enabled core files and gdb reports the
following after the segmentation fault.  Would I get much better info
when running from gdb directly than with core files?

Can anyone tell what is wrong from this?  I can't even tell which
thread segfaulted, most look like they are sleeping. The crashes seem
to happen when the backend is busy at the top of the hour when
recordings are finishing, and starting and rescheduling is happening.
And deleting a recording during these peak times is really risky.

The crash was at 21:03 and these are the last items in the log:

2007-06-05 21:02:52.174 scheduler: Scheduled items: Scheduled 2029
items in 16.5 = 0.00 match + 16.52 place
2007-06-05 21:03:21.024 MainServer::HandleAnnounce Playback
2007-06-05 21:03:21.026 adding: mythfrontend1 as a client (events: 0)
2007-06-05 21:03:21.034 MainServer::HandleAnnounce FileTransfer
2007-06-05 21:03:21.034 adding: mythfrontend1 as a remote file transfer
2007-06-05 21:03:26.844 MainServer::HandleAnnounce Playback
2007-06-05 21:03:26.845 adding: mythfrontend1 as a client (events: 0)
2007-06-05 21:03:26.849 MainServer::HandleAnnounce FileTransfer
2007-06-05 21:03:26.850 adding: mythfrontend1 as a remote file transfer
2007-06-05 21:03:41.608 MainServer::HandleAnnounce Playback
2007-06-05 21:03:41.608 adding: mythfrontend1 as a client (events: 0)
2007-06-05 21:03:41.618 MainServer::HandleAnnounce FileTransfer
2007-06-05 21:03:41.618 adding: mythfrontend1 as a remote file transfer
2007-06-05 21:03:43.548 MainServer::HandleAnnounce Playback
2007-06-05 21:03:43.549 adding: mythfrontend1 as a client (events: 0)
2007-06-05 21:03:43.566 MainServer::HandleAnnounce FileTransfer
2007-06-05 21:03:43.567 adding: mythfrontend1 as a remote file transfer
2007-06-05 21:03:45.174 Event socket closed. No connection to the backend.

Thread 24 (process 2809):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x00d4f966 in __nanosleep_nocancel () from /lib/libc.so.6
No symbol table info available.
#2  0x00d4f78b in sleep () from /lib/libc.so.6
No symbol table info available.
#3  0x080e4441 in HouseKeeper::RunHouseKeeping (this=0x8f34df8) at
housekeeper.cpp:239
	period = 1
	maxhr = 6
	minhr = 1
	dbTag = {static null = {static null = <same as static member of an
already seen type>, d = 0x8ef23f8, static shared_null = 0x8ef23f8}, d
= 0xabb5d060, static shared_null = 0x8ef23f8}
#4  0x080e448b in HouseKeeper::doHouseKeepingThread (param=0x8f34df8)
at housekeeper.cpp:374
	hkeeper = (HouseKeeper *) 0x8f34df8
#5  0x003b7433 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x00d8da1e in clone () from /lib/libc.so.6
No symbol table info available.

Thread 23 (process 2819):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385cf8a in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x043b1d7e in EITScanner::RunEventLoop (this=Could not find the
frame base for "EITScanner::RunEventLoop()".
) at eitscanner.cpp:147
	list_size = Could not find the frame base for "EITScanner::RunEventLoop()".

Thread 22 (process 2824):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385cf8a in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x043ea9fe in TVRec::RunTV (this=Could not find the frame base for
"TVRec::RunTV()".
) at tv_rec.cpp:1396
	lock = Could not find the frame base for "TVRec::RunTV()".

Thread 21 (process 2829):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385cf8a in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x043b1d7e in EITScanner::RunEventLoop (this=Could not find the
frame base for "EITScanner::RunEventLoop()".
) at eitscanner.cpp:147
	list_size = Could not find the frame base for "EITScanner::RunEventLoop()".

Thread 20 (process 2852):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385cf8a in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x043ea9fe in TVRec::RunTV (this=Could not find the frame base for
"TVRec::RunTV()".
) at tv_rec.cpp:1396
	lock = Could not find the frame base for "TVRec::RunTV()".

Thread 19 (process 2854):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385cf8a in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x043b1d7e in EITScanner::RunEventLoop (this=Could not find the
frame base for "EITScanner::RunEventLoop()".
) at eitscanner.cpp:147
	list_size = Could not find the frame base for "EITScanner::RunEventLoop()".

Thread 18 (process 2947):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385cf8a in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x043ea9fe in TVRec::RunTV (this=Could not find the frame base for
"TVRec::RunTV()".
) at tv_rec.cpp:1396
	lock = Could not find the frame base for "TVRec::RunTV()".

Thread 17 (process 2949):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385ce69 in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x080d6be6 in Scheduler::RunScheduler (this=0x8f8b7d0) at scheduler.cpp:1155
	statuschanged = false
	recIter = {_M_node = 0xacf6d3c0}
	prerollseconds = 10
	secsleft = 1575
	nexttv = (EncoderLink *) 0x8f499b0
	nextRecording = (ProgramInfo *) 0xab850130
	nextrectime = {d = {jd = 2454257}, t = {ds = 77400000}}
	curtime = {d = {jd = 2454257}, t = {ds = 75824279}}
	lastupdate = {d = {jd = 2454257}, t = {ds = 75754638}}
	recordfileprefix = {static null = {static null = <same as static
member of an already seen type>, d = 0x8ef23f8, static shared_null =
0x8ef23f8}, d = 0x8f59798, static shared_null = 0x8ef23f8}
	startIter = {_M_node = 0xacf6d3c0}
	blockShutdown = false
	idleSince = {d = {jd = 0}, t = {ds = 0}}
	idleTimeoutSecs = 0
	idleWaitForRecordingTime = 15
	firstRun = false
	fillstart = {tv_sec = 1181102555, tv_usec = 620951}
	fillend = {tv_sec = 1181102572, tv_usec = 136016}
	matchTime = 0.00257000001
	placeTime = 16.5150642
	query = {<> = {<No data fields>}, m_db = 0x8f16468, m_isConnected =
true, m_returnConnection = false}
#4  0x080dabe6 in Scheduler::SchedulerThread (param=0x8f8b7d0) at
scheduler.cpp:1607
	sched = (Scheduler *) 0x8f8b7d0
#5  0x003b7433 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x00d8da1e in clone () from /lib/libc.so.6
No symbol table info available.

Thread 16 (process 2950):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x00d4f966 in __nanosleep_nocancel () from /lib/libc.so.6
No symbol table info available.
#2  0x00d4f78b in sleep () from /lib/libc.so.6
No symbol table info available.
#3  0x0805bbcb in AutoExpire::Sleep (this=0x8f82450, sleepTime=33) at
autoexpire.cpp:289
	minSleep = 5
	timeExpended = 25
#4  0x08065c71 in AutoExpire::RunExpirer (this=0x8f82450) at autoexpire.cpp:274
	timer = {ds = 75768075}
	curTime = {d = {jd = 2454257}, t = {ds = 75768076}}
	next_expire = {d = {jd = 2454257}, t = {ds = 76095795}}
#5  0x08065c9d in AutoExpire::ExpirerThread (param=0x8f82450) at
autoexpire.cpp:526
	expirer = (AutoExpire *) 0x8f82450
#6  0x003b7433 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#7  0x00d8da1e in clone () from /lib/libc.so.6
No symbol table info available.

Thread 15 (process 2951):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x00d4f966 in __nanosleep_nocancel () from /lib/libc.so.6
No symbol table info available.
#2  0x00d4f78b in sleep () from /lib/libc.so.6
No symbol table info available.
#3  0x03f97b4e in JobQueue::ProcessQueue (this=Could not find the
frame base for "JobQueue::ProcessQueue()".
) at jobqueue.cpp:476
	chanid = Could not find the frame base for "JobQueue::ProcessQueue()".

Thread 14 (process 2954):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385ce69 in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x00352b09 in CEvent::WaitForEvent (this=Could not find the frame
base for "CEvent::WaitForEvent(unsigned long)".
) at threadpool.cpp:94
	ret = Could not find the frame base for "CEvent::WaitForEvent(unsigned long)".

Thread 13 (process 2967):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0350b859 in QThreadInstance::deinit () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x0350b98b in QThread::msleep () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#4  0x00348e70 in TaskQueue::run (this=Could not find the frame base
for "TaskQueue::run()".
) at taskqueue.cpp:129
	ttNow = Could not find the frame base for "TaskQueue::run()".

Thread 12 (process 2975):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x00d86d11 in ___newselect_nocancel () from /lib/libc.so.6
No symbol table info available.
#2  0x037aa473 in QSocketDevice::waitForMore () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x003691bd in BufferedSocketDevice::WaitForMore (this=Could not
find the frame base for "BufferedSocketDevice::WaitForMore(int,
bool*)".
) at bufferedsocketdevice.cpp:360
	nBytes = Could not find the frame base for
"BufferedSocketDevice::WaitForMore(int, bool*)".

Thread 11 (process 2988):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba4d6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
No symbol table info available.
#2  0x0385cebd in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x080c0387 in ProcessRequestThread::run (this=0x8f72d08) at
mainserver.cpp:131
No locals.
#4  0x0350bccc in QThreadInstance::start () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#5  0x003b7433 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x00d8da1e in clone () from /lib/libc.so.6
No symbol table info available.

Thread 10 (process 2989):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba4d6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
No symbol table info available.
#2  0x0385cebd in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x080c0387 in ProcessRequestThread::run (this=0x8f856d0) at
mainserver.cpp:131
No locals.
#4  0x0350bccc in QThreadInstance::start () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#5  0x003b7433 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x00d8da1e in clone () from /lib/libc.so.6
No symbol table info available.

Thread 9 (process 2990):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba4d6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
No symbol table info available.
#2  0x0385cebd in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x080c0387 in ProcessRequestThread::run (this=0x8f78ad8) at
mainserver.cpp:131
No locals.
#4  0x0350bccc in QThreadInstance::start () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#5  0x003b7433 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x00d8da1e in clone () from /lib/libc.so.6
No symbol table info available.

Thread 8 (process 2991):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba4d6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
No symbol table info available.
#2  0x0385cebd in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x080c0387 in ProcessRequestThread::run (this=0x8f61fc0) at
mainserver.cpp:131
No locals.
#4  0x0350bccc in QThreadInstance::start () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#5  0x003b7433 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x00d8da1e in clone () from /lib/libc.so.6
No symbol table info available.

Thread 7 (process 2992):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba4d6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
No symbol table info available.
#2  0x0385cebd in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x080c0387 in ProcessRequestThread::run (this=0x8f8b550) at
mainserver.cpp:131
No locals.
#4  0x0350bccc in QThreadInstance::start () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#5  0x003b7433 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6  0x00d8da1e in clone () from /lib/libc.so.6
No symbol table info available.

Thread 6 (process 3155):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003bceaf in __close_nocancel () from /lib/libpthread.so.0
No symbol table info available.
#2  0x037ab7b9 in QSocketDevice::close () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x04d889ac in MythSocket::close (this=Could not find the frame
base for "MythSocket::close()".
) at mythsocket.cpp:177
No locals.
#4  0x04d89523 in ~MythSocket (this=Could not find the frame base for
"~MythSocket".
) at mythsocket.cpp:39
No locals.
#5  0x04d7db8b in MythSocket::DownRef (this=Could not find the frame
base for "MythSocket::DownRef()".
) at mythsocket.cpp:84
	ref = Could not find the frame base for "MythSocket::DownRef()".

Thread 5 (process 19736):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385cf8a in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x03f42f49 in ThreadedFileWriter::DiskLoop (this=Could not find
the frame base for "ThreadedFileWriter::DiskLoop()".
) at ThreadedFileWriter.cpp:359
	write_ok = Could not find the frame base for "ThreadedFileWriter::DiskLoop()".

Thread 4 (process 19737):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003ba75c in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
No symbol table info available.
#2  0x0385cf8a in QWaitCondition::wait () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x03f4401d in ThreadedFileWriter::SyncLoop (this=Could not find
the frame base for "ThreadedFileWriter::SyncLoop()".
) at ThreadedFileWriter.cpp:335
No locals.
#4  0x03f4405f in ThreadedFileWriter::boot_syncer (wotsit=Could not
find the frame base for "ThreadedFileWriter::boot_syncer(void*)".
) at ThreadedFileWriter.cpp:106
	fw = Could not find the frame base for
"ThreadedFileWriter::boot_syncer(void*)".

Thread 3 (process 19738):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x00d86d11 in ___newselect_nocancel () from /lib/libc.so.6
No symbol table info available.
#2  0x04481d8d in MpegRecorder::StartRecording (this=Could not find
the frame base for "MpegRecorder::StartRecording()".
) at mpegrecorder.cpp:607
	buffer = Could not find the frame base for "MpegRecorder::StartRecording()".

Thread 2 (process 19741):
#0  0x00cc4402 in ?? ()
No symbol table info available.
#1  0x003bdceb in __waitpid_nocancel () from /lib/libpthread.so.0
No symbol table info available.
#2  0x04caa8cf in myth_system (command=Could not find the frame base
for "myth_system(QString const&, int)".
) at util.cpp:247
	status = Could not find the frame base for "myth_system(QString const&, int)".

Thread 1 (process 2762):
#0  0x00000030 in ?? ()
No symbol table info available.
#1  0x080ed4fd in MainServer::qt_invoke (this=0x8f7d290, _id=3,
_o=0xbf844978) at moc_mainserver.cpp:94
No locals.
#2  0x0357c4aa in QObject::activate_signal () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x0357d01d in QObject::activate_signal () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#4  0x039089b9 in QTimer::timeout () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#5  0x035a3b4f in QTimer::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#6  0x0351392b in QApplication::internalNotify () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#7  0x03514d79 in QApplication::notify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#8  0x03507732 in QEventLoop::activateTimers () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#9  0x034bbaff in QEventLoop::processEvents () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#10 0x0352cdd0 in QEventLoop::enterLoop () from
/usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#11 0x0352cc96 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#12 0x0351343f in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#13 0x08093e2f in main (argc=8, argv=0xbf845474) at main.cpp:692
	a = <incomplete type>
	settingsOverride = {sh = 0x8f14bc8}
	binname = {static null = {static null = <same as static member of an
already seen type>, d = 0x8ef23f8, static shared_null = 0x8ef23f8}, d
= 0x8f13358, static shared_null = 0x8ef23f8}
	daemonize = true
	printsched = false
	testsched = false
	resched = false
	nosched = false
	noupnp = false
	nojobqueue = false
	nohousekeeper = false
	noexpirer = false
	printexpire = false
	pidfs = <incomplete type>
	port = 6543
	statusport = 6544
	myip = {static null = {static null = <same as static member of an
already seen type>, d = 0x8ef23f8, static shared_null = 0x8ef23f8}, d
= 0x8f34c78, static shared_null = 0x8ef23f8}
	masterip = {static null = {static null = <same as static member of an
already seen type>, d = 0x8ef23f8, static shared_null = 0x8ef23f8}, d
= 0x8f352b0, static shared_null = 0x8ef23f8}
	ismaster = true
	fatal_error = false
	runsched = true


More information about the mythtv-dev mailing list