[mythtv-commits] Ticket #13647: Backend segfaults (probably in JobQueue)
MythTV
noreply at mythtv.org
Thu Jul 9 02:36:19 UTC 2020
#13647: Backend segfaults (probably in JobQueue)
--------------------------------+-------------------------------
Reporter: warpme | Owner: David Hampton
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: 31.1
Component: MythTV - General | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------
Changes (by David Hampton):
* owner: (none) => David Hampton
* status: new => assigned
* milestone: needs_triage => 31.1
Comment:
This looks like it was caused by my change in [3a94e530ec], but its got me
scratching my head.
Thread !#1, Frame !#2 is a call to ProgramInfo::!SubstituteMatches with
the command string for a job. That calls QDateTime::toLocalTime (Frame
!#1) with this=0x7f8e0c00ad70. Looking at the time_dtr array, that pointer
is the zeroth entry in the array of pointers to !DateTime objects, so this
matches with the value of i=0 and looks correct.
The pointers that array match up with what I would expect to see given the
!ProgramInfo class definition A QDateTime is 8 bytes in size; basically
just a pointer to private data. The addresses in the time_dtr array go up
by 8 from 0th to 1st entry, down by 24, and up by 8. This is because the
order of the date time fields don't match that of the class definition,
but the four objects are all adjacent in memory. I.E., they are in order
3,4,1,2 compared to the !DateTime objects in the class definition.
Looking at the qdatetime.h include file, the call to toLocalTime does
nothing other than call toTimeSpec(Qt::!LocalTime), so that tracks with
the call from Frame !#1 to Frame !#0.
I don't understand why this function is failing, unless the pointer to the
QDateTime object is bad, which makes no sense. The commit changed the
array "wrapper" from a C array to a C++ array, but the declaration of the
contents of the array didn't change.
What's the command line for your user job !#1? That's what's being kicked
off when the system crashes? What platform is crashing? OSX or something
ARM based?
I added some test code to MythTV to exercise the
ProgramInfo::!SubstituteMatches function where the crash is occurring. It
works for me on both Linux and OSX. Can you pull the latest code and run a
'make test' and see if it passes?
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13647#comment:1>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list