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

Michael Rice mikerice1969 at gmail.com
Fri Nov 16 07:16:32 UTC 2007


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.

It is very unpredictable... sometimes once a day... sometimes I can go a week.

I'd love to get this fixed since it is really annoying.

Any ideas?


Nov 10:

*** glibc detected *** /usr/local/bin/mythbackend: malloc(): memory
corruption (fast): 0xa8faabcf ***
======= Backtrace: =========
/lib/libc.so.6[0x3159621]
/lib/libc.so.6(__libc_malloc+0x7e)[0x315a2de]
/usr/lib/libstdc++.so.6(_Znwj+0x27)[0x14adb47]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN7QGArray7newDataEv+0x1e)[0x78311ee]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN7QGArrayC2Ev+0x2d)[0x783158d]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN13QRegExpEngine9CharClassC1Ev+0x4c)[0x784a0dc]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN13QRegExpEngine5parseEPK5QChari+0x6a)[0x784dbca]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN13QRegExpEngineC1ERK7QStringb+0x189)[0x784e3b9]
/usr/lib/qt-3.3/lib/libqt-mt.so.3[0x784e6c5]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZNK7QRegExp13prepareEngineEv+0xc2)[0x784f172]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZNK7QRegExp21prepareEngineForMatchERK7QString+0x22)[0x784f4d2]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZNK7QRegExp6searchERK7QStringiNS_9CaretModeE+0x2f)[0x784f6bf]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZNK7QRegExp6searchERK7QStringi+0x33)[0x784f7a3]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN9QSqlQuery7prepareERK7QString+0x333)[0x77d3033]
/usr/local/lib/libmyth-0.20.so.0(_ZN9MSqlQuery7prepareERK7QString+0x127)[0x2c5c8f1]
/usr/local/lib/libmythtv-0.20.so.0(_ZNK11ProgramInfo17GetRecordBasenameEb+0x137)[0xaf6321]
/usr/local/lib/libmythtv-0.20.so.0(_ZN11ProgramInfo14GetPlaybackURLEbb+0x53)[0xaf68c7]
/usr/local/lib/libmythtv-0.20.so.0(_ZN8JobQueue23DoFlagCommercialsThreadEv+0x196e)[0xb8dc7c]
/usr/local/lib/libmythtv-0.20.so.0(_ZN8JobQueue21FlagCommercialsThreadEPv+0x23)[0xb8e537]
/lib/libpthread.so.0[0x1e6745b]
/lib/libc.so.6(clone+0x5e)[0x31c023e]


Nov 11:
*** glibc detected *** /usr/local/bin/mythbackend: malloc(): memory
corruption (fast): 0x09ffc747 ***
======= Backtrace: =========
/lib/libc.so.6[0x7bcf621]
/lib/libc.so.6(__libc_malloc+0x7e)[0x7bd02de]
/usr/lib/libstdc++.so.6(_Znwj+0x27)[0x18fcb47]
/usr/local/bin/mythbackend(_ZN17QValueListPrivateI7QStringEC1Ev+0x1e)[0x8070400]
/usr/local/bin/mythbackend(_ZN10QValueListI7QStringEC2Ev+0x21)[0x8070483]
/usr/local/bin/mythbackend(_ZN11QStringListC1Ev+0x11)[0x80704c3]
/usr/local/bin/mythbackend(_ZN9MythEventC1E7QStringRK11QStringList+0x40)[0x80717d4]
/usr/local/bin/mythbackend(_ZN9MythEvent5cloneEv+0x4d)[0x8071911]
/usr/local/lib/libmyth-0.20.so.0(_ZN14MythObservable8dispatchER9MythEvent+0x34)[0x175d8e0]
/usr/local/lib/libmyth-0.20.so.0(_ZN11MythContext8dispatchER9MythEvent+0x2e4)[0x162a0c0]
/usr/local/bin/mythbackend[0x8093438]
/usr/local/bin/mythbackend[0x80b39af]
/usr/local/bin/mythbackend[0x80b642d]
/usr/local/bin/mythbackend[0x80bcab4]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN15QThreadInstance5startEPv+0x5c)[0x74c4fcc]
/lib/libpthread.so.0[0x398545b]
/lib/libc.so.6(clone+0x5e)[0x7c3623e]


Nov 12:
*** glibc detected *** /usr/local/bin/mythbackend: malloc(): memory
corruption (fast): 0xa78c4c67 ***
======= Backtrace: =========
/lib/libc.so.6[0x13fc621]
/lib/libc.so.6(__libc_malloc+0x7e)[0x13fd2de]
/usr/lib/libstdc++.so.6(_Znwj+0x27)[0x42f3b47]
/usr/lib/libstdc++.so.6(_Znaj+0x1d)[0x42f3c7d]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN7QString9setLengthEj+0x3f)[0x785478f]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN7QString11real_detachEv+0x2c)[0x7854c1c]
/usr/local/bin/mythbackend(_ZN7QString6detachEv+0x11)[0x807155f]
/usr/local/bin/mythbackend(_ZN9QDeepCopyI7QStringEcvS0_Ev+0x24)[0x80715d2]
/usr/local/lib/libmythtv-0.20.so.0(_ZN11ProgramInfo5cloneERKS_+0x6b7)[0xb0be67]
/usr/local/lib/libmythtv-0.20.so.0(_ZN11ProgramInfoC1ERKS_+0x1c7)[0xb0cae3]
/usr/local/bin/mythbackend[0x80cee3e]
/usr/local/bin/mythbackend[0x80a8ebb]
/usr/local/bin/mythbackend[0x80b2552]
/usr/local/bin/mythbackend[0x80b642d]
/usr/local/bin/mythbackend[0x80bcab4]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN15QThreadInstance5startEPv+0x5c)[0x74c4fcc]
/lib/libpthread.so.0[0x402045b]
/lib/libc.so.6(clone+0x5e)[0x146323e]


Nov 14:
*** glibc detected *** /usr/local/bin/mythbackend: malloc(): memory
corruption (fast): 0xa6e800ef ***
======= Backtrace: =========
/lib/libc.so.6[0x1523621]
/lib/libc.so.6(__libc_malloc+0x7e)[0x15242de]
/usr/lib/libstdc++.so.6(_Znwj+0x27)[0x1452b47]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN7QGArray7newDataEv+0x1e)[0x1fbe1ee]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN7QGArrayC2Ev+0x2d)[0x1fbe58d]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN13QRegExpEngine3BoxC1EPS_+0x2a)[0x1fd6b1a]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN13QRegExpEngine5parseEPK5QChari+0x7f)[0x1fdabdf]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN13QRegExpEngineC1ERK7QStringb+0x189)[0x1fdb3b9]
/usr/lib/qt-3.3/lib/libqt-mt.so.3[0x1fdb6c5]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZNK7QRegExp13prepareEngineEv+0xc2)[0x1fdc172]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZNK7QRegExp21prepareEngineForMatchERK7QString+0x22)[0x1fdc4d2]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZNK7QRegExp6searchERK7QStringiNS_9CaretModeE+0x2f)[0x1fdc6bf]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZNK7QRegExp6searchERK7QStringi+0x33)[0x1fdc7a3]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN9QSqlQuery7prepareERK7QString+0x333)[0x1f60033]
/usr/local/lib/libmyth-0.20.so.0(_ZN9MSqlQuery7prepareERK7QString+0x127)[0x77d08f1]
/usr/local/lib/libmythtv-0.20.so.0(_ZNK11ProgramInfo17GetRecordBasenameEb+0x137)[0xaf6321]
/usr/local/lib/libmythtv-0.20.so.0(_ZN11ProgramInfo14GetPlaybackURLEbb+0x53)[0xaf68c7]
/usr/local/lib/libmythtv-0.20.so.0(_ZN8JobQueue23DoFlagCommercialsThreadEv+0x196e)[0xb8dc7c]
/usr/local/lib/libmythtv-0.20.so.0(_ZN8JobQueue21FlagCommercialsThreadEPv+0x23)[0xb8e537]
/lib/libpthread.so.0[0x801a45b]
/lib/libc.so.6(clone+0x5e)[0x158a23e]


Nov 14:
*** glibc detected *** /usr/local/bin/mythbackend: malloc(): memory
corruption (fast): 0x095350c7 ***
======= Backtrace: =========
/lib/libc.so.6[0x1a5a621]
/lib/libc.so.6(__libc_malloc+0x7e)[0x1a5b2de]
/usr/lib/libstdc++.so.6(_Znwj+0x27)[0x7ca3b47]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN6QGList6appendEPv+0x3d)[0x7836ded]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN12QApplication9postEventEP7QObjectP6QEvent+0xce)[0x74cd5be]
/usr/local/lib/libmyth-0.20.so.0(_ZN14MythObservable8dispatchER9MythEvent+0x43)[0x35998ef]
/usr/local/lib/libmyth-0.20.so.0(_ZN11MythContext8dispatchER9MythEvent+0x2e4)[0x34660c0]
/usr/local/bin/mythbackend[0x8093438]
/usr/local/bin/mythbackend[0x80b39af]
/usr/local/bin/mythbackend[0x80b642d]
/usr/local/bin/mythbackend[0x80bcab4]
/usr/lib/qt-3.3/lib/libqt-mt.so.3(_ZN15QThreadInstance5startEPv+0x5c)[0x74c4fcc]
/lib/libpthread.so.0[0x661845b]
/lib/libc.so.6(clone+0x5e)[0x1ac123e]


More information about the mythtv-dev mailing list