Author |
Message |
symcha
|
Posted: Mon Sep 29, 2008 7:12 pm |
|
Joined: Wed Nov 09, 2005 8:45 pm
Posts: 76
|
All, I just recently had to rebuild my environment after a hard drive crash on Master backend. I installed fresh R5.5 but the backend is crashing daily with a segfault. In the messages file:
Code: Sep 29 19:54:33 mythtv -- MARK -- Sep 29 20:14:33 mythtv -- MARK -- Sep 29 20:21:37 mythtv kernel: mythbackend[3446]: segfault at 20202020 eip 0806eec4 esp bfa2ce30 error 4
The last thing seen in the mythbackend.log: Code: 2008-09-29 20:17:01.424 MainServer::HandleAnnounce Monitor 2008-09-29 20:17:01.426 adding: mythtv as a client (events: 0) 2008-09-29 20:21:06.930 AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min 2008-09-29 20:21:06.934 Expiring 1661 MBytes for 1004 @ Sun Sep 28 19:00:00 2008 => Football Night in America 2008-09-29 20:21:14.171 GetRecordBasename found no entry I see the following messages after restarting the backend: Code: 2008-09-29 21:04:15.640 DB Error (AddNotListed): Query was: SELECT record.recordid, record.type, record.chanid, record.starttime, record.startdate, record.endtime, record.enddate, record.startoffset, record.endoffset, record.title, record.subtitle, record.description, channel.channum, channel.callsign, channel.name FROM record INNER JOIN channel ON (channel.chanid = record.chanid) LEFT JOIN recordmatch on record.recordid = recordmatch.recordid WHERE (type = 1 OR type = 2 OR type = 5 OR type = 7) AND recordmatch.chanid IS NULL Driver error was [2/144]: QMYSQL3: Unable to execute query Database error was: Table './mythconverg/recordmatch' is marked as crashed and last (automatic?) repair failed
I've seen other posts where database issues caused the backend to segfault. It is not clear how I should repair this. Any suggestions or pointers to actual posts with some examples on how to correct this would be great.
|
|
Top |
|
 |
symcha
|
Posted: Mon Sep 29, 2008 7:20 pm |
|
Joined: Wed Nov 09, 2005 8:45 pm
Posts: 76
|
I think I found out how to repair it from a mysql forum.
Code: repair table recordmatch extended;
I did this an I can now select from the table. Hopefully this resolves the segfaults.
|
|
Top |
|
 |
symcha
|
Posted: Thu Oct 02, 2008 5:41 pm |
|
Joined: Wed Nov 09, 2005 8:45 pm
Posts: 76
|
Well it is still getting a segfault and not sure why. This time when I restarted it there was no messages regarding anything corrupt in the database.
Anyone else ever experience this or any pointers on how to track it down?
|
|
Top |
|
 |
akulcsar
|
Posted: Fri Oct 03, 2008 7:41 pm |
|
Joined: Thu Dec 01, 2005 4:14 pm
Posts: 78
Location:
Ann Arbor, MI
|
It's not totally clear from your posts - did you replace the hard drive after your crash, or did you re-install to the same hard drive?
|
|
Top |
|
 |
symcha
|
Posted: Sat Oct 04, 2008 8:47 pm |
|
Joined: Wed Nov 09, 2005 8:45 pm
Posts: 76
|
I replaced the drive and did a fresh install. I lost all of my previous recordings and the mythconverg database was created as part of the new install.
|
|
Top |
|
 |
tjc
|
Posted: Sun Oct 05, 2008 9:59 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Try running the optimize_db.sh script as root. It uses the strongest and most robust recovery techniques available. If that fails you may need to recreate the DB from scratch.
|
|
Top |
|
 |
symcha
|
Posted: Sun Oct 05, 2008 12:10 pm |
|
Joined: Wed Nov 09, 2005 8:45 pm
Posts: 76
|
Thanks tjc. mythfilldatabase is core dumping as well. I am still not 100% sure it is the database, but not sure what else it could be.
|
|
Top |
|
 |
akulcsar
|
Posted: Tue Oct 07, 2008 1:26 am |
|
Joined: Thu Dec 01, 2005 4:14 pm
Posts: 78
Location:
Ann Arbor, MI
|
To me, it sounds like hard drive corruption affecting the database files. You might want to run a file system check and, if you find corruption again, try changing the hard drive cable.
|
|
Top |
|
 |
symcha
|
Posted: Sun Oct 12, 2008 7:48 pm |
|
Joined: Wed Nov 09, 2005 8:45 pm
Posts: 76
|
Well, I did a repair on every table. I did this before tjc mentioned the optimize script. It has not segfaulted since. I added a "ulimit -c unlimited" to the backend rc script so if it does core again at least I can take a ponder at the stack.
If the stack is completely useful, I may need to build a debug version of mythbackend, but I am keeping my fingers crossed that repairing all the tables corrected the problem.
|
|
Top |
|
 |
symcha
|
Posted: Mon Oct 27, 2008 7:51 pm |
|
Joined: Wed Nov 09, 2005 8:45 pm
Posts: 76
|
Well, I spoke to soon it is still getting segfaults. I did run the optimize script but that still did not correct the problem. Also mythfilldatabase is segfaulting as well so what is next? I added a ulimit -c unlimited to the backend init.d script but I am still not getting core dumps.
If I were to rebuild everything is there a safe way to get the data out of mysql without re-introducing the corruption back in?
|
|
Top |
|
 |
cahlfors
|
Posted: Tue Oct 28, 2008 7:00 am |
|
Joined: Tue Jan 23, 2007 1:38 pm
Posts: 251
Location:
Sweden
|
Upgrading to the same version is the standard way of handling broken installations. Follow the hitchhiker's guide to upgrading under hints&tips.
Essentially you will be backing up, upgrading and then restoring.
Be sure the database and file systems are in good working order before you start, the way you already have.
Wuh, I had a dumping system once and it's not fun at all. In my case it was bad hw. Replacing it was a true joy, but the damage done to the database and file system still haunts me. The suggested procedure took care of the remaining instability issues, but I did have to delete quite a few destroyed files. This was in 2007, when the ext3 file system was discovered to be "unreliable", thus not coping well with system crashes. Hope you are luckier!
MythArchive is a good option for anything you can't afford to lose.
Cheers,
/Chris
_________________ LinHES R8.6.1 BE: AMD64X4, 4GB, Hauppauge usb tuners FE1: Gigabyte F2A85X-UP4, nVidia GT640 FE2: Gigabyte GA-MA69GM-S2H, AthlonX2 4850E 2.5 GHz, 1GB, ASUS GEFORCE 7200GS 256MB FE3: Asus Eeebox410
|
|
Top |
|
 |