<div dir="auto"><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, Nov 2, 2022, 12:40 George Bingham <<a href="mailto:georgeb1962@gmail.com" target="_blank" rel="noreferrer">georgeb1962@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 2, 2022 at 5:18 AM Klaas de Waal <<a href="mailto:klaas.de.waal@gmail.com" rel="noreferrer noreferrer" target="_blank">klaas.de.waal@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><div>It would be great if you can start mythbackend from gdb and then, when the segfault has happened, create a backtrace like this:</div><div>gdb> bt full</div><div>and attach the output to the ticket.</div><div> </div></div></div></blockquote><div><br></div><div>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... ??</div></div></div></blockquote></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto"><a href="https://stackoverflow.com/questions/2308653/can-i-use-gdb-to-debug-a-running-process">https://stackoverflow.com/questions/2308653/can-i-use-gdb-to-debug-a-running-process</a> 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.</div><div dir="auto"><br></div><div dir="auto">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.  </div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">Hope this helps!</div><div dir="auto"><br></div><div dir="auto">Mike</div><div dir="auto"><br></div><div class="gmail_quote" dir="auto"></div></div>