[mythtv] mythbackend segfault in libQtCore release-0-22-fixes
Simon Kenyon
simon at koala.ie
Fri Dec 18 18:11:51 UTC 2009
Daniel Kristjansson wrote:
> The way to fix crashes is to get a backtrace that a developer
> can look at. First you will need to either compile the debugging
> version of MythTV, or add the debugging symbols package if you
> use a pre-packaged MythTV; this will make the backtrace you
> generate much more useful to the developer. My favorite way to
> get backtraces for the backend is to dump core on crashes and
> then use gdb mythbackend name_of_core_file, this allows you to
> restart the backend on crashes and still get a backtrace at your
> leisure. To do this add these three lines to your mythbackend
> startup script:
> ulimit -c unlimited
> echo 1 > /proc/sys/kernel/core_uses_pid
> echo "/tmp/core.%t.%u.%p.%e" > /proc/sys/kernel/core_pattern
> The first allows core files to be used, the second allows the %p
> in the third line, and the third line creates individual core
> dumps for each program crash in tmp so they are easy to locate,
> and have the program that crashed and the time it crashed along
> with other useful information right in the name.
>
> To finally produce the backtrace run:
> $ sudo gdb mythbackend /tmp/core.[rest_of_the_file_name]
>> thread apply all bt
>> quit
>
> Unless there was memory overwriting going on or there was
> a serious hardware failure, the output will tell us exactly
> what line of code the backend crashed on, and what other
> threads were doing at the time.
>
> -- Daniel
i took the liberty of adding this to the wiki (on the Debugging page)
i hope you don't mind
--
simon
More information about the mythtv-dev
mailing list