[mythtv-users] Backend crashes, sometimes with memory faults

Kenan Ezal SBMythTV at cox.net
Thu Jan 1 09:57:01 UTC 2009



> On 12/23/2008 05:19 AM, Kenan Ezal wrote:
> > I recently built a new 64-bit dual-core myth master backend and frontend
> > box. The hardware for my old box was getting a little unreliable and
> > difficult to replace. While the old system (Fedora 6, Myth 0.20, 32-bit,
> > Intel Monterrey 1700 MHz) was very stable (except for the motherboard
> > dying on me recently), the new system has a serious problem that I've
> > been trying to (unsuccessfully) diagnose for about a month: Basically,
> > the backend dies without warning, sometimes taking out the frontend with
> > it. Although I can't prove it, it seems to be related to deletes and
> > maybe even mysql/mythconverg. However, there is sometimes a delay
> > involved.
> >
> > My system information is:
> > Linux MythTV2 2.6.27.5-41.fc9.x86_64 #1 SMP Thu Nov 13 20:29:07 EST 2008
> > x86_64 x86_64 x86_64 GNU/Linux
> > Dual core CPU E2180 @ 2.00GHz with 3.9GiB
> >
> > My video partition is a RAID 5 with an ext3 filesystem.
> >
> > I know that people have reported problems deleting with ext3, but with
> > my old machine, which had slower hard drives, ext3 was the only
> > filesystem that I did NOT have any problems with. Other filesystems
> > would often crash my entire system. The current problem seems to be
> > limited to mythtv -- at least the system doesn't crash.
> >
> > The new machine does have SATA drives so I'm considering changing to
> > another filesystem, however, I thought I would see if anyone else can
> > think of something else that might going on before I commit to such a
> > move.
> >
> > One thing that I thought could be the problem related to the message
> > almost always found in mythbackend.log just before a crash:
> >
> > GetRecordBasename found no entry
> >
> > I've gone through and manually tried to clean
> > mythconverg.recorded/.recordedprogram and hoped that would solve the
> > problem. I didn't help, but I'm not sure if I was successful in finding
> > the reason for the above message. I did find at least one entry that did
> > not have a matching file. But as far as I could tell, all database
> > entries matched my video directory contents after my spring cleaning. Is
> > there a way to check this with higher confidence? (I've also used
> > mysqlcheck without success -- everything seems OK). Maybe I need to
> > revisit this...
> >
> > The only other solid clue I have is that sometimes I get a memory faults
> > (both mythfrontend and mythbackend, but mostly mythbackend).
> >
> > Otherwise, my observation is that there is a higher probability of a
> > crash if I've just deleted one or more recordings. I know there is a
> > "slow delete" feature (that I used to be able to control with 0.20), but
> > I'm not sure if it could case a delayed crash due to deletes.
> >


> 
> My first guess--assuming no hardware problems, such as bad
> memory/overheating (I had a mobo where the chipset would overheat,
> causing similar issues)/too-aggressive-overclock) would be a problem
> with the installation.  I'd recommend removing /all/ of myth
> (mythtv--including mythbackend, mythfrontend, mythfilldatabase,
> etc.--and mythplugins at least).  Do a backup first, too.  (
> http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore )
> Then, once you've removed everything using your package manager, make
> sure nothing is left (i.e. check for and remove files from
> /usr/{,local/}lib/{libmyth,mythtv} and /usr/{,local/}include/mythtv ).
> Then, re-install (and restore the database, if necessary).
> 
> If that doesn't help, we'd need a full backtrace to find out why things
> are segfaulting.  http://mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2
> Note, though, that Fedora and Ubuntu both have packages that contain all
> the debug symbols, so there's no need to rebuild mythtv--just
> (temporarily) install the proper debug packages.  Talk to someone who
> uses your distro to find out how.
> 
> Mike

Thanks for the reply Mike. Sorry for the delayed response. I've not been
able to do much with MythTV for the last week because my system is hiding
behind our Christmas tree... While the tree is still there at least all the
boxes surrounding it have now miraculously disappeared... 

Unfortunately, I've tried your suggestion to remove and reinstall all of
myth without success, so I will be trying your next suggestion for a full
backtrace. However, before I do that I should state that I can now virtually
guarantee that my backend (and sometimes frontend) will crash if I simply
delete a couple of files about the same time and wait for a short while. (A
single delete with a short delay is sometimes sufficient.) I am therefore
confident that the problem relates to deletes (I have an ext3 filesystem)
with a possible interaction with the database, but most likely related to
slow deletes. I will turn off slow deletes to see if this solves my problem.

I also ran the backend log with the -v all option and was able to determine
the cause of the message:

GetRecordBasename found no entry

It appears that the backend first deletes the file from the database then
checks to see if it in the database, thereby resulting in above message.
Along the way it also places the file in a currently in-use database while
the slow truncation/delete takes place. The backend stops responding
somewhere at this point. 

Thanks again. Any other suggestions are appreciated.

-Kenan

P.S. I've seen a couple of other posts that seem similar to my problem:

http://mythtv.org/pipermail/mythtv-users/2008-December/242766.html
http://mythtv.org/pipermail/mythtv-users/2008-December/242927.html 

I will may also try the following suggestion but I first need to setup
mythweb (I never set it up on the new machine):

http://mythtv.org/pipermail/mythtv-users/2008-December/242999.html





More information about the mythtv-users mailing list