[mythtv] EIT triggered crashes (trunk)
David
david at unsolicited.net
Wed Feb 20 18:25:34 UTC 2008
I've always had the odd backend crash when using multiple DTV tuners,
but since multirec got merged I'm seeing multiple crashes, especially
just after midnight when the next batch of events are released. I
noticed others are suffering so I eventually got off my backside and did
some diagnostics. Eventually I got valgrind to report the following:
==12438== Thread 15:
==12438== Invalid read of size 4
==12438== at 0x5CDEC07: QGDict::hashKeyString(QString const&) (in
/usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CDED39: QGDict::unlink_string(QString const&, void*)
(in /usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CDEF92: QGDict::remove_string(QString const&, void*)
(in /usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CDC39B: QGCache::makeRoomFor(int, int) (in
/usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CDCBD7: QGCache::insert_string(QString const&, void*,
int, int) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CF795E: regexpEngine(QRegExpEngine*&, QString const&,
bool, bool) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CF7A42: QRegExp::invalidateEngine() (in
/usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CF7F94: QRegExp::~QRegExp() (in
/usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x41935BD: ProgramInfo::~ProgramInfo() (in
/usr/lib/libmythtv-0.21.so.0.21.0)
==12438== by 0x81012C6: (within /usr/bin/mythbackend)
==12438== by 0x811BE2C: (within /usr/bin/mythbackend)
==12438== by 0x811DB79: (within /usr/bin/mythbackend)
==12438== Address 0x66f7848 is 0 bytes inside a block of size 4 free'd
==12438== at 0x401C389: operator delete(void*) (vg_replace_malloc.c:342)
==12438== by 0x5CDC3CD: QGCache::makeRoomFor(int, int) (in
/usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CDCBD7: QGCache::insert_string(QString const&, void*,
int, int) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CF795E: regexpEngine(QRegExpEngine*&, QString const&,
bool, bool) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CF7A42: QRegExp::invalidateEngine() (in
/usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5CF7F94: QRegExp::~QRegExp() (in
/usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5D02C7C: QString::replace(QRegExp const&, QString
const&) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x5D02E5D: QString::remove(QRegExp const&) (in
/usr/lib/qt3/lib/libqt-mt.so.3.3.1)
==12438== by 0x4737955: EITFixUp::FixUK(DBEvent&) const (in
/usr/lib/libmythtv-0.21.so.0.21.0)
==12438== by 0x473A112: EITFixUp::Fix(DBEvent&) const (in
/usr/lib/libmythtv-0.21.so.0.21.0)
==12438== by 0x471C79D: EITHelper::ProcessEvents() (in
/usr/lib/libmythtv-0.21.so.0.21.0)
==12438== by 0x4727E6C: EITScanner::RunEventLoop() (in
/usr/lib/libmythtv-0.21.so.0.21.0)
==12438==
... interesting.. and the following code exists in programinfo.cpp,
implying that there is a race condition using regular expressions.
QMutexLocker locker(®ExpLock);
if (programid.contains(regExpSeries))
return false;
Unfortunately there is no such locking going on in the EIT fixup
routines. Should all users of regexp be protected using the same mutex?
I guess I could subclass QRegExp and find out, but I'd rather someone
tell me I'm on the right track first.
Cheers
David
More information about the mythtv-dev
mailing list