[mythtv-commits] Ticket #13571: Crash of backend on delete of program being recorded
MythTV
noreply at mythtv.org
Sun Feb 2 21:27:30 UTC 2020
#13571: Crash of backend on delete of program being recorded
------------------------------------+--------------------------
Reporter: Klaas de Waal | Owner: (none)
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: needs_triage
Component: MythTV - General | Version: Master Head
Severity: medium | Keywords:
Ticket locked: 0 |
------------------------------------+--------------------------
Over the last two weeks I have now experienced three times a segfault of
the mythbackend when deleting a program that is still being recorded. The
program is deleted from the frontend on a separate machine.
This happens on my "production" living room system and it does happen only
incidentally but it is happening only since I am running master in the
living room. This is a master of a few weeks old.
All three segfaults are in the same piece of code.
Backend identification:
{{{
2020-01-26 10:09:44.408326 C [23981/23981] thread_unknown
mythcommandlineparser.cpp:2602 (ConfigureLogging) - mythbackend version:
master [v31-Pre-1811-g0d3bb87db7] www.mythtv.org
2020-01-26 10:09:44.408371 C [23981/23981] thread_unknown
mythcommandlineparser.cpp:2606 (ConfigureLogging) - Qt version: compile:
5.12.5, runtime: 5.12.5
2020-01-26 10:09:44.408411 I [23981/23981] thread_unknown
mythcommandlineparser.cpp:2608 (ConfigureLogging) - Fedora 31 (Workstation
Edition) (x86_64)
2020-01-26 10:09:44.408415 N [23981/23981] thread_unknown
mythcommandlineparser.cpp:2610 (ConfigureLogging) - Enabled verbose msgs:
general channel record
2020-01-26 10:09:44.408524 N [23981/23981] thread_unknown logging.cpp:724
(logStart) - Setting Log Level to LOG_INFO
}}}
Last few lines of the backend log:
{{{
2020-02-02 21:16:47.721784 I [23981/24016] TVRecEvent tv_rec.cpp:4433
(ClearFlags) - TVRec[19]: ClearFlags(PENDINGACTIONS,) ->
RunMainLoop,RingBufferReady, @ tv_rec.cpp:3640
2020-02-02 21:16:47.721844 I [23981/87786] ProcessRequest tv_rec.cpp:4433
(ClearFlags) - TVRec[19]: ClearFlags(CancelNextRecording,KillRec,) ->
RunMainLoop,RingBufferReady, @ tv_rec.cpp:721
2020-02-02 21:16:47.723057 I [23981/87786] ProcessRequest tv_rec.cpp:692
(SetRecordingStatus) - TVRec[19]: SetRecordingStatus(Opname->Onbekend) on
line 723
2020-02-02 21:16:47.775262 C [23981/23981] CoreContext
signalhandling.cpp:299 (handleSignal) - Received Segmentation fault: Code
1, PID 40, UID 0, Value 0x00000000
2020-02-02 21:16:47.841684 I [23981/24025] Scheduler scheduler.cpp:2425
(HandleReschedule) - Scheduled 91 items in 0.1 = 0.00 match + 0.00 check +
0.06 place
}}}
This is the backtrace of the latest crash:
{{{
(gdb) bt
#0 0x0000000000449be2 in EncoderLink::IsLocal() const (this=0x0) at
encoderlink.h:51
#1 0x000000000048c11f in
MainServer::DoHandleStopRecording(RecordingInfo&, PlaybackSock*)
(this=0x1b26620, recinfo=..., pbs=0x0) at mainserver.cpp:2914
#2 0x000000000048cc55 in
MainServer::DoHandleDeleteRecording(RecordingInfo&, PlaybackSock*, bool,
bool, bool)
(this=0x1b26620, recinfo=..., pbs=0x7f4f74042490,
forceMetadataDelete=false, lexpirer=false, forgetHistory=false) at
mainserver.cpp:3018
#3 0x000000000048c553 in MainServer::HandleDeleteRecording(QString&,
QString&, PlaybackSock*, bool, bool)
(this=0x1b26620, chanid=..., starttime=..., pbs=0x7f4f74042490,
forceMetadataDelete=false, forgetHistory=false) at mainserver.cpp:2967
#4 0x0000000000473e43 in MainServer::ProcessRequestWork(MythSocket*)
(this=0x1b26620, sock=0x7f50702e4ce0) at mainserver.cpp:641
#5 0x0000000000472a90 in MainServer::ProcessRequest(MythSocket*)
(this=0x1b26620, sock=0x7f50702e4ce0) at mainserver.cpp:456
#6 0x00000000004c9d04 in ProcessRequestRunnable::run()
(this=0x7f500001f840) at mainserver.cpp:160
#7 0x00007f5087d0c8d7 in MPoolThread::run() (this=0x7f4f74010a30) at
mthreadpool.cpp:140
#8 0x00007f5087d09258 in MThreadInternal::run() (this=0x7f4f7044ae10) at
mthread.cpp:79
#9 0x00007f5084e8e4e6 in QThreadPrivate::start(void*)
(arg=0x7f4f7044ae10) at thread/qthread_unix.cpp:361
#10 0x00007f50863d34e2 in start_thread (arg=<optimized out>) at
pthread_create.c:479
#11 0x00007f50849ad693 in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95
}}}
The crash is now in mainserver.cpp line 2914 but the previous two crashes
were in line 2910.
{{{
(gdb) l
2909 TVRec::s_inputsLock.lockForRead();
2910 for (auto iter = m_encoderList->begin(); iter !=
m_encoderList->end(); ++iter)
2911 {
2912 EncoderLink *elink = *iter;
2913
2914 if (elink->IsLocal() && elink->MatchesRecording(&recinfo))
2915 {
2916 recnum = iter.key();
2917
2918 elink->StopRecording();
(gdb) p iter
$1 = {i = 0x7f502c024d20}
(gdb) p elink
$2 = (EncoderLink *) 0x0
(gdb)
}}}
It looks to me that m_encoderList is corrupt but I have not been able to
find the cause of this. hence this ticket.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13571>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list