[mythtv] Need help catching a segfault in mythbackend?
stuarta at squashedfrog.net
Fri May 25 08:38:05 UTC 2007
On Thu, 24 May 2007 15:47:02 -0700, "Michael Rice" <mikerice1969 at gmail.com>
> On 5/22/07, Mark Paulus <mark.paulus at verizonbusiness.com> wrote:
>> You could change /etc/init.d/mythbackend to start gdb also and attach
> it to
>> the running mythtv-backend process. Or, you could run mythtv-backend
>> under strace. Just prepare for large amounts of logging output
>> if you use strace.
> Does anyone run gdb in their mythbackend startup script? I tried both
> running mythbackend directly from gdb and attaching to the mythbackend
> process but since gdb doesn't run as a daemon the script will wait for
> gdb to end. I tried running "daemon gdb ..." and "gdb &" but neither
> seems to allow the script to finish. Anyone help me get this working?
> I am running of FC5.
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
and then the backend will continue on it's merry way, and you can
leave it till it crashes.
More information about the mythtv-dev