<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 3/1/10 2:58 AM, <a class="moz-txt-link-abbreviated"
 href="mailto:mythtv-users-request@mythtv.org">mythtv-users-request@mythtv.org</a>
wrote:
<blockquote
 cite="mid:mailman.18847.1267430315.29695.mythtv-users@mythtv.org"
 type="cite">
  <pre wrap="">Message: 16
Date: Sun, 28 Feb 2010 22:04:37 -0500
From: "Michael T. Dean" <a moz-do-not-send="true"
 class="moz-txt-link-rfc2396E" href="mailto:mtdean@thirdcontact.com">&lt;mtdean@thirdcontact.com&gt;</a>
Subject: Re: [mythtv-users] help diagnosing mythbackend service
        crashing
To: Discussion about mythtv <a moz-do-not-send="true"
 class="moz-txt-link-rfc2396E" href="mailto:mythtv-users@mythtv.org">&lt;mythtv-users@mythtv.org&gt;</a>
Message-ID: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="mailto:4B8B2EC5.60600@thirdcontact.com">&lt;4B8B2EC5.60600@thirdcontact.com&gt;</a>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 02/28/2010 09:53 PM, Larry wrote:
  </pre>
  <blockquote type="cite" style="color: rgb(0, 0, 0);">
    <pre wrap=""><span class="moz-txt-citetags">&gt; </span>Hello all,
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>I'm trying to figure out why in the last 3 week or so my once 
<span class="moz-txt-citetags">&gt; </span>extremely stable backend system has suddenly started having an issue 
<span class="moz-txt-citetags">&gt; </span>with the mythbackend service causing it do die.
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>System is running CENTOS 5.4 w kernel 2.6.18-164.11.1.el5
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>mythbackend version mythtv-backend-0.22-227.el5
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>The mythbackend logs show nothing so I'm guessing I need to turn on 
<span class="moz-txt-citetags">&gt; </span>some additional logging so I can capture what is happening.  Thats the 
<span class="moz-txt-citetags">&gt; </span>part that I need help with.
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>I start the mythbackend service with the standard /etc/rc.d/init.d 
<span class="moz-txt-citetags">&gt; </span>scripts and would like to modify that if possible to get the 
<span class="moz-txt-citetags">&gt; </span>additional logging. I say this because I have monit currently watching 
<span class="moz-txt-citetags">&gt; </span>over the system and restarting it when it crashes now. Monit was added 
<span class="moz-txt-citetags">&gt; </span>in after the crashes started to make the system more wife/kid friendly.
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>I'm sure I will be back with additional questions once I get some of 
<span class="moz-txt-citetags">&gt; </span>the log information unless google throws me a bone on the error but 
<span class="moz-txt-citetags">&gt; </span>right now I need to figure out how to get more debugs out of the system.
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>Thanks for your assistance!
    </pre>
  </blockquote>
  <pre wrap="">The best information you could provide to help us diagnose the crashing 
is a gdb thread backtrace, as described at <a moz-do-not-send="true"
 class="moz-txt-link-freetext" href="http://mythtv.org/wiki/Debugging">http://mythtv.org/wiki/Debugging</a>

Logs will almost definitely have no useful information for diagnosing 
the crash.

Mike



  </pre>
</blockquote>
<br>
Just so I'm doing this right here is what I have done.<br>
<br>
First I installed the atrpms-debug packages<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<pre>yum --enablerepo=atrpms-debuginfo install mythtv-debuginfo
</pre>
<br>
Then I added the following to my /etc/rc.d/init.d/mythbackend script
inside the start section<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<pre>ulimit -c unlimited
echo 1 &gt; /proc/sys/kernel/core_uses_pid
echo "/tmp/core.%t.%u.%p.%e" &gt; /proc/sys/kernel/core_pattern
</pre>
<br>
once the system dies is horrible death and gets restarted I should run
the following:<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<pre>$ sudo gdb mythbackend -c /tmp/core.[rest_of_the_file_name] 2&gt;&amp;1 | tee mythtv_backtrace.txt
set pagination off
thread apply all bt
quit
</pre>
and all the goodness should be available in the mythtv_backtrace.txt
file?<br>
<br>
Anything else that I should do ?&nbsp; I just want to make sure I'm
capturing everything that is needed.<br>
<br>
<br>
<br>
</body>
</html>