[mythtv-users] mythbackend segemenation fault (on scheduling items)

Michael T. Dean mtdean at thirdcontact.com
Wed Oct 3 06:37:04 UTC 2007


On 10/03/2007 01:49 AM, Ma Begaj wrote:
> I am receiving segementation fault errors with mythbackend and
> mythbackend crashes:
> the last line in the log file is always the same ... as you can see in
> these three logfiles. I made while loop which restarts mythbackend
> after  few seconds with a new log file:
>
> mythtv at mythbox:/tmp$ tail -n 5 mythback2007-10-02T2*
> ==> mythback2007-10-02T20:24:13 <==
> 2007-10-02 23:00:57.034 MainServer::HandleAnnounce Monitor
> 2007-10-02 23:00:57.034 adding: mythbox as a client (events: 1)
> 2007-10-02 23:00:57.035 GetRecordBasename found no entry
> 2007-10-02 23:00:57.083 GetRecordBasename found no entry
> 2007-10-02 23:00:57.130 Scheduled 28 items in 0.2 = 0.00 match + 0.16 place
>
> ==> mythback2007-10-02T23:01:06 <==
> 2007-10-02 23:13:59.131 MainServer::HandleAnnounce Monitor
> 2007-10-02 23:13:59.131 adding: mythbox as a client (events: 1)
> 2007-10-02 23:13:59.132 GetRecordBasename found no entry
> 2007-10-02 23:13:59.139 GetRecordBasename found no entry
> 2007-10-02 23:13:59.266 Scheduled 26 items in 0.2 = 0.00 match + 0.15 place
>
> ==> mythback2007-10-02T23:14:13 <==
> 2007-10-02 23:15:58.496 MainServer::HandleAnnounce Monitor
> 2007-10-02 23:15:58.496 adding: mythbox as a client (events: 1)
> 2007-10-02 23:15:58.496 GetRecordBasename found no entry
> 2007-10-02 23:15:58.501 GetRecordBasename found no entry
> 2007-10-02 23:15:58.646 Scheduled 28 items in 0.2 = 0.00 match + 0.16 place
>
> These are the last 5 lines of log files. The last line is always
> "Scheduled ... items..."
>
> One guy told me on the dev list that the database is maybe corrupted
> ("GetRecordBasename found no entry")... But myhtbackend does not die
> in some regular periods, but just sometimes...
>
> Any ideas?
>   

"GetRecordBasename found no entry" is output when the query:

SELECT basename FROM recorded
WHERE chanid = :CHANID AND
      starttime = :STARTTIME;

finds no rows.  Therefore, you probably have broken channel ID or broken
starttime data in a couple of rows of the recorded table of your DB. 
Unfortunately, the logging info isn't very descriptive because that's a
section of code that should never be reached (can only be reached with
broken data).  So, you'll have to do some investigating to see what
record is broken.  On the bright side, it looks like only a couple rows.

> I would not mind to make a new clear database, but I would like to
> have my recordings in thw new database. Can I somehow export
> recordings data and import again? I could copy the tables, but that
> would not be smart if the database is corrupted.

Therein lies the crux of the problem... ;)  The table that contains the
recording metadata is the recorded table, which is also the table which
has the broken data...

Because the data is partially corrupted now, I'd highly recommend a
"spring cleaning"--after you fix the data--as described at:
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7 .

Once you get a good clean DB, see if the seg faults stop.  If not, let
us know an we'll dig deeper.  (No sense going deeper until the bad data
is fixed, though.)

Mike


More information about the mythtv-users mailing list