[mythtv-commits] Ticket #12909: mythfrontend crashes with SIGSEGV in code called from QImage::Load

MythTV noreply at mythtv.org
Thu Oct 27 13:13:04 UTC 2016


#12909: mythfrontend crashes with SIGSEGV in code called from QImage::Load
-------------------------------------------------+---------------------
     Reporter:  roger@…                          |      Owner:  stuartm
         Type:  Bug Report - Crash               |     Status:  new
     Priority:  major                            |  Milestone:  unknown
    Component:  MythTV - User Interface Library  |    Version:  0.28.0
     Severity:  high                             |   Keywords:
Ticket locked:  0                                |
-------------------------------------------------+---------------------
 mythfrontend randomly crashes on startup when a lot of images are being
 loaded into the image cache. Analysis of the crash shows that QImage::Load
 is being called on multiple threads. The QImage class is specifically
 marked in the Qt docs as re-entrant but not thread-safe.

 The crashes usually occur in QFactoryLoader::instance but can occur
 elsewhere in QT. The common factor is they all root at
 ImageLoader::LoadImage in mythuiimage.cpp.

 Here is a sample stack trace. The SIGSEGV occurs when qt tries to call a
 plugin that has been unloaded from memory.


 {{{

 (gdb) bt
 #0  0x00007f90f8142d50 in ?? ()
 #1  0x00007f91123f8375 in QFactoryLoader::instance (
     this=this at entry=0x7f9112ea5240
 <_ZZN12_GLOBAL__N_112Q_QGS_loader13innerFunctionEvE6holder>,
 index=index at entry=0) at plugin/qfactoryloader.cpp:259
 #2  0x00007f9112ab059d in createReadHandlerHelper (device=0x7f90b800e9c0,
     format=..., autoDetectImageFormat=<optimized out>,
     ignoresFormatAndExtension=<optimized out>) at
 image/qimagereader.cpp:318
 #3  0x00007f9112ab1449 in QImageReaderPrivate::initHandler (
     this=0x7f90b8042540) at image/qimagereader.cpp:617
 #4  0x00007f9112ab2782 in QImageReader::read (this=0x7f90bfffe500,
     image=0x7f90bfffe4a0) at image/qimagereader.cpp:1276
 #5  0x00007f9112ab2814 in QImageReader::read
 (this=this at entry=0x7f90bfffe500)
     at image/qimagereader.cpp:1244
 #6  0x00007f9112a950e3 in QImage::load (this=0x7f90b800eec0, fileName=...,
     format=<optimized out>) at image/qimage.cpp:3206
 #7  0x00007f91141e1b44 in MythImage::Load (this=0x7f90b800e920,
 filename=...)
     at mythimage.cpp:364
 #8  0x00007f9114209b13 in MythUIHelper::LoadCacheImage (this=0x1bc5050,
     srcfile=..., label=..., painter=0x1c283c0, cacheMode=kCacheNormal)
     at mythuihelper.cpp:1672 (This is slightly off because I put some
 debug in}
 #9  0x00007f911422a9fc in ImageLoader::LoadImage (painter=0x1c283c0,
     imProps=..., cacheMode=kCacheNormal, parent=0x20e7360,
     aborted=@0x7f90bfffeb4f: false, imageReader=0x0) at
 mythuiimage.cpp:273
 #10 0x00007f911422c255 in ImageLoadThread::run (this=0x20e7a60)
     at mythuiimage.cpp:553
 #11 0x00007f9114646961 in MPoolThread::run (this=0x1ebe220)
     at mthreadpool.cpp:140
 #12 0x00007f9114642e70 in MThreadInternal::run (this=0x1cd8210)
     at mthread.cpp:79
 #13 0x00007f911222b84e in QThreadPrivate::start (arg=0x1cd8210)
     at thread/qthread_unix.cpp:331
 #14 0x00007f9111f706fa in start_thread (arg=0x7f90bffff700)
     at pthread_create.c:333
 #15 0x00007f9111405b5d in clone ()
     at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

 }}}
 I can usually get this crash within four or five reboots and autostarts on
 my shuttle frontend box. Putting a 60 second delay in the mythfrontend
 wrapper script alleviates it considerably.

 This problem seems to have been around for some time. There are one or two
 expired tickets on the mythbuntu bug tracker that seem to have similar
 symptoms.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12909>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list