[mythtv-commits] Ticket #11318: Segfault in mythbackend (mainserver/autoexpire?)

MythTV noreply at mythtv.org
Tue Jan 1 18:12:06 UTC 2013


#11318: Segfault in mythbackend (mainserver/autoexpire?)
--------------------------------+-----------------------------
 Reporter:  verycoldpenguin@…   |          Owner:  stuartm
     Type:  Bug Report - Crash  |         Status:  accepted
 Priority:  minor               |      Milestone:  0.26.1
Component:  MythTV - General    |        Version:  Master Head
 Severity:  medium              |     Resolution:
 Keywords:                      |  Ticket locked:  0
--------------------------------+-----------------------------

Comment (by gregorio.gervasio@…):

 I think this may be related to ticket #11316.  I ran into the exact same
 segfault while debugging that one.  I think what is happening is that when
 the master issues a QUERY_FREE_SPACE to a slave backend, it may receive an
 unexpected BACKEND_MESSAGE event before the actual response.  Since the
 event message does not match the string list format expected by the
 parsing code shown above, it can cause a segfault.

 Here is an example in one of my logs (-v socket,network --loglevel debug):
 {{{
 2012-12-28 20:00:00.104533 I [25772/25852] MythSocketThread(91)
 mythsocket.cpp:697 (WriteStringListReal) - MythSocket(b247f0:91): write ->
 91 16      QUERY_FREE_SPACE
 2012-12-28 20:00:00.327473 I [25772/25852] MythSocketThread(91)
 mythsocket.cpp:898 (ReadStringListReal) - MythSocket(b247f0:91): read  <-
 91 105     BACKEND_MESSAGE[]:[]UPDATE_RECORDING_STATUS 5 2703
 2012-12-29T03:30:00Z -3 2012-12-29T04:00:00Z[]:[]empty
 2012-12-28 20:00:00.327543 D [25772/25852] MythSocketThread(91)
 mythsocket.cpp:284 (CallReadyReadHandler) - MythSocket(b247f0:91): calling
 m_callback->readyRead()
 2012-12-28 20:00:00.329233 D [25772/25852] MythSocketThread(91)
 mythsocket.cpp:284 (CallReadyReadHandler) - MythSocket(b247f0:91): calling
 m_callback->readyRead()
 2012-12-28 20:00:00.333592 E [25772/25808] Scheduler mythsocket.cpp:351
 (SendReceiveStringList) - MythSocket(b247f0:91): Got MythEvent on non-
 event socket
 }}}

 The actual response arrives later and is treated as a response to a
 different query:

 {{{
 2012-12-28 20:00:00.337598 I [25772/25852] MythSocketThread(91)
 mythsocket.cpp:697 (WriteStringListReal) - MythSocket(b247f0:91): write ->
 91 40      QUERY_REMOTEENCODER 13[]:[]IS_BUSY[]:[]5
 2012-12-28 20:00:00.337651 I [25772/25852] MythSocketThread(91)
 mythsocket.cpp:898 (ReadStringListReal) - MythSocket(b247f0:91): read  <-
 91 295
 slave1.home[]:[]/home/mythtv/store.w0[]:[]1[]:[]-1[]:[]10[]:[]4096[]:[]1412510704[]:[]1342588920[]:[]slave1.home[]:[]/home/mythtv/store.w1[]:[]1[]:[]-1[]:[]17[]:[]4096[]:[]488327328[]:[]412500328[]:[]slave1.home[]:[]/home/mythtv/store.w2[]:[]1[]:[]-1[]:[]34[]:[]4096[]:[]1952559696[]:[]572217596
 }}}

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/11318#comment:3>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list