Mailing List Archive

mythbackend 29/fixes crashes
2 years ago I had reported frequent backend crashing in 0.28/fixes. We
thought maybe it was due to an older Qt 5.6 in Centos 7.

This past week I upgraded to the recently released Centos 7.5 which now
includes Qt 5.9.2 and upgraded to v29.1-15-g280138b

I am still experiencing crashing. They always seem to happen on an hour
or 1/2 interval and seem to be related to QString()

Example 1

#0  0x00007f860d0cd277 in raise () at /lib64/libc.so.6
#1  0x00007f860d0ce968 in abort () at /lib64/libc.so.6
#2  0x00007f860d10fd37 in __libc_message () at /lib64/libc.so.6
#3  0x00007f860d118499 in _int_free () at /lib64/libc.so.6
#4  0x00007f8614ca4961 in QTypedArrayData<unsigned
short>::deallocate(QArrayData*) (data=0x7f85d4025f40)
    at /usr/include/qt5/QtCore/qarraydata.h:237
#5  0x00007f8614ca3fb8 in QString::~QString() (this=0x7f84ec028d10,
__in_chrg=<optimized out>)
    at /usr/include/qt5/QtCore/qstring.h:1084
#6  0x00007f8614d3cebd in ProgramInfo::~ProgramInfo()
(this=0x7f84ec028d00, __in_chrg=<optimized out>) at programinfo.cpp:1263
#7  0x00007f8614d3cf00 in ProgramInfo::~ProgramInfo()
(this=0x7f84ec028d00, __in_chrg=<optimized out>) at programinfo.cpp:1265
#8  0x00000000004a03ee in MainServer::HandleRecorderQuery(QStringList&,
QStringList&, PlaybackSock*) (this=
    0x1a076e0, slist=..., commands=..., pbs=0x7f84ec028f30) at
mainserver.cpp:4354
#9  0x0000000000475a05 in MainServer::ProcessRequestWork(MythSocket*)
(this=0x1a076e0, sock=0x1933370) at mainserver.cpp:706
#10 0x0000000000473f47 in MainServer::ProcessRequest(MythSocket*)
(this=0x1a076e0, sock=0x1933370) at mainserver.cpp:458
#11 0x00000000004ce942 in ProcessRequestRunnable::run()
(this=0x7f85dc00ccb0) at mainserver.cpp:159
#12 0x00007f86156f5714 in MPoolThread::run() (this=0x7f84f0026120) at
mthreadpool.cpp:140
#13 0x00007f86156f2034 in MThreadInternal::run() (this=0x7f84f00261b0)
at mthread.cpp:79
#14 0x00007f860dd2bb71 in QThreadPrivate::start(void*) () at
/lib64/libQt5Core.so.5
#15 0x00007f860f190e25 in start_thread () at /lib64/libpthread.so.0
#16 0x00007f860d195bad in clone () at /lib64/libc.so.6

Example 2

#0  0x00007ff27be49459 in __memcpy_ssse3_back () at /lib64/libc.so.6
#1  0x00007ff27c9f88a7 in QString::append(QString const&) () at
/lib64/libQt5Core.so.5
#2  0x00007ff27ca0b060 in QtPrivate::QStringList_join(QStringList
const*, QChar const*, int) () at /lib64/libQt5Core.so.5
#3  0x00007ff284367576 in QListSpecialMethods<QString>::join(QString
const&) const (this=0x7ff14c7eead0, sep=...)
    at /usr/include/qt5/QtCore/qstringlist.h:202
#4  0x00007ff2843619c4 in MythSocket::WriteStringListReal(QStringList
const*, bool*) (this=0xf7fa60, list=0x7ff14c7eead0, ret=0x7ff14c7ee5af)
at mythsocket.cpp:727
#5  0x00007ff2844a1b9d in MythSocket::qt_static_metacall(QObject*,
QMetaObject::Call, int, void**) (_o=0xf7fa60,
_c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7ff14c7edef0) at
moc_mythsocket.cpp:150
#6  0x00007ff27cb5c81e in QObject::event(QEvent*) () at
/lib64/libQt5Core.so.5
#7  0x00007ff27cb33205 in doNotify(QObject*, QEvent*) () at
/lib64/libQt5Core.so.5
#8  0x00007ff27cb332e6 in QCoreApplication::notifyInternal2(QObject*,
QEvent*) () at /lib64/libQt5Core.so.5
#9  0x00007ff27cb35c03 in
QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
() at /lib64/libQt5Core.so.5
#10 0x00007ff27cb82113 in postEventSourceDispatch(_GSource*, int
(*)(void*), void*) () at /lib64/libQt5Core.so.5
#11 0x00007ff273311969 in g_main_context_dispatch () at
/lib64/libglib-2.0.so.0
#12 0x00007ff273311cc8 in g_main_context_iterate.isra.22 () at
/lib64/libglib-2.0.so.0
#13 0x00007ff273311d7c in g_main_context_iteration () at
/lib64/libglib-2.0.so.0
#14 0x00007ff27cb81abc in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() at /lib64/libQt5Core.so.5
#15 0x00007ff27cb31deb in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/lib64/libQt5Core.so.5
#16 0x00007ff27c9856c8 in QThread::exec() () at /lib64/libQt5Core.so.5
#17 0x00007ff284350050 in MThreadInternal::QThreadRun() (this=0xf7f930)
at mthread.cpp:81
#18 0x00007ff28434f6ea in MThread::run() (this=0xf94b80) at mthread.cpp:321
#19 0x00007ff284350034 in MThreadInternal::run() (this=0xf7f930) at
mthread.cpp:79
#20 0x00007ff27c989b71 in QThreadPrivate::start(void*) () at
/lib64/libQt5Core.so.5
#21 0x00007ff27ddeee25 in start_thread () at /lib64/libpthread.so.0
#22 0x00007ff27bdf3bad in clone () at /lib64/libc.so.6

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythbackend 29/fixes crashes [ In reply to ]
Anyone? So tired of crashes on random hour or 1/2 intervals.

On 05/11/2018 02:26 PM, Ken Bass wrote:
> 2 years ago I had reported frequent backend crashing in 0.28/fixes. We
> thought maybe it was due to an older Qt 5.6 in Centos 7.
>
> This past week I upgraded to the recently released Centos 7.5 which
> now includes Qt 5.9.2 and upgraded to v29.1-15-g280138b
>
> I am still experiencing crashing. They always seem to happen on an
> hour or 1/2 interval and seem to be related to QString()
>
> Example 1
>
> #0  0x00007f860d0cd277 in raise () at /lib64/libc.so.6
> #1  0x00007f860d0ce968 in abort () at /lib64/libc.so.6
> #2  0x00007f860d10fd37 in __libc_message () at /lib64/libc.so.6
> #3  0x00007f860d118499 in _int_free () at /lib64/libc.so.6
> #4  0x00007f8614ca4961 in QTypedArrayData<unsigned
> short>::deallocate(QArrayData*) (data=0x7f85d4025f40)
>     at /usr/include/qt5/QtCore/qarraydata.h:237
> #5  0x00007f8614ca3fb8 in QString::~QString() (this=0x7f84ec028d10,
> __in_chrg=<optimized out>)
>     at /usr/include/qt5/QtCore/qstring.h:1084
> #6  0x00007f8614d3cebd in ProgramInfo::~ProgramInfo()
> (this=0x7f84ec028d00, __in_chrg=<optimized out>) at programinfo.cpp:1263
> #7  0x00007f8614d3cf00 in ProgramInfo::~ProgramInfo()
> (this=0x7f84ec028d00, __in_chrg=<optimized out>) at programinfo.cpp:1265
> #8  0x00000000004a03ee in
> MainServer::HandleRecorderQuery(QStringList&, QStringList&,
> PlaybackSock*) (this=
>     0x1a076e0, slist=..., commands=..., pbs=0x7f84ec028f30) at
> mainserver.cpp:4354
> #9  0x0000000000475a05 in MainServer::ProcessRequestWork(MythSocket*)
> (this=0x1a076e0, sock=0x1933370) at mainserver.cpp:706
> #10 0x0000000000473f47 in MainServer::ProcessRequest(MythSocket*)
> (this=0x1a076e0, sock=0x1933370) at mainserver.cpp:458
> #11 0x00000000004ce942 in ProcessRequestRunnable::run()
> (this=0x7f85dc00ccb0) at mainserver.cpp:159
> #12 0x00007f86156f5714 in MPoolThread::run() (this=0x7f84f0026120) at
> mthreadpool.cpp:140
> #13 0x00007f86156f2034 in MThreadInternal::run() (this=0x7f84f00261b0)
> at mthread.cpp:79
> #14 0x00007f860dd2bb71 in QThreadPrivate::start(void*) () at
> /lib64/libQt5Core.so.5
> #15 0x00007f860f190e25 in start_thread () at /lib64/libpthread.so.0
> #16 0x00007f860d195bad in clone () at /lib64/libc.so.6
>
> Example 2
>
> #0  0x00007ff27be49459 in __memcpy_ssse3_back () at /lib64/libc.so.6
> #1  0x00007ff27c9f88a7 in QString::append(QString const&) () at
> /lib64/libQt5Core.so.5
> #2  0x00007ff27ca0b060 in QtPrivate::QStringList_join(QStringList
> const*, QChar const*, int) () at /lib64/libQt5Core.so.5
> #3  0x00007ff284367576 in QListSpecialMethods<QString>::join(QString
> const&) const (this=0x7ff14c7eead0, sep=...)
>     at /usr/include/qt5/QtCore/qstringlist.h:202
> #4  0x00007ff2843619c4 in MythSocket::WriteStringListReal(QStringList
> const*, bool*) (this=0xf7fa60, list=0x7ff14c7eead0,
> ret=0x7ff14c7ee5af) at mythsocket.cpp:727
> #5  0x00007ff2844a1b9d in MythSocket::qt_static_metacall(QObject*,
> QMetaObject::Call, int, void**) (_o=0xf7fa60,
> _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7ff14c7edef0) at
> moc_mythsocket.cpp:150
> #6  0x00007ff27cb5c81e in QObject::event(QEvent*) () at
> /lib64/libQt5Core.so.5
> #7  0x00007ff27cb33205 in doNotify(QObject*, QEvent*) () at
> /lib64/libQt5Core.so.5
> #8  0x00007ff27cb332e6 in QCoreApplication::notifyInternal2(QObject*,
> QEvent*) () at /lib64/libQt5Core.so.5
> #9  0x00007ff27cb35c03 in
> QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
> () at /lib64/libQt5Core.so.5
> #10 0x00007ff27cb82113 in postEventSourceDispatch(_GSource*, int
> (*)(void*), void*) () at /lib64/libQt5Core.so.5
> #11 0x00007ff273311969 in g_main_context_dispatch () at
> /lib64/libglib-2.0.so.0
> #12 0x00007ff273311cc8 in g_main_context_iterate.isra.22 () at
> /lib64/libglib-2.0.so.0
> #13 0x00007ff273311d7c in g_main_context_iteration () at
> /lib64/libglib-2.0.so.0
> #14 0x00007ff27cb81abc in
> QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
> () at /lib64/libQt5Core.so.5
> #15 0x00007ff27cb31deb in
> QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
> /lib64/libQt5Core.so.5
> #16 0x00007ff27c9856c8 in QThread::exec() () at /lib64/libQt5Core.so.5
> #17 0x00007ff284350050 in MThreadInternal::QThreadRun()
> (this=0xf7f930) at mthread.cpp:81
> #18 0x00007ff28434f6ea in MThread::run() (this=0xf94b80) at
> mthread.cpp:321
> #19 0x00007ff284350034 in MThreadInternal::run() (this=0xf7f930) at
> mthread.cpp:79
> #20 0x00007ff27c989b71 in QThreadPrivate::start(void*) () at
> /lib64/libQt5Core.so.5
> #21 0x00007ff27ddeee25 in start_thread () at /lib64/libpthread.so.0
> #22 0x00007ff27bdf3bad in clone () at /lib64/libc.so.6
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythbackend 29/fixes crashes [ In reply to ]
On 11/05/18 19:26, Ken Bass wrote:
> 2 years ago I had reported frequent backend crashing in 0.28/fixes. We
> thought maybe it was due to an older Qt 5.6 in Centos 7.
>
> This past week I upgraded to the recently released Centos 7.5 which now
> includes Qt 5.9.2 and upgraded to v29.1-15-g280138b
>
> I am still experiencing crashing. They always seem to happen on an hour
> or 1/2 interval and seem to be related to QString()

I didn't see anything that rang a bell in your examples, but I don't
have such crashes either. I'm running master ad809c (Apr 10 rebuilt May
14) on an el7.5 system (SL7.5 with elrepo 4.4.136 kernel, used because
it supports dvb adapter numbers).

There can be build difficulties after subversion updates of el7, when
epel tracks el7 but the clones lag behind.

Master has a recent commit for the SystemEventHandler 0c7ad11

John P
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythbackend 29/fixes crashes [ In reply to ]
On 06/09/2018 06:58 AM, John Pilkington wrote:
> On 11/05/18 19:26, Ken Bass wrote:
>> 2 years ago I had reported frequent backend crashing in 0.28/fixes.
>> We thought maybe it was due to an older Qt 5.6 in Centos 7.
>>
>> This past week I upgraded to the recently released Centos 7.5 which
>> now includes Qt 5.9.2 and upgraded to v29.1-15-g280138b
>>
>> I am still experiencing crashing. They always seem to happen on an
>> hour or 1/2 interval and seem to be related to QString()
>
> I didn't see anything that rang a bell in your examples, but I don't
> have such crashes either.  I'm running master ad809c (Apr 10 rebuilt
> May 14) on an el7.5 system (SL7.5 with elrepo 4.4.136 kernel, used
> because it supports dvb adapter numbers).
>
> There can be build difficulties after subversion updates of el7, when
> epel tracks el7 but the clones lag behind.
>
> Master has a recent commit for the SystemEventHandler  0c7ad11
Most of the crashes seem to be in QString--the segfaults would imply to
me that there are string operations on NULL pointers going on.

For example many of the crashes in QString:append show it crashes on the
following line:

(gdb) up
#4  0x00007fdff34f29c4 in MythSocket::WriteStringListReal
(this=0x1cc64f0, list=0x7fdef4ff7ad0, ret=0x7fdef4ff75af) at
mythsocket.cpp:727
727        QString str = list->join("[]:[]");

(gdb) p *list
$3 = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data
fields>}, {p = {static shared_null = {ref = {atomic = {
              _q_value = {<std::__atomic_base<int>> = {_M_i = -1}, <No
data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}},
        d = 0x7fdedc048f30}, d = 0x7fdedc048f30}}, <No data fields>}

When it happens it is always the hour or 1/2 hour. I am not sure what
happens at time but I am pretty sure it happens while live TV is playing
somewhere. I don't think it I have seen it happen when idle or just
recording things.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythbackend 29/fixes crashes [ In reply to ]
Another crash since a complete recompile with the latest 29/fixes.

What about this line would cause a crash and what needs to be fixed to
protect against it? 80% of the crashes are on this line.

QString str = list->join("[]:[]");

#4  0x00007fdff34f29c4 in MythSocket::WriteStringListReal
(this=0x1cc64f0, list=0x7fdef4ff7ad0, ret=0x7fdef4ff75af) at
mythsocket.cpp:727
> 727     QString str = list->join("[]:[]");
>
> (gdb) p *list
> $3 = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data
> fields>}, {p = {static shared_null = {ref = {atomic = {
>               _q_value = {<std::__atomic_base<int>> = {_M_i = -1}, <No
> data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}},
>         d = 0x7fdedc048f30}, d = 0x7fdedc048f30}}, <No data fields>}
>
> When it happens it is always the hour or 1/2 hour. I am not sure what
> happens at time but I am pretty sure it happens while live TV is
> playing somewhere. I don't think it I have seen it happen when idle or
> just recording things.

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythbackend 29/fixes crashes [ In reply to ]
One additional item - whenever this crash happens - this is the 'event'
in the log preceding it (note this always is on the hour or 1/2 hour
which probably means the live tv rolls to a new program guide entry):

2018-06-12 10:00:00.127690 N [8593/8603] TVRecEvent
recordinginfo.cpp:695 (ApplyRecordRecGroupChange) -
ApplyRecordRecGroupChange: LiveTV to LiveTV (2)
2018-06-12 10:00:01.389053 N [8593/13681] HDHRStreamHandler
recorders/recorderbase.cpp:501 (FinishRecording) - Finished Recording:
Container: MPEG2-TS Video Codec: h264 (1280x720 A/R: 3 59.9401fps) Audio
Codec: ac3
2018-06-12 10:00:01.391463 I [8593/13681] HDHRStreamHandler
tv_rec.cpp:3385 (RingBufferChanged) - TVRec[1]: RingBufferChanged()
2018-06-12 10:00:01.392507 I [8593/13681] HDHRStreamHandler
tv_rec.cpp:863 (FinishedRecording) - TVRec[1]:
FinishedRecording(3818_2018-06-12T13:30:40Z) damaged
recq:<RecordingQuality overall_score="0" key="3818_2018-06-12T13:30:40Z"
countinuity_error_count="1" packet_count="4325576">
    <Gap start="2018-06-12T13:00:00Z" end="2018-06-12T13:30:40Z"
duration="1840" />
</RecordingQuality>

2018-06-12 10:00:01.402178 C [8593/8593] CoreContext
signalhandling.cpp:305 (handleSignal) - Received Segmentation fault:
Code 128, PID 0, UID 0, Value 0x7f5e78000020


On 06/13/2018 10:21 AM, Ken Bass wrote:
> Another crash since a complete recompile with the latest 29/fixes.
>
> What about this line would cause a crash and what needs to be fixed to
> protect against it? 80% of the crashes are on this line.
>
> QString str = list->join("[]:[]");
>
> #4  0x00007fdff34f29c4 in MythSocket::WriteStringListReal
> (this=0x1cc64f0, list=0x7fdef4ff7ad0, ret=0x7fdef4ff75af) at
> mythsocket.cpp:727
>> 727     QString str = list->join("[]:[]");
>>
>> (gdb) p *list
>> $3 = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data
>> fields>}, {p = {static shared_null = {ref = {atomic = {
>>               _q_value = {<std::__atomic_base<int>> = {_M_i = -1},
>> <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}},
>>         d = 0x7fdedc048f30}, d = 0x7fdedc048f30}}, <No data fields>}
>>
>> When it happens it is always the hour or 1/2 hour. I am not sure what
>> happens at time but I am pretty sure it happens while live TV is
>> playing somewhere. I don't think it I have seen it happen when idle
>> or just recording things.
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org