Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Unable to hit segfault within GDB, but no problem outside of GDB

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


list at mcdermotts

May 22, 2012, 3:20 PM

Post #1 of 4 (355 views)
Permalink
Unable to hit segfault within GDB, but no problem outside of GDB

Have a backend segfault which happens every couple of days. I cannot
provide a backtrace as I only hit the segfault when running outside of
GDB. Is there anything in the available information which can assist
in debug?

Two occurrences.
[42167.238283] mythbackend[1282]: segfault at 48 ip 00007f81b3ff9cbd
sp 00007f81a49aecd0 error 4 in libQtCore.so.4.7.4[7f81b3e7a000+292000]
[490961.484105] mythbackend[32330]: segfault at 48 ip 00007f87709c5cbd
sp 00007f87610b1cd0 error 4 in libQtCore.so.4.7.4[7f8770846000+292000]

I start GDB with:

mythtv [at] pv:~# cat /home/mythtv/gdbcommands
handle SIGPIPE nostop noprint
handle SIG33 nostop noprint
set logging on
set pagination off
set breakpoint pending on
break qFatal
set args --loglevel debug --syslog local7 --noupnp
handle SIGHUP nostop
run
thread apply all bt full
set logging off


Normally, initscripts start the backend with the following parameters:

/mythtv/latest/bin/mythbackend --daemon --loglevel debug --syslog
local7 --pidfile /var/run/mythtv/mythbackend.pid --noupnp
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


danielk at cuymedia

May 22, 2012, 3:29 PM

Post #2 of 4 (347 views)
Permalink
Re: Unable to hit segfault within GDB, but no problem outside of GDB [In reply to]

On 05/22/2012 06:20 PM, A McDermott wrote:
> Have a backend segfault which happens every couple of days. I cannot
> provide a backtrace as I only hit the segfault when running outside of
> GDB. Is there anything in the available information which can assist
> in debug?

put "ulimit -c unlimited" in your backend startup script and the
backend will generate a core. Then you can load that into gdb
with "gdb `which mythbackend` name-of-core-file" and produce
a backtrace using the normal procedure.

-- Daniel
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


bc-mythtv at comcast

May 22, 2012, 3:29 PM

Post #3 of 4 (345 views)
Permalink
Re: Unable to hit segfault within GDB, but no problem outside of GDB [In reply to]

On 2012-05-22 18:20, A McDermott wrote:
> Have a backend segfault which happens every couple of days. I cannot
> provide a backtrace as I only hit the segfault when running outside of
> GDB. Is there anything in the available information which can assist
> in debug?

Can you produce a core dump and inspect it post-mortem?
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


mtdean at thirdcontact

May 22, 2012, 3:41 PM

Post #4 of 4 (349 views)
Permalink
Re: Unable to hit segfault within GDB, but no problem outside of GDB [In reply to]

On 05/22/2012 06:29 PM, danielk wrote:
> On 05/22/2012 06:20 PM, A McDermott wrote:
>> Have a backend segfault which happens every couple of days. I cannot
>> provide a backtrace as I only hit the segfault when running outside of
>> GDB. Is there anything in the available information which can assist
>> in debug?
>
> put "ulimit -c unlimited" in your backend startup script and the
> backend will generate a core. Then you can load that into gdb
> with "gdb `which mythbackend` name-of-core-file" and produce
> a backtrace using the normal procedure.

Details: http://www.mythtv.org/wiki/Debugging#Using_core_files

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.