[mythtv-users] Same error every day ~5:30 pm

Mike Hodson mystica at gmail.com
Wed Nov 2 19:02:44 UTC 2022


On Wed, Nov 2, 2022, 12:40 George Bingham <georgeb1962 at gmail.com> wrote:

>
>
> On Wed, Nov 2, 2022 at 5:18 AM Klaas de Waal <klaas.de.waal at gmail.com>
> wrote:
>
>>
>>
>>
>> It would be great if you can start mythbackend from gdb and then, when
>> the segfault has happened, create a backtrace like this:
>> gdb> bt full
>> and attach the output to the ticket.
>>
>>
>
> I am not sure how to run the backend through gdb. Not sure I even have gdb
> on my system unless it's there by default. (OK, just checked, it is) The
> backend is started by the system, if there's a simple change I can make to
> have it launch through gdb automatically I can do that for the next few
> days, but then I'd need to know how to deal with the output... ??
>

What you could do is attach gdb to the running process after it launches,
so you don't have to do anything special to the boot up process.

https://stackoverflow.com/questions/2308653/can-i-use-gdb-to-debug-a-running-process
has a couple good discussions of different ways to do it, from command line
options to launching gdb in interactive mode and using commands within it.

You would want to run GDB as the user that is running the myth TV process,
so you might need a sudo -u mythtv prefixing the gdb command, or launch a
shell as the mythtv user and interact with gdb that way.

That said, I do not know if there are any apparmor permissions or such that
might need to be added for the mythtv user to debug its own process, so
there is also the slight chance that the easiest way to do this, although
theoretically not the safest or most secure, would be to run it as root.

Hope this helps!

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20221102/6adfc64c/attachment.htm>


More information about the mythtv-users mailing list