[mythtv] malloc(): memory corruption -> how to proceed?

Michael Rice mikerice1969 at gmail.com
Sat Nov 17 06:21:49 UTC 2007


On Nov 16, 2007 12:09 AM, Stuart Auchterlonie <stuarta at squashedfrog.net> wrote:
> Stuart Auchterlonie wrote:
> > Michael Rice wrote:
> >> I get these assertions quite frequently (currently using SVN 14795).
> >> I've attached the last few for a sampling.
> >> I am assuming this error happens when the corruption is detected not
> >> when the bad write occurs.  That makes
> >> the stack traces not very useful in finding the problem.
> >>
> >> Any hints on how to track this down?  Is there a some way to configure
> >> malloc to do more checking to get
> >> a trace closer to the real problem?
> >>
> >> I tried compiling with mudflaps but that just seemed to hang.
> >> I am guessing valgrind would be too slow on the backend.
> >>
> >
> > valgrind is the way forward.
> >
> > if you need help with valgrind, join us in IRC but the basic incantation
> > you will need is...
> >
> > valgrind --tool=memcheck --error-limit=no --leak-check=full
> > --log-file=backend-valgrind.log -v -- /usr/local/bin/mythbackend | tee
> > backend.log
> >
> >
>
> Oh and one more thing. Make sure you've done a make distclean and then
> rebuilt it. That's the first thing to try when you have oddities like this.

How do you get around the sockets closing due to the slow execution
under valgrind?
I tried --enable-valgrind but that does do a whole lot.  I doubt I'll
be able to isolate the
problem unless I use it under normal load.  I see that
--enable-valgrind turns off the job queue
which might prevent the problem as well.

2007-11-16 19:28:59.504 Reschedule requested for id 0.
2007-11-16 19:32:34.105 Unknown socket closing
2007-11-16 19:32:35.984 MythSocket(71ce4b0:-1): writeStringList:
Error, socket went unconnected.
2007-11-16 19:32:42.061 Unknown socket closing
2007-11-16 19:32:43.833 MythSocket(15360790:-1): writeStringList:
Error, socket went unconnected.
2007-11-16 19:33:08.591 Unknown socket closing
2007-11-16 19:33:10.374 MythSocket(5882048:-1): writeStringList:
Error, socket went unconnected.
2007-11-16 19:33:12.594 Unknown socket closing
2007-11-16 19:33:12.960 MythSocket(15cbf9c0:-1): writeStringList:
Error, socket went unconnected.
2007-11-16 19:39:22.272 MythSocket(5b4fa10:-1): writeStringList:
Error, socket went unconnected.


More information about the mythtv-dev mailing list