[mythtv-commits] Ticket #10924: mythlogserver segfault when ending

MythTV noreply at mythtv.org
Mon Aug 26 23:07:16 UTC 2013


#10924: mythlogserver segfault when ending
------------------------------------+-----------------------------
 Reporter:  jyavenard               |          Owner:  natanojl
     Type:  Bug Report - Crash      |         Status:  new
 Priority:  minor                   |      Milestone:  unknown
Component:  MythTV - Mythlogserver  |        Version:  Master Head
 Severity:  medium                  |     Resolution:
 Keywords:                          |  Ticket locked:  0
------------------------------------+-----------------------------

Comment (by jonny.dee@…):

 I looked at the sources you pointed out, but I couldn't find any ZMQ
 related problems. Also I reviewed my nzmqt code and couldn't find any
 problematic code either. However, the crash report looks like the
 PollingZMQContext instance is not correctly initialized in memory. In
 loggingserver.cpp (line 60) there is a global variable definition
 "LogServerThread *logServerThread = NULL;". And in logging.cpp (line 307)
 this variable is accessed for obtaining a ZMQContext instance.
 I don't know how the whole thing is bootstrapped, but if we assume this
 variable has never been initialized with a correct pointer to a ZMQContext
 instance it might contain some non-null value until it is actually
 initialized with NULL according to loggingserver.cpp, line 60. As the
 initialization order of static/global variables is not guaranteed, could
 it be that for some reason logging.cpp accesses variable "logServerThread"
 **before** it is ever initialized to NULL? Because in this case the NULL-
 check in logging.cpp (line 315) would pass and createSocket() method would
 be called on an invalid ZMQContext instance pointer.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10924#comment:25>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list